-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (71 loc) · 2.03 KB
/
Copy pathbuild-llvm.yml
File metadata and controls
81 lines (71 loc) · 2.03 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
72
73
74
75
76
77
78
79
80
81
name: Build LLVM
on:
workflow_dispatch:
inputs:
llvm-version:
required: true
type: string
jobs:
create-release:
runs-on: ubuntu-slim
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "llvm-${{ inputs.llvm-version }}" \
--draft \
--title "LLVM ${{ inputs.llvm-version }}"
build-linux:
needs:
- create-release
runs-on: ${{ matrix.runner }}
container:
image: almalinux:8
strategy:
fail-fast: false
matrix:
arch: [x64, arm64]
include:
- arch: x64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- name: Install tools
run: |
dnf install -y epel-release
dnf install -y --enablerepo powertools \
gcc-toolset-14 cmake ninja-build \
$(: CI requirements ) \
git \
$(: LLVM build requirements ) \
python3 xz
- name: Checkout
uses: actions/checkout@v6
- name: Download LLVM
run: |
ci/download_llvm.sh "${{ inputs.llvm-version }}"
- name: Build libclang
run: |
source /opt/rh/gcc-toolset-14/enable
ci/build_llvm.sh
- name: Create package
run: |
dnf install -y zip
mv llvm-out llvm
zip -r llvm-linux-$(uname -m).zip llvm/
- name: Upload package
env:
GH_TOKEN: ${{ github.token }}
run: |
# TODO: use a ready-made universal GitHub action
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf install -y gh
# fix git permissions
export HOME=${RUNNER_TEMP}
git config --global --add safe.directory '*'
# upload package
gh release upload "llvm-${{ inputs.llvm-version }}" llvm-linux-$(uname -m).zip --clobber