Skip to content

Commit cac16e9

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

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

.github/workflows/build-llvm.yaml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,44 @@ 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
33+
env:
34+
DEBIAN_FRONTEND: noninteractive
1835
steps:
1936
- name: checkout
2037
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"
38+
- run: "apt update && apt install -y ninja-build cmake"
2539
# Build and package LLVM.
26-
- run: "./build-llvm-libs.sh llvm-static-libs-${{ matrix.os }}.tar.gz"
40+
- run: "./build-llvm-libs.sh llvm-static-libs-ubuntu-20.04-${{ runner.arch }}.tar.gz"
2741
- uses: actions/upload-artifact@v4
2842
with:
29-
name: llvm-static-libs-${{ matrix.os }}
30-
path: llvm-static-libs-${{ matrix.os }}.tar.gz
43+
name: llvm-static-libs-ubuntu-20.04-${{ runner.arch }}
44+
path: llvm-static-libs-ubuntu-20.04-${{ runner.arch }}.tar.gz
3145

3246
create_release:
3347
name: Create release
3448
runs-on: ubuntu-latest
35-
needs: [build_llvm]
49+
needs: [build_llvm_mac, build_llvm_linux]
3650
permissions:
3751
contents: write # for creating releases
3852
steps:

0 commit comments

Comments
 (0)