-
Notifications
You must be signed in to change notification settings - Fork 5
240 lines (194 loc) · 7.02 KB
/
ci.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
name: CI
env:
BUILD_DIR: xa-build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build_llvm_linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install LLVM build dependencies
run: >-
sudo apt-get update;
sudo apt-get -f -u install cmake ninja-build chrpath texinfo sharutils libffi-dev
lsb-release patchutils diffstat xz-utils python3-dev libedit-dev libncurses5-dev swig
python3-six python3-sphinx binutils-dev libxml2-dev libjsoncpp-dev pkg-config lcov
procps help2man zlib1g-dev g++-multilib libjs-mathjax python3-recommonmark libpfm4-dev
python3-setuptools libz3-dev ccache
- name: build Linux LLVM
run: ./build-llvm.sh
env:
CC: gcc-10
CXX: g++-10
- name: package LLVM config and build logs
if: ${{ always() }}
run: find ${BUILD_DIR} -name 'config.*' -o -name '*.log' -o -name 'CMakeCache.txt' | zip -9 build-logs-linux-llvm.zip -@
- name: upload LLVM config and build logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: build-logs
path: build-logs-linux-llvm.zip
- name: package LLVM artifacts
run: tar cjf artifacts-linux-llvm.tar.bz2 artifacts
- name: upload Linux LLVM artifacts
uses: actions/upload-artifact@v3
with:
name: linux
path: artifacts-linux-llvm.tar.bz2
build_xautils_linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Xamarin.Android Utilities build dependencies
run: >-
sudo apt-get update;
sudo apt-get -f -u install mingw-w64 cmake ninja-build xz-utils zlib1g-dev libz-mingw-w64-dev
- name: build Linux and Windows Xamarin.Android Utilities
run: ./build-xa-utils.sh
env:
CC: gcc-10
CXX: g++-10
- name: package Xamarin.Android Utilities config and build logs
if: ${{ always() }}
run: find ${BUILD_DIR} -name 'CMakeCache.txt' -o -name 'CMake*.log' | zip -9 build-logs-linux-xa-utils.zip -@
- name: upload Xamarin.Android Utilities config and build logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: build-logs
path: build-logs-linux-xa-utils.zip
- name: package Xamarin.Android Utilities artifacts
run: tar cjf artifacts-linux-xa-utils.tar.bz2 artifacts
- name: upload Linux and Windows Xamarin.Android Utilities artifacts
uses: actions/upload-artifact@v3
with:
name: linux
path: artifacts-linux-xa-utils.tar.bz2
build_llvm_macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install LLVM build dependencies
run: |
brew update
brew install cmake ninja ccache
- name: build macOS LLVM
run: bash ./build-llvm.sh
- name: package LLVM config and build logs
if: ${{ always() }}
run: find ${BUILD_DIR} -name 'config.*' -o -name '*.log' -o -name 'CMakeCache.txt' | zip -9 build-logs-macos-llvm.zip -@
- name: upload LLVM config and build logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: build-logs
path: build-logs-macos-llvm.zip
- name: package LLVM artifacts
run: tar cjf artifacts-macos-llvm.tar.bz2 artifacts
- name: upload macOS LLVM artifacts
uses: actions/upload-artifact@v3
with:
name: macOS
path: artifacts-macos-llvm.tar.bz2
build_xautils_macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Xamarin.Android Utilities build dependencies
run: |
brew update
brew install make cmake xz ninja
- name: build macOS Xamarin.Android Utilities
run: bash ./build-xa-utils.sh
- name: package Xamarin.Android Utilities config and build logs
if: ${{ always() }}
run: find ${BUILD_DIR} -name 'CMakeCache.txt' -o -name 'CMake*.log' | zip -9 build-logs-macos-xa-utils.zip -@
- name: upload Xamarin.Android Utilities config and build logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: build-logs
path: build-logs-macos-xa-utils.zip
- name: package Xamarin.Android Utilities artifacts
run: tar cjf artifacts-macos-xa-utils.tar.bz2 artifacts
- name: upload macOS Xamarin.Android Utilities artifacts
uses: actions/upload-artifact@v3
with:
name: macOS
path: artifacts-macos-xa-utils.tar.bz2
build_llvm_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: build Windows LLVM
run: ./build-llvm.cmd
# - name: Download UPX
# run: ./download-upx.ps1
# - name: Compress LLVM utilities with UPX
# run: |
# ./upx.exe -9 -v .\artifacts\windows\bin\llc.exe
# ./upx.exe -9 -v .\artifacts\windows\bin\lld.exe
# ./upx.exe -9 -v .\artifacts\windows\bin\llvm-mc.exe
# ./upx.exe -9 -v .\artifacts\windows\bin\llvm-strip.exe
- name: package LLVM artifacts
run: 7z a artifacts-windows-llvm.7z artifacts
- name: upload Windows LLVM artifacts
uses: actions/upload-artifact@v3
with:
name: Windows
path: artifacts-windows-llvm.7z
package_binaries:
runs-on: ubuntu-20.04
needs: [build_llvm_linux, build_xautils_linux, build_llvm_macos, build_xautils_macos, build_llvm_windows]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Download Linux artifacts
uses: actions/download-artifact@v3
with:
name: linux
- name: Download macOS artifacts
uses: actions/download-artifact@v3
with:
name: macOS
- name: Download Windows artifacts
uses: actions/download-artifact@v3
with:
name: Windows
- name: Unpack Linux artifacts
run: |
tar xf artifacts-linux-llvm.tar.bz2
tar xf artifacts-linux-xa-utils.tar.bz2
- name: Unpack macOS artifacts
run: |
tar xf artifacts-macos-llvm.tar.bz2
tar xf artifacts-macos-xa-utils.tar.bz2
- name: Unpack Windows artifacts
run: |
7z x artifacts-windows-llvm.7z
- name: Package Linux, macOS and Windows artifacts
run: ./package.sh
- name: upload Xamarin.Android Toolchain
uses: actions/upload-artifact@v3
with:
name: Xamarin.Android
path: artifacts/xamarin-android-toolchain.tar.bz2