Skip to content

Commit 3501bca

Browse files
committed
ci: Move "Windows cross" job from Cirrus CI to GHA CI
This change is required for testing cross-built executables on Windows natively.
1 parent f861919 commit 3501bca

File tree

2 files changed

+47
-12
lines changed

2 files changed

+47
-12
lines changed

.cirrus.yml

-9
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,6 @@ task:
124124
env:
125125
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
126126

127-
task:
128-
name: 'Win64-cross'
129-
<< : *GLOBAL_TASK_TEMPLATE
130-
persistent_worker:
131-
labels:
132-
type: small
133-
env:
134-
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
135-
136127
task:
137128
name: 'CentOS, depends, gui'
138129
<< : *GLOBAL_TASK_TEMPLATE

.github/workflows/ci.yml

+47-3
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
157157
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }}
158158

159-
win64-native:
159+
windows-native:
160160
name: ${{ matrix.job-name }}
161161
# Use latest image, but hardcode version to avoid silent upgrades (and breaks).
162162
# See: https://github.com/actions/runner-images#available-images.
@@ -175,10 +175,10 @@ jobs:
175175
include:
176176
- job-type: standard
177177
generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
178-
job-name: 'Win64 native, VS 2022'
178+
job-name: 'Windows native, VS 2022'
179179
- job-type: fuzz
180180
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
181-
job-name: 'Win64 native fuzz, VS 2022'
181+
job-name: 'Windows native, fuzz, VS 2022'
182182

183183
steps:
184184
- name: Checkout
@@ -268,6 +268,50 @@ jobs:
268268
run: |
269269
py -3 test/fuzz/test_runner.py --par $NUMBER_OF_PROCESSORS --loglevel DEBUG "${RUNNER_TEMP}/qa-assets/fuzz_corpora"
270270
271+
windows-cross:
272+
name: 'Linux->Windows cross, unit tests, no gui tests, no functional tests'
273+
runs-on: ubuntu-latest
274+
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
275+
276+
env:
277+
FILE_ENV: './ci/test/00_setup_env_win64.sh'
278+
DANGER_CI_ON_HOST_FOLDERS: 1
279+
280+
steps:
281+
- name: Checkout
282+
uses: actions/checkout@v4
283+
284+
- name: Set CI directories
285+
run: |
286+
echo "CCACHE_DIR=${{ runner.temp }}/ccache_dir" >> "$GITHUB_ENV"
287+
echo "BASE_ROOT_DIR=${{ runner.temp }}" >> "$GITHUB_ENV"
288+
echo "DEPENDS_DIR=${{ runner.temp }}/depends" >> "$GITHUB_ENV"
289+
echo "BASE_BUILD_DIR=${{ runner.temp }}/build" >> "$GITHUB_ENV"
290+
291+
- name: Depends cache
292+
uses: actions/cache@v4
293+
with:
294+
path: ${{ env.DEPENDS_DIR }}/built
295+
key: ${{ github.job }}-depends-${{ hashFiles('depends/**', 'ci/test/00_setup_env_win64.sh') }}
296+
297+
- name: Restore Ccache cache
298+
id: ccache-cache
299+
uses: actions/cache/restore@v4
300+
with:
301+
path: ${{ env.CCACHE_DIR }}
302+
key: ${{ github.job }}-ccache-${{ github.run_id }}
303+
restore-keys: ${{ github.job }}-ccache-
304+
305+
- name: CI script
306+
run: ./ci/test_run_all.sh
307+
308+
- name: Save Ccache cache
309+
uses: actions/cache/save@v4
310+
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
311+
with:
312+
path: ${{ env.CCACHE_DIR }}
313+
key: ${{ github.job }}-ccache-${{ github.run_id }}
314+
271315
asan-lsan-ubsan-integer-no-depends-usdt:
272316
name: 'ASan + LSan + UBSan + integer, no depends, USDT'
273317
runs-on: ubuntu-24.04 # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools

0 commit comments

Comments
 (0)