forked from os-fpga/FOEDAG
-
Notifications
You must be signed in to change notification settings - Fork 0
314 lines (259 loc) · 8.02 KB
/
build.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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
name: 'build'
on:
push:
branches:
- 'develop'
pull_request:
branches:
- 'develop'
workflow_dispatch:
jobs:
build-msys2:
strategy:
fail-fast: false
matrix:
include:
- msystem: mingw64
env: x86_64
runner: windows-2022
os: windows
arch: x86-64
- msystem: ucrt64
env: ucrt-x86_64
runner: windows-2022
os: windows
arch: x86-64
# disabled clang64 build, as it will not work for us.
# - msystem: clang64
# env: clang-x86_64
# runner: windows-2022
runs-on: ${{ matrix.runner }}
name: build ${{ matrix.os }}-${{ matrix.arch }} ${{ matrix.msystem }}
defaults:
run:
shell: msys2 {0}
#shell: C:\msys64\msys2_shell.cmd -mingw64 -defterm -here -no-start {0}
steps:
- name: Cancel Previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout Repo
uses: actions/[email protected]
with:
token: ${{ secrets.QL_PRIVATE_TOKEN }}
submodules: recursive
fetch-depth: 0
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
path-type: minimal
update: true
release: false
install: >-
base-devel
git
wget
mingw-w64-${{ matrix.env }}-toolchain
mingw-w64-${{ matrix.env }}-cmake
mingw-w64-${{ matrix.env }}-tcl
mingw-w64-${{ matrix.env }}-zlib
mingw-w64-${{ matrix.env }}-swig
mingw-w64-${{ matrix.env }}-qt5-base-debug
mingw-w64-${{ matrix.env }}-qt5
mingw-w64-${{ matrix.env }}-qt5-declarative-debug
mingw-w64-${{ matrix.env }}-ninja
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.8
architecture: x64
- name: Print Python Path
run: |
echo $(cygpath -u "${{ env.pythonLocation }}")
ls $(cygpath -u "${{ env.pythonLocation }}")
- name: Install Python Dependencies
run: |
PATH=$(cygpath -u "${{ env.pythonLocation }}"):${PATH}
- name: Show Shell Configuration
run: |
PATH=$(cygpath -u "${{ env.pythonLocation }}"):${PATH}
which git && git --version || true
which cmake && cmake --version || true
which make && make --version || true
which python && python --version || true
which ninja && ninja --version || true
which tclsh && echo 'puts [info patchlevel];exit 0' | tclsh || true
- name: Print Compiler Info
run: |
printf "\n"
printf "$(which gcc)\n"
printf "$(gcc -v)\n"
printf "\n"
printf "$(which g++)\n"
printf "$(g++ -v)\n"
printf "\n"
printf "$(which ld)\n"
printf "$(ld -v)\n"
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Print Repo HEAD
run: |
echo && echo "git last log" && git log -1
# https://sourceforge.net/p/mingw/mailman/message/5690922/
# https://github.com/capnproto/capnproto/issues/1458
- name: Build
run: |
#
export COMMIT_SHA1=$(git -C ${PWD} rev-parse --short HEAD)
echo "COMMIT_SHA1=${COMMIT_SHA1}" >> $GITHUB_ENV
printf "COMMIT_SHA1=${COMMIT_SHA1}\n"
#
make -f Makefile.au install -j$(nproc)
- name: Create Package
run: |
make -f Makefile.au package
- name: Upload FOEDAG Package
uses: actions/[email protected]
if: ${{ success() }}
with:
name: aurora-build-${{ env.COMMIT_SHA1 }}-${{ matrix.msystem }}
retention-days: 2
path: aurora-${{ env.COMMIT_SHA1 }}-${{ matrix.msystem }}.7z
overwrite: true
build-msvc:
if: ${{ false }} # disabled MSVC build, as it will not work for us.
runs-on: windows-2022
name: build windows-x86-64 msvc
defaults:
run:
shell: cmd
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
# Fix Cmake version, 3.21.4 has a bug that prevents Tcl to build
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.21.3'
- name: Use cmake
run: cmake --version
- name: Install Core Dependencies
run: |
choco install -y make
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.8
architecture: x64
- name: Install libusb with vcpkg
run: |
C:\vcpkg\vcpkg.exe install libusb:x64-windows
C:\vcpkg\vcpkg.exe integrate install
- name: Install nasm with choco
run: |
choco install -y nasm
ls "C:\Program Files\NASM"
- name: Install Qt
uses: jurplel/[email protected]
- run: git config --global core.autocrlf input
shell: bash
- uses: actions/[email protected]
with:
token: ${{ secrets.QL_PRIVATE_TOKEN }}
submodules: recursive
fetch-depth: 0
- name: Build & Test
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set CMAKE_GENERATOR=Ninja
set CC=cl
set CXX=cl
set NO_TCMALLOC=On
set PREFIX=%GITHUB_WORKSPACE%\install
set CPU_CORES=%NUMBER_OF_PROCESSORS%
set MAKE_DIR=C:\make\bin
set PATH=%pythonLocation%;%MAKE_DIR%;%PATH%
set
where cmake && cmake --version
where make && make --version
where python && python --version
where ninja && ninja --version
make -f Makefile.au install
- name: Create Package
run: |
make -f Makefile.au package
- name: Upload FOEDAG Package
uses: actions/[email protected]
if: ${{ false }}
with:
name: aurora-build-${{ env.COMMIT_SHA1 }}-msvc
retention-days: 2
path: aurora-${{ env.COMMIT_SHA1 }}-msvc.7z
overwrite: true
build-linux:
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-20.04
install_script: install_dependencies_build_ubuntu2004.sh
os: linux
arch: x86-64
- runner: ubuntu-22.04
install_script: install_dependencies_build_ubuntu2204.sh
os: linux
arch: x86-64
runs-on: ${{ matrix.runner }}
name: build ${{ matrix.os }}-${{ matrix.arch }} ${{ matrix.runner }}
defaults:
run:
shell: bash
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout Repo
uses: actions/[email protected]
with:
token: ${{ secrets.QL_PRIVATE_TOKEN }}
submodules: recursive
fetch-depth: 0
- name: Install Python Dependencies
run: |
sudo bash ./.github/workflows/${{ matrix.install_script }}
- name: Show Shell Configuration
run: |
which git && git --version || true
which cmake && cmake --version || true
which make && make --version || true
which python && python --version || true
which ninja && ninja --version || true
which tclsh && echo 'puts [info patchlevel];exit 0' | tclsh || true
- name: Print Compiler Info
run: |
printf "\n"
printf "$(which gcc)\n"
printf "$(gcc -v)\n"
printf "\n"
printf "$(which g++)\n"
printf "$(g++ -v)\n"
printf "\n"
printf "$(which ld)\n"
printf "$(ld -v)\n"
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Print Repo HEAD
run: |
echo && echo "git last log" && git log -1
- name: Build
run: |
make -f Makefile.au install -j$(nproc)