-
Notifications
You must be signed in to change notification settings - Fork 514
474 lines (419 loc) · 21 KB
/
vcpkg_test.yml
File metadata and controls
474 lines (419 loc) · 21 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
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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
# This file is part of BOINC.
# https://boinc.berkeley.edu
# Copyright (C) 2025 University of California
#
# BOINC is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
#
# BOINC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with BOINC. If not, see <http://www.gnu.org/licenses/>.
name: vcpkg test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
AWS_DEFAULT_REGION: us-west-2
jobs:
get-hash:
name: Get hash
runs-on: ubuntu-latest
outputs:
revision_hash: ${{ steps.get_hash.outputs.revision_hash }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 2
- name: Download revision archive
run: |
curl -L -o boinc.tar.gz "https://github.com/BOINC/boinc/archive/${{ github.ref }}.tar.gz"
- name: Get hash
id: get_hash
run: |
echo "revision_hash=$(sha512sum boinc.tar.gz | awk '{ print $1 }')" >> $GITHUB_OUTPUT
android:
name: Android
runs-on: ubuntu-latest
needs: get-hash
strategy:
matrix:
triplet: [ 'arm-android', 'arm-neon-android', 'arm64-android', 'x64-android', 'x86-android' ]
ndk: [ 'r23c', 'r27c' ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 2
- name: Check if build is running from origin repo
if: ${{ success() && env.AWS_ACCESS_KEY_ID != 0 && env.AWS_SECRET_ACCESS_KEY != 0 }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws,s3://vcpkg.cache.boinc/,readwrite" >> $GITHUB_ENV
- name: Check if build is running from fork
if: ${{ success() && (env.AWS_ACCESS_KEY_ID == 0 || env.AWS_SECRET_ACCESS_KEY == 0) }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws-config,no-sign-request;x-aws,s3://vcpkg.cache.boinc/,read" >> $GITHUB_ENV
- name: Fix portfile
env:
revision_hash: ${{ needs.get-hash.outputs.revision_hash }}
run: |
python ./tests/vcpkg/portfilefix.py "${{ github.ref }}" "${{ env.revision_hash }}"
- name: Set up vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
- name: Install Android NDK
run: |
curl -L -o android-ndk.zip https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk }}-linux.zip
unzip android-ndk.zip
- name: Prepare build
run: |
mkdir -p tests/vcpkg/build
- name: Configure arm build
if: ${{ matrix.triplet == 'arm-android' && matrix.ndk == 'r23c' }}
run: |
export ANDROID_NDK_HOME=$(pwd)/android-ndk-${{ matrix.ndk }}
echo "ANDROID_NDK_HOME=${ANDROID_NDK_HOME}" >> $GITHUB_ENV
toolchain_root="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64"
tc_binaries="${toolchain_root}/bin"
tc_includes="${ANDROID_NDK_HOME}/arm-linux-androideabi"
export PATH="${tc_includes}:${tc_binaries}:${PATH}"
echo "PATH=${PATH}" >> $GITHUB_ENV
sysroot="${toolchain_root}/sysroot/"
includes="${ANDROID_NDK_HOME}/arm-linux-androideabi/"
CC="armv7a-linux-androideabi28-clang"
CXX="armv7a-linux-androideabi28-clang++"
LD="armv7a-linux-androideabi28-ld"
CFLAGS="--sysroot=${sysroot} -I${includes}/include -O3 -fomit-frame-pointer -fPIE -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID_ABI=armeabi-v7a"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-L${includes}/usr/lib -L${includes}/lib -fPIE -pie -march=armv7-a -static-libstdc++ -llog -latomic -Wl,--fix-cortex-a8"
cmake -E env CC="${CC}" CXX="${CXX}" LD="${LD}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Configure arm-neon build
if: ${{ matrix.triplet == 'arm-neon-android' }}
run: |
export ANDROID_NDK_HOME="$(pwd)/android-ndk-${{ matrix.ndk }}"
echo "ANDROID_NDK_HOME=${ANDROID_NDK_HOME}" >> $GITHUB_ENV
toolchain_root="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64"
tc_binaries="${toolchain_root}/bin"
tc_includes="${ANDROID_NDK_HOME}/arm-linux-androideabi"
export PATH="${tc_includes}:${tc_binaries}:${PATH}"
echo "PATH=${PATH}" >> $GITHUB_ENV
sysroot="${toolchain_root}/sysroot/"
includes="${ANDROID_NDK_HOME}/arm-linux-androideabi/"
CC="armv7a-linux-androideabi28-clang"
CXX="armv7a-linux-androideabi28-clang++"
LD="armv7a-linux-androideabi28-ld"
CFLAGS="--sysroot=${sysroot} -I${includes}/include -O3 -fomit-frame-pointer -fPIE -march=armv7-a -mfloat-abi=softfp -mfpu=neon-vfpv3 -DANDROID_ABI=armeabi-v7a"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-L${includes}/usr/lib -L${includes}/lib -fPIE -pie -march=armv7-a -static-libstdc++ -llog -latomic -Wl,--fix-cortex-a8"
cmake -E env CC="${CC}" CXX="${CXX}" LD="${LD}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Configure arm64 build
if: ${{ matrix.triplet == 'arm64-android' }}
run: |
export ANDROID_NDK_HOME="$(pwd)/android-ndk-${{ matrix.ndk }}"
echo "ANDROID_NDK_HOME=${ANDROID_NDK_HOME}" >> $GITHUB_ENV
toolchain_root="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64"
tc_binaries="${toolchain_root}/bin"
tc_includes="${ANDROID_NDK_HOME}/aarch64-linux-android"
export PATH="${tc_includes}:${tc_binaries}:${PATH}"
echo "PATH=${PATH}" >> $GITHUB_ENV
sysroot="${toolchain_root}/sysroot/"
includes="${ANDROID_NDK_HOME}/aarch64-linux-android/"
CC="aarch64-linux-android28-clang"
CXX="aarch64-linux-android28-clang++"
LD="aarch64-linux-android28-ld"
CFLAGS="--sysroot=${sysroot} -I${includes}/include -O3 -fomit-frame-pointer -fPIE -DANDROID_ABI=arm64-v8a"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-L${includes}/usr/lib -L${includes}/lib -fPIE -pie -static-libstdc++ -llog -latomic"
cmake -E env CC="${CC}" CXX="${CXX}" LD="${LD}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Configure x64 build
if: ${{ matrix.triplet == 'x64-android' }}
run: |
export ANDROID_NDK_HOME="$(pwd)/android-ndk-${{ matrix.ndk }}"
echo "ANDROID_NDK_HOME=${ANDROID_NDK_HOME}" >> $GITHUB_ENV
toolchain_root="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64"
tc_binaries="${toolchain_root}/bin"
tc_includes="${ANDROID_NDK_HOME}/x86_64-linux-android"
export PATH="${tc_includes}:${tc_binaries}:${PATH}"
echo "PATH=${PATH}" >> $GITHUB_ENV
sysroot="${toolchain_root}/sysroot/"
includes="${ANDROID_NDK_HOME}/x86_64-linux-android/"
CC="x86_64-linux-android28-clang"
CXX="x86_64-linux-android28-clang++"
LD="x86_64-linux-android28-ld"
CFLAGS="--sysroot=${sysroot} -I${includes}/include -O3 -fomit-frame-pointer -fPIE -DANDROID_ABI=x86_64"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-L${includes}/usr/lib -L${includes}/lib -fPIE -pie -static-libstdc++ -llog -latomic"
cmake -E env CC="${CC}" CXX="${CXX}" LD="${LD}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Configure x86 build
if: ${{ matrix.triplet == 'x86-android' }}
run: |
export ANDROID_NDK_HOME="$(pwd)/android-ndk-${{ matrix.ndk }}"
echo "ANDROID_NDK_HOME=${ANDROID_NDK_HOME}" >> $GITHUB_ENV
toolchain_root="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64"
tc_binaries="${toolchain_root}/bin"
tc_includes="${ANDROID_NDK_HOME}/i686-linux-android"
export PATH="${tc_includes}:${tc_binaries}:${PATH}"
echo "PATH=${PATH}" >> $GITHUB_ENV
sysroot="${toolchain_root}/sysroot/"
includes="${ANDROID_NDK_HOME}/i686-linux-android/"
CC="i686-linux-android28-clang"
CXX="i686-linux-android28-clang++"
LD="i686-linux-android28-ld"
CFLAGS="--sysroot=${sysroot} -I${includes}/include -O3 -fomit-frame-pointer -fPIE -DANDROID_ABI=x86"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-L${includes}/usr/lib -L${includes}/lib -fPIE -pie -static-libstdc++ -llog -latomic"
cmake -E env CC="${CC}" CXX="${CXX}" LD="${LD}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Build
if: ${{ matrix.triplet != 'arm-android' || (matrix.triplet == 'arm-android' && matrix.ndk == 'r23c') }}
run: |
cmake --build tests/vcpkg/build --config Release
- name: Upload logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: vcpkg_test-logs-${{ matrix.triplet }}-${{ matrix.ndk }}
path: vcpkg/buildtrees/**/*.log
linux:
name: Linux
runs-on: ubuntu-latest
needs: get-hash
strategy:
matrix:
triplet: [ 'arm-linux', 'arm64-linux', 'x64-linux', 'x86-linux' ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 2
- name: Install x86 dependencies
if: ${{ matrix.triplet == 'x86-linux' }}
run: |
sudo apt-get update
sudo apt-get install -y g++-multilib gcc-multilib
- name: Install arm dependencies
if: ${{ matrix.triplet == 'arm-linux' }}
run: |
sudo apt-get update
sudo apt-get install -y g++-arm-linux-gnueabihf gcc-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
- name: Install arm64 dependencies
if: ${{ matrix.triplet == 'arm64-linux' }}
run: |
sudo apt-get update
sudo apt-get install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Check if build is running from origin repo
if: ${{ success() && env.AWS_ACCESS_KEY_ID != 0 && env.AWS_SECRET_ACCESS_KEY != 0 }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws,s3://vcpkg.cache.boinc/,readwrite" >> $GITHUB_ENV
- name: Check if build is running from fork
if: ${{ success() && (env.AWS_ACCESS_KEY_ID == 0 || env.AWS_SECRET_ACCESS_KEY == 0) }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws-config,no-sign-request;x-aws,s3://vcpkg.cache.boinc/,read" >> $GITHUB_ENV
- name: Fix portfile
env:
revision_hash: ${{ needs.get-hash.outputs.revision_hash }}
run: |
python ./tests/vcpkg/portfilefix.py "${{ github.ref }}" "${{ env.revision_hash }}"
- name: Set up vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
- name: Prepare build
run: |
mkdir -p tests/vcpkg/build
- name: Configure arm build
if: ${{ matrix.triplet == 'arm-linux' }}
run: |
cmake -E env CC="arm-linux-gnueabihf-gcc" CXX="arm-linux-gnueabihf-g++" LD="arm-linux-gnueabihf-ld" CFLAGS="-march=armv7-a+vfpv3-d16" CXXFLAGS="-march=armv7-a+vfpv3-d16" LDFLAGS="-march=armv7-a+vfpv3-d16" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Configure arm64 build
if: ${{ matrix.triplet == 'arm64-linux' }}
run: |
cmake -E env CC="aarch64-linux-gnu-gcc" CXX="aarch64-linux-gnu-g++" LD="aarch64-linux-gnu-ld" CFLAGS="-march=armv8-a" CXXFLAGS="-march=armv8-a" LDFLAGS="-march=armv8-a" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Configure x64 build
if: ${{ matrix.triplet == 'x64-linux' }}
run: |
cmake -E env CC="gcc -m64" CXX="g++ -m64" CFLAGS="-m64" CXXFLAGS="-m64" LDFLAGS="-m64" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Configure x86 build
if: ${{ matrix.triplet == 'x86-linux' }}
run: |
cmake -E env CC="gcc -m32" CXX="g++ -m32" CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Build
run: |
cmake --build tests/vcpkg/build --config Release
- name: Upload logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: vcpkg_test-logs-${{ matrix.triplet }}
path: vcpkg/buildtrees/**/*.log
macos:
name: macOS
runs-on: macos-latest
needs: get-hash
strategy:
matrix:
triplet: [ 'arm64-osx', 'x64-osx' ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 2
- name: Check if build is running from origin repo
if: ${{ success() && env.AWS_ACCESS_KEY_ID != 0 && env.AWS_SECRET_ACCESS_KEY != 0 }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws,s3://vcpkg.cache.boinc/,readwrite" >> $GITHUB_ENV
- name: Check if build is running from fork
if: ${{ success() && (env.AWS_ACCESS_KEY_ID == 0 || env.AWS_SECRET_ACCESS_KEY == 0) }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws-config,no-sign-request;x-aws,s3://vcpkg.cache.boinc/,read" >> $GITHUB_ENV
- name: Fix portfile
env:
revision_hash: ${{ needs.get-hash.outputs.revision_hash }}
run: |
python ./tests/vcpkg/portfilefix.py "${{ github.ref }}" "${{ env.revision_hash }}"
- name: Set up vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
- name: Prepare build
run: |
mkdir -p tests/vcpkg/build
- name: Configure arm64 build
if: ${{ matrix.triplet == 'arm64-osx' }}
run: |
cmake -B tests/vcpkg/build -S tests/vcpkg/ -DCMAKE_OSX_ARCHITECTURES=arm64 -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Configure x64 build
if: ${{ matrix.triplet == 'x64-osx' }}
run: |
cmake -B tests/vcpkg/build -S tests/vcpkg/ -DCMAKE_OSX_ARCHITECTURES=x86_64 -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Build
run: |
cmake --build tests/vcpkg/build --config Release
- name: Upload logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: vcpkg_test-logs-${{ matrix.triplet }}
path: vcpkg/buildtrees/**/*.log
mingw:
name: MinGW
runs-on: ubuntu-latest
needs: get-hash
strategy:
matrix:
triplet: [ 'x64-mingw-static', 'x86-mingw-static' ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 2
- name: Check if build is running from origin repo
if: ${{ success() && env.AWS_ACCESS_KEY_ID != 0 && env.AWS_SECRET_ACCESS_KEY != 0 }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws,s3://vcpkg.cache.boinc/,readwrite" >> $GITHUB_ENV
- name: Check if build is running from fork
if: ${{ success() && (env.AWS_ACCESS_KEY_ID == 0 || env.AWS_SECRET_ACCESS_KEY == 0) }}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws-config,no-sign-request;x-aws,s3://vcpkg.cache.boinc/,read" >> $GITHUB_ENV
- name: Fix portfile
env:
revision_hash: ${{ needs.get-hash.outputs.revision_hash }}
run: |
python ./tests/vcpkg/portfilefix.py "${{ github.ref }}" "${{ env.revision_hash }}"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y mingw-w64
- name: Set up vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
- name: Prepare build
run: |
mkdir -p tests/vcpkg/build
- name: Configure x64 build
if: ${{ matrix.triplet == 'x64-mingw-static' }}
run: |
cmake -E env CC="x86_64-w64-mingw32-gcc" CXX="x86_64-w64-mingw32-g++" LD="x86_64-w64-mingw32-ld" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Configure x86 build
if: ${{ matrix.triplet == 'x86-mingw-static' }}
run: |
cmake -E env CC="i686-w64-mingw32-gcc" CXX="i686-w64-mingw32-g++" LD="i686-w64-mingw32-ld" cmake -B tests/vcpkg/build -S tests/vcpkg/ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Build
run: |
cmake --build tests/vcpkg/build --config Release
- name: Upload logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: vcpkg_test-logs-${{ matrix.triplet }}
path: vcpkg/buildtrees/**/*.log
windows:
name: Windows
runs-on: windows-latest
needs: get-hash
strategy:
matrix:
triplet: [ 'x64-windows-static', 'x86-windows-static' ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 2
- name: Check if build is running from origin repo
if: ${{success() && env.AWS_ACCESS_KEY_ID != 0 && env.AWS_SECRET_ACCESS_KEY != 0}}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws,s3://vcpkg.cache.boinc/,readwrite" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
- name: Check if build is running from fork
if: ${{success() && (env.AWS_ACCESS_KEY_ID == 0 || env.AWS_SECRET_ACCESS_KEY == 0)}}
run: |
echo "VCPKG_BINARY_SOURCES=clear;x-aws-config,no-sign-request;x-aws,s3://vcpkg.cache.boinc/,read" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
- name: Fix portfile
env:
revision_hash: ${{ needs.get-hash.outputs.revision_hash }}
run: |
python ./tests/vcpkg/portfilefix.py "${{ github.ref }}" "${{ env.revision_hash }}"
- name: Set up vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
vcpkg/bootstrap-vcpkg.bat
- name: Prepare build
run: |
mkdir -p tests/vcpkg/build
- name: Configure x64 build
if: ${{ matrix.triplet == 'x64-windows-static' }}
run: |
cmake -B tests/vcpkg/build -S tests/vcpkg/ -A x64 -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Configure x86 build
if: ${{ matrix.triplet == 'x86-windows-static' }}
run: |
cmake -B tests/vcpkg/build -S tests/vcpkg/ -A Win32 -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
- name: Build
run: |
cmake --build tests/vcpkg/build --config Release
- name: Upload logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
with:
name: vcpkg_test-logs-${{ matrix.triplet }}
path: vcpkg/buildtrees/**/*.log