forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 1
129 lines (124 loc) · 4.11 KB
/
redpoint.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: "Redpoint Games LLVM"
on:
push:
branches: [ "redpoint/*" ]
pull_request:
branches: [ "redpoint/*" ]
jobs:
get-branch-name:
name: "Get Branch Name"
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.extract_branch.outputs.branch }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: extract_branch
name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/redpoint/}}" >> $GITHUB_OUTPUT
llvm-redpoint-linux:
name: "Build for Linux"
needs:
- get-branch-name
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate
run: |
mkdir -pv build/release/linux
cmake \
"-DLLVM_ENABLE_PROJECTS:STRING=clang;lld" \
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=TRUE \
-DLLVM_INCLUDE_BENCHMARKS:BOOL=FALSE \
-DLLVM_INCLUDE_DOCS:BOOL=FALSE \
-DLLVM_INCLUDE_EXAMPLES:BOOL=FALSE \
-DLLVM_INCLUDE_TESTS:BOOL=FALSE \
-DCLANG_INCLUDE_TESTS:BOOL=FALSE \
-DCLANG_INCLUDE_DOCS:BOOL=FALSE \
-DLLVM_ENABLE_DIA_SDK:BOOL=FALSE \
-DCMAKE_BUILD_TYPE=Release \
-Hllvm -Bbuild/release/linux
- name: Build
run: |
cmake --build build/release/linux --config Release -j 20
- name: Install
run: |
cmake --install build/release/linux --config Release --prefix "/opt/llvm-redpoint" --strip
- name: "Prepare for Upload"
run: |
mv /opt/llvm-redpoint llvm-linux-${{ needs.get-branch-name.outputs.branch }}
- name: "Upload LLVM"
uses: actions/upload-artifact@v4
with:
name: llvm-linux-${{ needs.get-branch-name.outputs.branch }}
if-no-files-found: error
path: |
llvm-linux-${{ needs.get-branch-name.outputs.branch }}
llvm-redpoint-windows:
name: "Build for Windows"
needs:
- get-branch-name
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Wix Toolset
shell: pwsh
run: |
dotnet tool install --global wix
if ($LastExitCode -ne 0) { exit $LastExitCode }
- name: Generate
shell: pwsh
run: |
mkdir build\release\win64
cmake -T host=x64 -A x64 `
"-DLLVM_ENABLE_PROJECTS:STRING=clang;lld" `
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=TRUE `
-DLLVM_INCLUDE_BENCHMARKS:BOOL=FALSE `
-DLLVM_INCLUDE_DOCS:BOOL=FALSE `
-DLLVM_INCLUDE_EXAMPLES:BOOL=FALSE `
-DLLVM_INCLUDE_TESTS:BOOL=FALSE `
-DCLANG_INCLUDE_TESTS:BOOL=FALSE `
-DCLANG_INCLUDE_DOCS:BOOL=FALSE `
-DLLVM_ENABLE_DIA_SDK:BOOL=FALSE `
-DCMAKE_BUILD_TYPE=Release `
-Hllvm -Bbuild/release/win64
if ($LastExitCode -ne 0) { exit $LastExitCode }
- name: Build
shell: pwsh
run: |
cmake --build build/release/win64 --config Release -j 20
if ($LastExitCode -ne 0) { exit $LastExitCode }
- name: Install
shell: pwsh
run: |
if (Test-Path "C:\Program Files\LLVM") {
Remove-Item -Force -Recurse "C:\Program Files\LLVM"
}
cmake --install build/release/win64 --config Release --strip
if ($LastExitCode -ne 0) { exit $LastExitCode }
- name: "Generate MSI"
shell: pwsh
run: |
wix build .github\workflows\llvm.wxs
if ($LastExitCode -ne 0) { exit $LastExitCode }
- name: "Prepare for Upload"
shell: pwsh
run: |
Move-Item -Force "C:\Program Files\LLVM" llvm-win64-${{ needs.get-branch-name.outputs.branch }}
- name: "Upload LLVM ZIP"
uses: actions/upload-artifact@v4
with:
name: llvm-win64-${{ needs.get-branch-name.outputs.branch }}
if-no-files-found: error
path: |
llvm-win64-${{ needs.get-branch-name.outputs.branch }}
- name: "Upload LLVM MSI"
uses: actions/upload-artifact@v4
with:
name: llvm-win64-msi-${{ needs.get-branch-name.outputs.branch }}
if-no-files-found: error
path: |
.github/workflows/llvm.msi