Skip to content

wip

wip #9

Workflow file for this run

name: Build toolchain
env:
LLVM_REF: "cd708029e0b2869e80abe31ddb175f7c35361f90" # 19.1.7
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
toolchain-build:
name: ${{ matrix.OS }} toolchain (${{ matrix.ARCH}})
runs-on: ${{ matrix.RUNNER }}
strategy:
matrix:
include:
- ARCH: x86_64
RUNNER: ubuntu-22.04
OS: Linux
- ARCH: aarch64
RUNNER: ubuntu-22.04-arm
OS: Linux
- ARCH: aarch64
RUNNER: macos-latest
OS: Darwin
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v5
with:
repository: 'llvm/llvm-project'
ref: ${{ env.LLVM_REF }}
path: 'llvm'
- name: Build toolchain
run: |
sudo apt-get install ccache ninja-build
mkdir build.dir
cmake -G Ninja \
-B build.dir \
-C ToolchainCache.cmake \
llvm/llvm \
-DCMAKE_INSTALL_PREFIX=${{ matrix.OS }}-${{ matrix.ARCH }}.toolchain
cmake --build build.dir --target stage2-distribution
cmake --build build.dir --target stage2-install-distribution
tar -czvf \
${{ matrix.OS }}-${{ matrix.ARCH }}.toolchain.tar.gz \
${{ matrix.OS }}-${{ matrix.ARCH }}.toolchain
- name: Upload toolchain
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "*.tar.*"
tag: ${{ github.run_id }}
overwrite: true
file_glob: true