Skip to content

Commit 3ddb7d2

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 aa0df0e commit 3ddb7d2

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
@@ -130,15 +130,6 @@ task:
130130
env:
131131
FILE_ENV: "./ci/test/00_setup_env_arm.sh"
132132

133-
task:
134-
name: 'Win64-cross'
135-
<< : *GLOBAL_TASK_TEMPLATE
136-
persistent_worker:
137-
labels:
138-
type: small
139-
env:
140-
FILE_ENV: "./ci/test/00_setup_env_win64.sh"
141-
142133
task:
143134
name: 'CentOS, depends, gui'
144135
<< : *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
@@ -270,6 +270,50 @@ jobs:
270270
shell: cmd
271271
run: py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_corpora
272272

273+
windows-cross:
274+
name: 'Linux->Windows cross, unit tests, no gui tests, no functional tests'
275+
runs-on: ubuntu-latest
276+
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
277+
278+
env:
279+
FILE_ENV: './ci/test/00_setup_env_win64.sh'
280+
DANGER_CI_ON_HOST_FOLDERS: 1
281+
282+
steps:
283+
- name: Checkout
284+
uses: actions/checkout@v4
285+
286+
- name: Set CI directories
287+
run: |
288+
echo "CCACHE_DIR=${{ runner.temp }}/ccache_dir" >> "$GITHUB_ENV"
289+
echo "BASE_ROOT_DIR=${{ runner.temp }}" >> "$GITHUB_ENV"
290+
echo "DEPENDS_DIR=${{ runner.temp }}/depends" >> "$GITHUB_ENV"
291+
echo "BASE_BUILD_DIR=${{ runner.temp }}/build" >> "$GITHUB_ENV"
292+
293+
- name: Depends cache
294+
uses: actions/cache@v4
295+
with:
296+
path: ${{ env.DEPENDS_DIR }}/built
297+
key: ${{ github.job }}-depends-${{ hashFiles('depends/**', 'ci/test/00_setup_env_win64.sh') }}
298+
299+
- name: Restore Ccache cache
300+
id: ccache-cache
301+
uses: actions/cache/restore@v4
302+
with:
303+
path: ${{ env.CCACHE_DIR }}
304+
key: ${{ github.job }}-ccache-${{ github.run_id }}
305+
restore-keys: ${{ github.job }}-ccache-
306+
307+
- name: CI script
308+
run: ./ci/test_run_all.sh
309+
310+
- name: Save Ccache cache
311+
uses: actions/cache/save@v4
312+
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
313+
with:
314+
path: ${{ env.CCACHE_DIR }}
315+
key: ${{ github.job }}-ccache-${{ github.run_id }}
316+
273317
asan-lsan-ubsan-integer-no-depends-usdt:
274318
name: 'ASan + LSan + UBSan + integer, no depends, USDT'
275319
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)