From 041cfc9a44fee1471924e875341c439b3ffea7f8 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:50:21 +0000 Subject: [PATCH] ci: Move "Windows cross" job from Cirrus CI to GHA CI This change is required for testing cross-built executables on Windows natively. --- .cirrus.yml | 9 -------- .github/workflows/ci.yml | 50 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2a3cb1c6d9a37..c7ab7b742deae 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -130,15 +130,6 @@ task: env: FILE_ENV: "./ci/test/00_setup_env_arm.sh" -task: - name: 'Win64-cross' - << : *GLOBAL_TASK_TEMPLATE - persistent_worker: - labels: - type: small - env: - FILE_ENV: "./ci/test/00_setup_env_win64.sh" - task: name: '32-bit CentOS, dash, gui' << : *GLOBAL_TASK_TEMPLATE diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 680c566e42c90..90dac75badfcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,7 @@ jobs: # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }} - win64-native: + windows-native: name: ${{ matrix.job-name }} # Use latest image, but hardcode version to avoid silent upgrades (and breaks). # See: https://github.com/actions/runner-images#available-images. @@ -165,10 +165,10 @@ jobs: include: - job-type: standard generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON' - job-name: 'Win64 native, VS 2022' + job-name: 'Windows native, VS 2022' - job-type: fuzz generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON' - job-name: 'Win64 native fuzz, VS 2022' + job-name: 'Windows native, fuzz, VS 2022' steps: - name: Checkout @@ -259,6 +259,50 @@ jobs: run: | py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_corpora + windows-cross: + name: 'Windows cross, unit tests, no gui tests, no functional tests' + runs-on: ubuntu-latest + if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }} + + env: + FILE_ENV: './ci/test/00_setup_env_win64.sh' + DANGER_CI_ON_HOST_FOLDERS: 1 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set CI directories + run: | + echo "CCACHE_DIR=${{ runner.temp }}/ccache_dir" >> "$GITHUB_ENV" + echo "BASE_ROOT_DIR=${{ runner.temp }}" >> "$GITHUB_ENV" + echo "DEPENDS_DIR=${{ runner.temp }}/depends" >> "$GITHUB_ENV" + echo "BASE_BUILD_DIR=${{ runner.temp }}/build" >> "$GITHUB_ENV" + + - name: Depends cache + uses: actions/cache@v4 + with: + path: ${{ env.DEPENDS_DIR }}/built + key: ${{ github.job }}-depends-${{ hashFiles('depends/**', 'ci/test/00_setup_env_win64.sh') }} + + - name: Restore Ccache cache + id: ccache-cache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ${{ github.job }}-ccache-${{ github.run_id }} + restore-keys: ${{ github.job }}-ccache- + + - name: CI script + run: ./ci/test_run_all.sh + + - name: Save Ccache cache + uses: actions/cache/save@v4 + if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true' + with: + path: ${{ env.CCACHE_DIR }} + key: ${{ github.job }}-ccache-${{ github.run_id }} + asan-lsan-ubsan-integer-no-depends-usdt: name: 'ASan + LSan + UBSan + integer, no depends, USDT' runs-on: ubuntu-24.04 # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools