-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (69 loc) · 2.21 KB
/
toolchain.yml
File metadata and controls
71 lines (69 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build toolchain
env:
LLVM_REF: "cd708029e0b2869e80abe31ddb175f7c35361f90" # 19.1.7
# GH Actions are dead slow, can't build two-stage
CMAKE_CACHE: "SingleStage" # ToolchainCache
STAGE: "" # stage2-
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
toolchain-build:
name: ${{ matrix.OS }} toolchain (${{ matrix.ARCH}})
runs-on: ${{ matrix.RUNNER }}
strategy:
fail-fast: false
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: hendrikmuhs/ccache-action@v1.2
with:
max-size: "5000MB"
- uses: actions/checkout@v5
with:
repository: 'llvm/llvm-project'
ref: ${{ env.LLVM_REF }}
path: 'llvm'
- name: Install deps
if: matrix.OS == 'Linux'
run: |
sudo apt-get install ninja-build
- name: Build toolchain
run: |
mkdir build.dir
cmake -G Ninja \
-B build.dir \
-C ${{ env.CMAKE_CACHE }}.cmake \
llvm/llvm \
-DCMAKE_INSTALL_PREFIX=${{ matrix.OS }}-${{ matrix.ARCH }}.toolchain
cmake --build build.dir --target ${{ env.STAGE }}distribution
cmake --build build.dir --target ${{ env.STAGE }}install-distribution
- name: Package toolchain
run: |
tar -cvzf \
${{ matrix.OS }}-${{ matrix.ARCH }}.toolchain.tar.gz \
${{ matrix.OS }}-${{ matrix.ARCH }}.toolchain
tar cvfJ \
${{ matrix.OS }}-${{ matrix.ARCH }}.toolchain.tar.xz \
${{ 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
target_commit: ${{ github.sha }}