-
Notifications
You must be signed in to change notification settings - Fork 37
260 lines (237 loc) · 9.47 KB
/
build.yml
File metadata and controls
260 lines (237 loc) · 9.47 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
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
name: Continuous Integration
on:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- 'doc/**'
- 'contrib/**'
- '**/*.md'
jobs:
build:
name: ${{ matrix.name }}
env:
MAKEJOBS: "-j3"
CHECK_DOC: "0"
CCACHE_SIZE: "100M"
CCACHE_TEMPDIR: /tmp/.ccache-temp
CCACHE_COMPRESS: "1"
PYTHON_DEBUG: "1"
CACHE_NONCE: "1"
WINEDEBUG: fixme-all
WINEPREFIX: /tmp/wineprefix/
SDK_URL: https://depends.dogecoincore.org
strategy:
fail-fast: false
matrix:
name:
- aarch64-linux
- aarch64-linux-experimental
- armhf-linux
- x86_64-linux-dbg
- x86_64-linux-nowallet
- x86_64-macos
- x86_64-win
- x86_64-win-experimental
- x86_64-linux-experimental
include:
- name: armhf-linux
host: arm-linux-gnueabihf
container: ubuntu:20.04
packages: g++-arm-linux-gnueabihf qemu-user-static qemu-user
run-bench: false
check-security: true
check-symbols: true
dep-opts: "NO_QT=1"
config-opts: "--enable-glibc-back-compat --disable-tests LDFLAGS=-static-libstdc++"
goal: install
- name: aarch64-linux-experimental
host: aarch64-linux-gnu
container: ubuntu:20.04
packages: g++-aarch64-linux-gnu qemu-user-static qemu-user
run-bench: false
check-security: true
check-symbols: false
dep-opts: "NO_QT=1"
config-opts: "--with-armv8-crypto --with-armv82-crypto --enable-zmq --enable-glibc-back-compat --disable-tests LDFLAGS=-static-libstdc++ --enable-c++14"
goal: install
- name: aarch64-linux
host: aarch64-linux-gnu
container: ubuntu:20.04
packages: g++-aarch64-linux-gnu qemu-user-static qemu-user
run-bench: false
check-security: true
check-symbols: true
dep-opts: "NO_QT=1"
config-opts: "--enable-zmq --enable-glibc-back-compat --disable-tests LDFLAGS=-static-libstdc++"
goal: install
- name: x86_64-linux-nowallet
host: x86_64-unknown-linux-gnu
container: ubuntu:20.04
packages: python3
run-bench: false
check-security: true
check-symbols: true
dep-opts: "NO_WALLET=1"
config-opts: "--with-gui=qt5 --enable-glibc-back-compat --disable-wallet --disable-tests LDFLAGS=-static-libstdc++"
goal: install
- name: x86_64-linux-dbg
host: x86_64-unknown-linux-gnu
container: ubuntu:20.04
packages: bc python3-zmq
run-bench: false
check-security: true
check-symbols: false
dep-opts: "DEBUG=1"
config-opts: "--with-gui=qt5 --enable-zmq --enable-glibc-back-compat --disable-tests CPPFLAGS=-DDEBUG_LOCKORDER"
goal: install
- name: x86_64-win
host: x86_64-w64-mingw32
container: ubuntu:20.04
container-options: --privileged
packages: python3 nsis g++-mingw-w64-x86-64 wine64 bc wine-binfmt
postinstall: |
update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
update-binfmts --import /usr/share/binfmts/wine
update-binfmts --enable
update-binfmts --display
run-bench: false
check-security: true
check-symbols: true
dep-opts: ""
config-opts: "--enable-gui=qt5 --disable-tests"
goal: install
- name: x86_64-win-experimental
host: x86_64-w64-mingw32
container: ubuntu:20.04
container-options: --privileged
packages: python3 nsis g++-mingw-w64-x86-64 wine64 bc wine-binfmt
postinstall: |
update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
update-binfmts --import /usr/share/binfmts/wine
update-binfmts --enable
update-binfmts --display
run-bench: false
check-security: true
check-symbols: false
dep-opts: "AVX2=1 MINGW=1"
config-opts: " --with-intel-avx2 --with-gui=qt5 --enable-c++14 --disable-tests"
goal: install
- name: x86_64-macos
host: x86_64-apple-darwin11
container: ubuntu:20.04
packages: cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools libtinfo5 xorriso
run-bench: false
check-security: true
check-symbols: false
dep-opts: ""
config-opts: "--with-gui=qt5 --disable-tests"
goal: deploy
sdk: 10.11
sdk-shasum: "bec9d089ebf2e2dd59b1a811a38ec78ebd5da18cbbcd6ab39d1e59f64ac5033f"
- name: x86_64-linux-experimental
host: x86_64-linux-gnu
container: ubuntu:20.04
packages: bc python3-zmq
run-bench: false
dep-opts: "AVX2=1"
config-opts: " --with-intel-avx2 --with-gui=qt5 --enable-zmq --enable-glibc-back-compat --enable-reduce-exports --enable-c++14 --disable-tests"
goal: install
runs-on: ubuntu-24.04
container:
image: ${{ matrix.container }}
options: ${{ matrix.container-options == '' && '-e UNO' || matrix.container-options }}
steps:
- name: Configure container
run: |
ln -snf /usr/share/zoneinfo/Etc/UTC /etc/localtime
echo Etc/UTC > /etc/timezone
mkdir -p $WINEPREFIX
uname -a
- name: Pre install
if: ${{ matrix.preinstall }}
run: ${{ matrix.preinstall }}
- name: Install packages
run: |
apt-get update
apt-get install -y build-essential libtool autotools-dev automake \
pkg-config bsdmainutils curl ca-certificates ccache rsync git \
procps bison python3 python3-pip python3-setuptools python3-wheel
apt-get install -y ${{ matrix.packages }}
python3 -m pip install setuptools==70.3.0 --upgrade
python3 -m pip install lief
- name: Post install
if: ${{ matrix.postinstall }}
run: ${{ matrix.postinstall }}
- name: Checkout
uses: actions/checkout@v4
- name: SDK cache
if: ${{ matrix.sdk }}
uses: actions/cache@v4
env:
cache-name: sdk
with:
path: ./depends/sdk-sources
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('.github/workflows/build.yml') }}
- name: Install SDK
if: ${{ matrix.sdk }}
env:
sdk-filename: MacOSX${{ matrix.sdk }}.sdk.tar.gz
run: |
mkdir -p ./depends/sdk-sources
mkdir -p ./depends/SDKs
echo "${{ matrix.sdk-shasum }} depends/sdk-sources/${{ env.sdk-filename }}" | sha256sum -c || \
curl --location --fail $SDK_URL/${{ env.sdk-filename }} -o depends/sdk-sources/${{ env.sdk-filename }} &&\
echo "${{ matrix.sdk-shasum }} depends/sdk-sources/${{ env.sdk-filename }}" | sha256sum -c
tar -C depends/SDKs -xf depends/sdk-sources/${{ env.sdk-filename }}
- name: Dependency cache
uses: actions/cache@v4
env:
cache-name: depends
with:
path: ./depends/built
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('depends/packages/*', '.github/workflows/build.yml') }}
- name: Build depends
run: |
make $MAKEJOBS -C depends HOST=${{ matrix.host }} ${{ matrix.dep-opts }}
- name: CCache
uses: actions/cache@v4
env:
cache-name: ccache
with:
path: ~/.ccache
key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('**/configure.ac', '.github/workflows/build.yml') }}
- name: Build Unobtanium
run: |
depends/${{ matrix.host }}/native/bin/ccache --max-size=$CCACHE_SIZE
./autogen.sh
./configure --prefix=`pwd`/depends/${{ matrix.host }} ${{ matrix.config-opts }} --enable-reduce-exports || ( cat config.log && false)
make $MAKEJOBS ${{ matrix.goal }} || ( echo "Build failure. Verbose build follows." && make ${{ matrix.goal }} V=1 ; false )
- name: Run benchmark
if: ${{ matrix.run-bench }}
run: |
src/bench/bench_unobtanium > ${{ matrix.name }}-bench.csv
cat ${{ matrix.name }}-bench.csv
- name: Run tests
if: ${{ matrix.test-script }}
run: ${{ matrix.test-script }}
- name: Check security
if: ${{ matrix.check-security }}
run: make -C src check-security
- name: Check symbols
if: ${{ matrix.check-symbols }}
run: make -C src check-symbols
- name: Cleanup qa artifacts
run: |
rm -rf qa/cache || true
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: unobtanium-${{ github.sha }}-${{ matrix.name }}
path: |
depends/${{ matrix.host }}/bin/unobtanium*
dist/Unobtanium-Qt.app
${{ matrix.name }}-bench.csv