File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build LLVM
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ llvm-version :
7+ required : true
8+ type : string
9+
10+ jobs :
11+ create-release :
12+ runs-on : ubuntu-slim
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v6
16+
17+ - name : Create release
18+ env :
19+ GH_TOKEN : ${{ github.token }}
20+ run : |
21+ gh release create "llvm-${{ inputs.llvm-version }}" \
22+ --draft \
23+ --title "LLVM ${{ inputs.llvm-version }}"
24+
25+ build-linux :
26+ needs :
27+ - create-release
28+ runs-on : ${{ matrix.runner }}
29+ container :
30+ image : almalinux:8
31+ strategy :
32+ fail-fast : false
33+ matrix :
34+ arch : [x64, arm64]
35+ include :
36+ - arch : x64
37+ runner : ubuntu-24.04
38+ - arch : arm64
39+ runner : ubuntu-24.04-arm
40+
41+ steps :
42+ - name : Install tools
43+ run : |
44+ dnf install -y epel-release
45+ dnf install -y --enablerepo powertools \
46+ gcc-toolset-14 cmake ninja-build \
47+ $(: CI requirements ) \
48+ git \
49+ $(: LLVM build requirements ) \
50+ python3 xz
51+
52+ - name : Checkout
53+ uses : actions/checkout@v6
54+
55+ - name : Download LLVM
56+ run : |
57+ ci/download_llvm.sh "${{ inputs.llvm-version }}"
58+
59+ - name : Build libclang
60+ run : |
61+ source /opt/rh/gcc-toolset-14/enable
62+ ci/build_llvm.sh
63+
64+ - name : Create package
65+ run : |
66+ dnf install -y zip
67+ mv llvm-out llvm
68+ zip -r llvm-linux-$(uname -m).zip llvm/
69+
70+ - name : Upload package
71+ env :
72+ GH_TOKEN : ${{ github.token }}
73+ run : |
74+ # TODO: use a ready-made universal GitHub action
75+ dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
76+ dnf install -y gh
77+ # fix git permissions
78+ export HOME=${RUNNER_TEMP}
79+ git config --global --add safe.directory '*'
80+ # upload package
81+ gh release upload "llvm-${{ inputs.llvm-version }}" llvm-linux-$(uname -m).zip --clobber
You can’t perform that action at this time.
0 commit comments