Skip to content

Commit 91f1a49

Browse files
committed
feat: build llvm in docker
1 parent 698e7cb commit 91f1a49

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

.github/workflows/build-llvm.yaml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,42 @@ on:
99
type: string
1010

1111
jobs:
12-
build_llvm:
12+
build_llvm_mac:
13+
name: Build LLVM
14+
runs-on: macos-14
15+
steps:
16+
- name: checkout
17+
uses: actions/checkout@v3
18+
- run: "brew install ninja"
19+
# Build and package LLVM.
20+
- run: "./build-llvm-libs.sh llvm-static-libs-macos-14.tar.gz"
21+
- uses: actions/upload-artifact@v4
22+
with:
23+
name: llvm-static-libs-macos-14
24+
path: llvm-static-libs-macos-14.tar.gz
25+
26+
build_llvm_linux:
1327
name: Build LLVM
1428
strategy:
1529
matrix:
16-
os: [ubuntu-20.04, ubuntu-24.04-arm, macos-14]
30+
os: [ubuntu-24.04, ubuntu-24.04-arm]
1731
runs-on: ${{ matrix.os }}
32+
container: ubuntu:20.04
1833
steps:
1934
- name: checkout
2035
uses: actions/checkout@v3
21-
- if: contains(matrix.os, 'ubuntu')
22-
run: "sudo apt update && sudo apt install -y ninja-build"
23-
- if: contains(matrix.os, 'macos')
24-
run: "brew install ninja"
36+
- run: "apt update && apt install -y ninja-build cmake git"
2537
# Build and package LLVM.
26-
- run: "./build-llvm-libs.sh llvm-static-libs-${{ matrix.os }}.tar.gz"
38+
- run: "./build-llvm-libs.sh llvm-static-libs-ubuntu-20.04-${{ runner.arch }}.tar.gz"
2739
- uses: actions/upload-artifact@v4
2840
with:
29-
name: llvm-static-libs-${{ matrix.os }}
30-
path: llvm-static-libs-${{ matrix.os }}.tar.gz
41+
name: llvm-static-libs-ubuntu-20.04-${{ runner.arch }}
42+
path: llvm-static-libs-ubuntu-20.04-${{ runner.arch }}.tar.gz
3143

3244
create_release:
3345
name: Create release
3446
runs-on: ubuntu-latest
35-
needs: [build_llvm]
47+
needs: [build_llvm_mac, build_llvm_linux]
3648
permissions:
3749
contents: write # for creating releases
3850
steps:

0 commit comments

Comments
 (0)