From 7814a9d755497256074e38b7e616af5298e94708 Mon Sep 17 00:00:00 2001 From: Tom Trevethan Date: Thu, 21 May 2026 14:25:53 +0100 Subject: [PATCH 1/7] Create GHA CI and remove Cirrus --- .cirrus.yml | 339 ------ .github/actions/clear-files/action.yml | 12 + .github/actions/configure-docker/action.yml | 63 ++ .../actions/configure-environment/action.yml | 27 + .github/actions/restore-caches/action.yml | 47 + .github/actions/save-caches/action.yml | 39 + .github/workflows/ci.yml | 985 ++++++++++++++++++ ci/test/00_setup_env_lint.sh | 16 + 8 files changed, 1189 insertions(+), 339 deletions(-) delete mode 100644 .cirrus.yml create mode 100644 .github/actions/clear-files/action.yml create mode 100644 .github/actions/configure-docker/action.yml create mode 100644 .github/actions/configure-environment/action.yml create mode 100644 .github/actions/restore-caches/action.yml create mode 100644 .github/actions/save-caches/action.yml create mode 100644 .github/workflows/ci.yml create mode 100755 ci/test/00_setup_env_lint.sh diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 9d59f383224..00000000000 --- a/.cirrus.yml +++ /dev/null @@ -1,339 +0,0 @@ -env: # Global defaults - SECP256K1_TEST_ITERS: 16 # ELEMENTS: avoid test timeouts on arm - PACKAGE_MANAGER_INSTALL: "apt-get update && apt-get install -y" - MAKEJOBS: "-j3" # ELEMENTS: reduced from j4 - TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache - CCACHE_SIZE: "200M" - CCACHE_DIR: "/tmp/ccache_dir" - CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine - -cirrus_ephemeral_worker_template_env: &CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - DANGER_RUN_CI_ON_HOST: "1" # Containers will be discarded after the run, so there is no risk that the ci scripts modify the system - -persistent_worker_template_env: &PERSISTENT_WORKER_TEMPLATE_ENV - RESTART_CI_DOCKER_BEFORE_RUN: "1" - -persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE - persistent_worker: {} # https://cirrus-ci.org/guide/persistent-workers/ - -# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks -filter_template: &FILTER_TEMPLATE - skip: $CIRRUS_REPO_FULL_NAME == "bitcoin-core/gui" && $CIRRUS_PR == "" # No need to run on the read-only mirror, unless it is a PR. https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution - stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks - -base_template: &BASE_TEMPLATE - << : *FILTER_TEMPLATE - merge_base_script: - # Unconditionally install git (used in fingerprint_script) and set the - # default git author name (used in verify-commits.py) - - bash -c "$PACKAGE_MANAGER_INSTALL git" - - git config --global user.email "ci@ci.ci" - - git config --global user.name "ci" - - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi - - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH - - git merge FETCH_HEAD # Merge base to detect silent merge conflicts - -main_template: &MAIN_TEMPLATE - timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out - ccache_cache: - folder: "/tmp/ccache_dir" - ci_script: - - ./ci/test_run_all.sh - -global_task_template: &GLOBAL_TASK_TEMPLATE - << : *BASE_TEMPLATE - container: - # https://cirrus-ci.org/faq/#are-there-any-limits - # Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel - cpu: 2 - greedy: true - memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers - depends_built_cache: - folder: "depends/built" - fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-list -1 HEAD ./depends) - << : *MAIN_TEMPLATE - -macos_native_task_template: &MACOS_NATIVE_TASK_TEMPLATE - << : *BASE_TEMPLATE - check_clang_script: - - clang --version - brew_install_script: - - brew install boost@1.85 libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt - - brew link --force --overwrite boost@1.85 - << : *MAIN_TEMPLATE - -compute_credits_template: &CREDITS_TEMPLATE - # https://cirrus-ci.org/pricing/#compute-credits - # Only use credits for pull requests to the main repo - use_compute_credits: $CIRRUS_REPO_FULL_NAME == 'ElementsProject/elements' && $CIRRUS_PR != "" - -task: - name: 'lint [bionic]' - << : *BASE_TEMPLATE - container: - image: ubuntu:bionic # For python 3.6, oldest supported version according to doc/dependencies.md - cpu: 1 - memory: 1G - # For faster CI feedback, immediately schedule the linters - << : *CREDITS_TEMPLATE - lint_script: - - ./ci/lint_run_all.sh - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - -win64_native_common: &win64_native_common - << : *FILTER_TEMPLATE - windows_container: - cpu: 4 - memory: 8G - image: cirrusci/windowsservercore:visualstudio2019 - timeout_in: 120m - env: - PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin;%PATH%' - PYTHONUTF8: 1 - CI_VCPKG_TAG: '2021.05.12' - VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads' - VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives' - QT_DOWNLOAD_URL: 'https://download.qt.io/archive/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip' - QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip' - QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.3' - QTBASEDIR: 'C:\Qt_static' - x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"' - IgnoreWarnIntDirInTempDetected: 'true' - merge_script: - - git config --global user.email "ci@ci.ci" - - git config --global user.name "ci" - # Windows filesystem loses the executable bit, and all of the executable - # files are considered "modified" now. It will break the following `git merge` - # command. The next two commands make git ignore this issue. - - git config core.filemode false - - git reset --hard - - PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL $env:CIRRUS_BASE_BRANCH; git merge FETCH_HEAD; } - msvc_qt_built_cache: - folder: "%QTBASEDIR%" - reupload_on_changes: false - fingerprint_script: - - echo %QT_DOWNLOAD_URL% - - msbuild -version - populate_script: - - curl -L -o C:\jom.zip https://download.qt.io/official_releases/jom/jom_1_1_2.zip - - mkdir C:\jom - - tar -xf C:\jom.zip -C C:\jom - - curl -L -o %QT_LOCAL_PATH% %QT_DOWNLOAD_URL% - - tar -xf %QT_LOCAL_PATH% -C C:\ - - '%x64_NATIVE_TOOLS%' - - cd %QT_SOURCE_DIR% - - mkdir build - - cd build - - ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix %QTBASEDIR% - - jom - - jom install - vcpkg_tools_cache: - folder: '%VCPKG_DOWNLOADS%\tools' - reupload_on_changes: false - fingerprint_script: - - echo %CI_VCPKG_TAG% - - msbuild -version - vcpkg_binary_cache: - folder: '%VCPKG_DEFAULT_BINARY_CACHE%' - reupload_on_changes: true - fingerprint_script: - - echo %CI_VCPKG_TAG% - - msbuild -version - populate_script: - - mkdir %VCPKG_DEFAULT_BINARY_CACHE% - install_python_script: - - choco install --yes --no-progress python3 --version=3.9.6 - - pip install zmq - - python -VV - install_vcpkg_script: - - cd .. - - git clone --quiet https://github.com/microsoft/vcpkg.git - - cd vcpkg - - git -c advice.detachedHead=false checkout %CI_VCPKG_TAG% - - .\bootstrap-vcpkg -disableMetrics - - echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake - - .\vcpkg integrate install - - .\vcpkg version - build_script: - - cd %CIRRUS_WORKING_DIR% - - python build_msvc\msvc-autogen.py - - msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo - -task: - name: "Win64 native [msvc] (Short running functional tests)" - <<: *win64_native_common - functional_tests_script: - # Increase the dynamic port range to the maximum allowed value to mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted". - # See: https://docs.microsoft.com/en-us/biztalk/technical-guides/settings-that-can-be-modified-to-improve-network-performance - - netsh int ipv4 set dynamicport tcp start=1025 num=64511 - - netsh int ipv6 set dynamicport tcp start=1025 num=64511 - # Heavier tests are moved to a secondary task - # Exclude feature_dbcrash and feature_fee_estimation, failing https://github.com/ElementsProject/elements/pull/1298 - - python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=4000 --jobs=4 --timeout-factor=8 --extended --exclude wallet_avoidreuse,feature_trim_headers,feature_dbcrash,feature_fee_estimation - -task: - name: "Win64 native [msvc] (Long running functional tests + unit tests)" - <<: *win64_native_common - unit_tests_script: - - src\test_elements.exe -l test_suite - - src\bench_elements.exe > NUL - - python test\util\test_runner.py - - python test\util\rpcauth-test.py - functional_tests_script: - # Increase the dynamic port range to the maximum allowed value to mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted". - # See: https://docs.microsoft.com/en-us/biztalk/technical-guides/settings-that-can-be-modified-to-improve-network-performance - - netsh int ipv4 set dynamicport tcp start=1025 num=64511 - - netsh int ipv6 set dynamicport tcp start=1025 num=64511 - # Execute tests excluded from the main task - # Ignore failures for now until https://github.com/ElementsProject/elements/pull/1298 is merged - - python test\functional\test_runner.py --nocleanup --ci --quiet --combinedlogslen=4000 --jobs=4 --timeout-factor=8 wallet_avoidreuse feature_trim_headers feature_dbcrash feature_fee_estimation || true - -task: - name: 'ARM [unit tests, no functional tests] [bullseye]' - << : *GLOBAL_TASK_TEMPLATE - container: - image: debian:bullseye - docker_arguments: - CI_IMAGE_NAME_TAG: debian:bullseye - << : *CREDITS_TEMPLATE - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_arm.sh" - -task: - name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]' - << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:jammy - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_win64.sh" - -task: - name: '32-bit + dash [gui] [Rocky 8]' - << : *GLOBAL_TASK_TEMPLATE - container: - image: quay.io/rockylinux/rockylinux:8 - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - PACKAGE_MANAGER_INSTALL: "yum install -y" - FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh" - -task: - name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [bionic]' - previous_releases_cache: - folder: "releases" - << : *GLOBAL_TASK_TEMPLATE - << : *PERSISTENT_WORKER_TEMPLATE - env: - << : *PERSISTENT_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh" - -task: - name: '[TSan, depends, gui] [2404]' - << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:24.04 - cpu: 6 # Increase CPU and Memory to avoid timeout - memory: 24G - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh" - MAKEJOBS: "-j2" # Avoid excessive memory use due to MSan - -task: - name: '[MSan, depends] [focal]' - << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:focal - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_native_msan.sh" - -task: - name: '[ASan + LSan + UBSan + integer, no depends] [jammy]' - << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:jammy - memory: 16G # ELEMENTS: need more memory - cpu: 4 # ELEMENTS: cirrus wants more CPUs if you want more memory - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_native_asan.sh" - -task: - name: '[fuzzer,address,undefined,integer, no depends] [jammy]' - << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:jammy - cpu: 8 # Increase CPU and memory to avoid timeout - memory: 16G - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh" - -task: - name: '[multiprocess, i686, DEBUG] [focal]' - # Disable for Elements for now; Multiprocess build is not supported or tested and fails CI. - only_if: false - << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:focal - cpu: 4 - memory: 16G # The default memory is sometimes just a bit too small, so double everything - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh" - -task: - name: '[no wallet, libbitcoinkernel] [bionic]' - << : *GLOBAL_TASK_TEMPLATE - container: - image: ubuntu:bionic - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh" - -task: - name: 'macOS 10.15 [gui, no tests] [focal]' - << : *BASE_TEMPLATE - macos_sdk_cache: - folder: "depends/SDKs/$MACOS_SDK" - fingerprint_key: "$MACOS_SDK" - << : *MAIN_TEMPLATE - container: - image: ubuntu:focal - env: - MACOS_SDK: "Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers" - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_mac.sh" - -task: - name: 'macOS 13 native arm64 [gui, sqlite only] [no depends]' - macos_instance: - # Use latest image, but hardcode version to avoid silent upgrades (and breaks) - image: ghcr.io/cirruslabs/macos-runner:sequoia # https://cirrus-ci.org/guide/macOS - << : *MACOS_NATIVE_TASK_TEMPLATE - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - CI_USE_APT_INSTALL: "no" - PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do - FILE_ENV: "./ci/test/00_setup_env_mac_native_arm64.sh" - -task: - name: 'ARM64 Android APK [focal]' - # Disable for Elements; Android build is broken and unsupported. - only_if: false - android_sdk_cache: - folder: "depends/SDKs/android" - fingerprint_key: "ANDROID_API_LEVEL=28 ANDROID_BUILD_TOOLS_VERSION=28.0.3 ANDROID_NDK_VERSION=23.1.7779620" - depends_sources_cache: - folder: "depends/sources" - fingerprint_script: git rev-list -1 HEAD ./depends - << : *MAIN_TEMPLATE - container: - image: ubuntu:focal - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - FILE_ENV: "./ci/test/00_setup_env_android.sh" diff --git a/.github/actions/clear-files/action.yml b/.github/actions/clear-files/action.yml new file mode 100644 index 00000000000..0008f825ff0 --- /dev/null +++ b/.github/actions/clear-files/action.yml @@ -0,0 +1,12 @@ +name: 'Clear unnecessary files' +description: 'Clear out unnecessary files to make space on the VM' +runs: + using: 'composite' + steps: + - name: Clear unnecessary files + shell: bash + env: + DEBIAN_FRONTEND: noninteractive + run: | + set +o errexit + sudo bash -c '(ionice -c 3 nice -n 19 rm -rf /usr/share/dotnet/ /usr/local/graalvm/ /usr/local/.ghcup/ /usr/local/share/powershell /usr/local/share/chromium /usr/local/lib/android /usr/local/lib/node_modules)&' diff --git a/.github/actions/configure-docker/action.yml b/.github/actions/configure-docker/action.yml new file mode 100644 index 00000000000..b4abf7c274a --- /dev/null +++ b/.github/actions/configure-docker/action.yml @@ -0,0 +1,63 @@ +name: 'Configure Docker' +description: 'Set up Docker build driver and configure build cache args' +inputs: + cache-provider: + description: 'gha or cirrus cache provider' + required: true +runs: + using: 'composite' + steps: + - name: Check inputs + shell: python + run: | + # We expect only gha or cirrus as inputs to cache-provider + if "${{ inputs.cache-provider }}" not in ("gha", "cirrus"): + print("::warning title=Unknown input to configure docker action::Provided value was ${{ inputs.cache-provider }}") + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + with: + # Use host network to allow access to cirrus gha cache running on the host + driver-opts: | + network=host + + # This is required to allow buildkit to access the actions cache + - name: Expose actions cache variables + uses: actions/github-script@v8 + with: + script: | + Object.keys(process.env).forEach(function (key) { + if (key.startsWith('ACTIONS_')) { + core.info(`Exporting ${key}`); + core.exportVariable(key, process.env[key]); + } + }); + + - name: Construct docker build cache args + shell: bash + run: | + # Configure docker build cache backend + # + # On forks the gha cache will work but will use Github's cache backend. + # Docker will check for variables $ACTIONS_CACHE_URL, $ACTIONS_RESULTS_URL and $ACTIONS_RUNTIME_TOKEN + # which are set automatically when running on GitHub infra: https://docs.docker.com/build/cache/backends/gha/#synopsis + + # Use cirrus cache host + if [[ ${{ inputs.cache-provider }} == 'cirrus' ]]; then + url_args="url=${CIRRUS_CACHE_HOST},url_v2=${CIRRUS_CACHE_HOST}" + else + url_args="" + fi + + # Always optimistically --cache‑from in case a cache blob exists + args=(--cache-from "type=gha${url_args:+,${url_args}},scope=${CONTAINER_NAME}") + + # Only add --cache-to when using the Cirrus cache provider and pushing to the default branch. + if [[ ${{ inputs.cache-provider }} == 'cirrus' && ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then + args+=(--cache-to "type=gha${url_args:+,${url_args}},mode=max,ignore-error=true,scope=${CONTAINER_NAME}") + fi + + # Always `--load` into docker images (needed when using the `docker-container` build driver). + args+=(--load) + + echo "DOCKER_BUILD_CACHE_ARG=${args[*]}" >> $GITHUB_ENV diff --git a/.github/actions/configure-environment/action.yml b/.github/actions/configure-environment/action.yml new file mode 100644 index 00000000000..e2a26b7184d --- /dev/null +++ b/.github/actions/configure-environment/action.yml @@ -0,0 +1,27 @@ +name: 'Configure environment' +description: 'Configure CI, cache and container name environment variables' +runs: + using: 'composite' + steps: + - name: Set CI and cache directories + shell: bash + run: | + echo "BASE_ROOT_DIR=${{ runner.temp }}" >> "$GITHUB_ENV" + echo "BASE_BUILD_DIR=${{ runner.temp }}/build" >> "$GITHUB_ENV" + echo "CCACHE_DIR=${{ runner.temp }}/ccache_dir" >> $GITHUB_ENV + echo "DEPENDS_DIR=${{ runner.temp }}/depends" >> "$GITHUB_ENV" + echo "BASE_CACHE=${{ runner.temp }}/depends/built" >> $GITHUB_ENV + echo "SOURCES_PATH=${{ runner.temp }}/depends/sources" >> $GITHUB_ENV + echo "PREVIOUS_RELEASES_DIR=${{ runner.temp }}/previous_releases" >> $GITHUB_ENV + + - name: Set cache hashes + shell: bash + run: | + echo "DEPENDS_HASH=$(git ls-tree HEAD depends "$FILE_ENV" | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV + echo "PREVIOUS_RELEASES_HASH=$(git ls-tree HEAD test/get_previous_releases.py | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV + + - name: Get container name + shell: bash + run: | + source $FILE_ENV + echo "CONTAINER_NAME=$CONTAINER_NAME" >> "$GITHUB_ENV" diff --git a/.github/actions/restore-caches/action.yml b/.github/actions/restore-caches/action.yml new file mode 100644 index 00000000000..21f2807f4c7 --- /dev/null +++ b/.github/actions/restore-caches/action.yml @@ -0,0 +1,47 @@ +name: 'Restore Caches' +description: 'Restore ccache, depends sources, and built depends caches' +runs: + using: 'composite' + steps: + - name: Restore Ccache cache + id: ccache-cache + uses: cirruslabs/cache/restore@v5 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }} + restore-keys: | + ccache-${{ env.CONTAINER_NAME }}- + + - name: Restore depends sources cache + id: depends-sources + uses: cirruslabs/cache/restore@v5 + with: + path: ${{ env.SOURCES_PATH }} + key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }} + restore-keys: | + depends-sources-${{ env.CONTAINER_NAME }}- + + - name: Restore built depends cache + id: depends-built + uses: cirruslabs/cache/restore@v5 + with: + path: ${{ env.BASE_CACHE }} + key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }} + restore-keys: | + depends-built-${{ env.CONTAINER_NAME }}- + + - name: Restore previous releases cache + id: previous-releases + uses: cirruslabs/cache/restore@v5 + with: + path: ${{ env.PREVIOUS_RELEASES_DIR }} + key: previous-releases-${{ env.CONTAINER_NAME }}-${{ env.PREVIOUS_RELEASES_HASH }} + restore-keys: | + previous-releases-${{ env.CONTAINER_NAME }}- + + - name: export cache hits + shell: bash + run: | + echo "depends-sources-cache-hit=${{ steps.depends-sources.outputs.cache-hit }}" >> $GITHUB_ENV + echo "depends-built-cache-hit=${{ steps.depends-built.outputs.cache-hit }}" >> $GITHUB_ENV + echo "previous-releases-cache-hit=${{ steps.previous-releases.outputs.cache-hit }}" >> $GITHUB_ENV diff --git a/.github/actions/save-caches/action.yml b/.github/actions/save-caches/action.yml new file mode 100644 index 00000000000..3072ab3f224 --- /dev/null +++ b/.github/actions/save-caches/action.yml @@ -0,0 +1,39 @@ +name: 'Save Caches' +description: 'Save ccache, depends sources, and built depends caches' +runs: + using: 'composite' + steps: + - name: debug cache hit inputs + shell: bash + run: | + echo "depends sources direct cache hit to primary key: ${{ env.depends-sources-cache-hit }}" + echo "depends built direct cache hit to primary key: ${{ env.depends-built-cache-hit }}" + echo "previous releases direct cache hit to primary key: ${{ env.previous-releases-cache-hit }}" + + - name: Save Ccache cache + uses: cirruslabs/cache/save@v5 + if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) }} + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }} + + - name: Save depends sources cache + uses: cirruslabs/cache/save@v5 + if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-sources-cache-hit != 'true') }} + with: + path: ${{ env.SOURCES_PATH }} + key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }} + + - name: Save built depends cache + uses: cirruslabs/cache/save@v5 + if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-built-cache-hit != 'true' )}} + with: + path: ${{ env.BASE_CACHE }} + key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }} + + - name: Save previous releases cache + uses: cirruslabs/cache/save@v5 + if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.previous-releases-cache-hit != 'true' )}} + with: + path: ${{ env.PREVIOUS_RELEASES_DIR }} + key: previous-releases-${{ env.CONTAINER_NAME }}-${{ env.PREVIOUS_RELEASES_HASH }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..f56b77faf79 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,985 @@ +# GitHub Actions CI workflow for ElementsProject/elements + +name: CI +on: + # See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request. + pull_request: + # See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push. + push: + branches: + - '**' + tags-ignore: + - '**' + +# Cancel in-progress runs for the same branch/PR +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + SECP256K1_TEST_ITERS: 16 # ELEMENTS: avoid test timeouts on arm + PACKAGE_MANAGER_INSTALL: "sudo apt-get update && apt-get install -y" + MAKEJOBS: "-j3" # ELEMENTS: reduced from -j4 + TEST_RUNNER_PORT_MIN: "14000" # Must be > 12321 (used for http cache) + CCACHE_SIZE: "200M" + CCACHE_DIR: "/tmp/ccache_dir" + CCACHE_NOHASHDIR: "1" + # Set to your repo full name to enable Cirrus Runners for the primary repo. + # On forks this variable is not matched so jobs fall back to free GH runners. + REPO_USE_CIRRUS_RUNNERS: "ElementsProject/elements" + +jobs: + + # ------------------------------------------------------------------------- + # Lint + # Image: ubuntu:focal (Python 3.6, oldest supported per doc/dependencies.md) + # ------------------------------------------------------------------------- + lint: + name: 'lint [focal]' + runs-on: ${{ github.repository == 'ElementsProject/elements' && fromJSON('["self-hosted","linux","x64"]') || 'ubuntu-latest' }} + timeout-minutes: 120 + env: + FILE_ENV: "./ci/test/00_setup_env_lint.sh" + DANGER_RUN_CI_ON_HOST: "" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Run CI + run: ./ci/test_run_all.sh + + # ------------------------------------------------------------------------- + # ARM unit tests (no functional tests) + # Image: debian:bullseye + # ------------------------------------------------------------------------- + arm-unit-tests: + name: 'ARM [unit tests, no functional tests] [bullseye]' + runs-on: ${{ github.repository == 'ElementsProject/elements' && fromJSON('["self-hosted","linux","arm64"]') || 'ubuntu-latest' }} + timeout-minutes: 120 + env: + FILE_ENV: "./ci/test/00_setup_env_arm.sh" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + apt-get update && apt-get install -y git + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-arm-unit-tests-${{ github.sha }} + restore-keys: ccache-arm-unit-tests- + + - name: Restore depends/built cache + uses: actions/cache/restore@v4 + with: + path: depends/built + key: depends-built-arm-unit-tests-${{ hashFiles('depends/**') }}-${{ hashFiles('ci/test/00_setup_env_arm.sh') }} + restore-keys: depends-built-arm-unit-tests-${{ hashFiles('depends/**') }}- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-arm-unit-tests-${{ github.sha }} + + - name: Save depends/built cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/built + key: depends-built-arm-unit-tests-${{ hashFiles('depends/**') }}-${{ hashFiles('ci/test/00_setup_env_arm.sh') }} + + # ------------------------------------------------------------------------- + # Win64 cross-compile (unit tests, no gui tests, no boost::process, + # no functional tests) + # Image: ubuntu:jammy + # ------------------------------------------------------------------------- + win64-cross: + name: 'Win64 [unit tests, no gui tests, no boost::process, no functional tests] [jammy]' + runs-on: ${{ github.repository == 'ElementsProject/elements' && fromJSON('["self-hosted","linux","x64"]') || 'ubuntu-latest' }} + timeout-minutes: 120 + env: + FILE_ENV: "./ci/test/00_setup_env_win64.sh" + RUN_UNIT_TESTS: "false" # Wine-based unit tests unreliable on GHA + RUN_FUNCTIONAL_TESTS: "false" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + apt-get update && apt-get install -y git + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-win64-cross-${{ github.sha }} + restore-keys: ccache-win64-cross- + + - name: Restore depends/built cache + uses: actions/cache/restore@v4 + with: + path: depends/built + key: depends-built-win64-cross-${{ hashFiles('depends/**', 'ci/test/00_setup_env_win64.sh') }} + restore-keys: depends-built-win64-cross- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-win64-cross-${{ github.sha }} + + - name: Save depends/built cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/built + key: depends-built-win64-cross-${{ hashFiles('depends/**', 'ci/test/00_setup_env_win64.sh') }} + + # ------------------------------------------------------------------------- + # 32-bit + dash (GUI) + # Image: rockylinux:8 + # ------------------------------------------------------------------------- + i686-centos: + name: '32-bit + dash [gui] [Rocky 8]' + runs-on: ${{ github.repository == 'ElementsProject/elements' && fromJSON('["self-hosted","linux","x64"]') || 'ubuntu-latest' }} + timeout-minutes: 120 + env: + PACKAGE_MANAGER_INSTALL: "yum install -y" + FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh" + TEST_RUNNER_EXTRA: "--exclude feature_proxy.py,rpc_bind.py" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + yum install -y git + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-i686-centos-${{ github.sha }} + restore-keys: ccache-i686-centos- + + - name: Restore depends/built cache + uses: actions/cache/restore@v4 + with: + path: depends/built + key: depends-built-i686-centos-${{ hashFiles('depends/**', 'ci/test/00_setup_env_i686_centos.sh') }} + restore-keys: depends-built-i686-centos- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-i686-centos-${{ github.sha }} + + - name: Save depends/built cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/built + key: depends-built-i686-centos-${{ hashFiles('depends/**', 'ci/test/00_setup_env_i686_centos.sh') }} + + # ------------------------------------------------------------------------- + # TSan + depends + gui + # Image: ubuntu:24.04 (needs extra CPU/memory - 6 CPU, 24 GB in Cirrus) + # ------------------------------------------------------------------------- + tsan: + name: '[TSan, depends, gui] [2404]' + runs-on: ${{ github.repository == 'ElementsProject/elements' && fromJSON('["self-hosted","linux","x64"]') || 'ubuntu-latest' }} + timeout-minutes: 120 + env: + FILE_ENV: "./ci/test/00_setup_env_native_tsan.sh" + MAKEJOBS: "-j2" # Avoid excessive memory use + TEST_RUNNER_EXTRA: "--exclude feature_proxy.py,rpc_bind.py" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + apt-get update && apt-get install -y git + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-tsan-${{ github.sha }} + restore-keys: ccache-tsan- + + - name: Restore depends/built cache + uses: actions/cache/restore@v4 + with: + path: depends/built + key: depends-built-tsan-${{ hashFiles('depends/**', 'ci/test/00_setup_env_native_tsan.sh') }} + restore-keys: depends-built-tsan- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-tsan-${{ github.sha }} + + - name: Save depends/built cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/built + key: depends-built-tsan-${{ hashFiles('depends/**', 'ci/test/00_setup_env_native_tsan.sh') }} + + # ------------------------------------------------------------------------- + # MSan + depends + # Image: ubuntu:focal + # ------------------------------------------------------------------------- + msan: + name: '[MSan, depends] [focal]' + runs-on: ${{ github.repository == 'ElementsProject/elements' && fromJSON('["self-hosted","linux","x64"]') || 'ubuntu-latest' }} + timeout-minutes: 120 + env: + FILE_ENV: "./ci/test/00_setup_env_native_msan.sh" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + apt-get update && apt-get install -y git + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-msan-${{ github.sha }} + restore-keys: ccache-msan- + + - name: Restore depends/built cache + uses: actions/cache/restore@v4 + with: + path: depends/built + key: depends-built-msan-${{ hashFiles('depends/**', 'ci/test/00_setup_env_native_msan.sh') }} + restore-keys: depends-built-msan- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-msan-${{ github.sha }} + + - name: Save depends/built cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/built + key: depends-built-msan-${{ hashFiles('depends/**', 'ci/test/00_setup_env_native_msan.sh') }} + + # ------------------------------------------------------------------------- + # ASan + LSan + UBSan + integer (no depends) + # Image: ubuntu:jammy (needs 16 GB RAM - ELEMENTS-specific increase) + # ------------------------------------------------------------------------- + asan-lsan-ubsan-integer: + name: '[ASan + LSan + UBSan + integer, no depends] [jammy]' + runs-on: ${{ github.repository == 'ElementsProject/elements' && fromJSON('["self-hosted","linux","x64"]') || 'ubuntu-latest' }} + timeout-minutes: 120 + env: + FILE_ENV: "./ci/test/00_setup_env_native_asan.sh" + TEST_RUNNER_EXTRA: "--exclude feature_proxy.py,rpc_bind.py" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + apt-get update && apt-get install -y git + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-asan-${{ github.sha }} + restore-keys: ccache-asan- + + - name: Restore depends/built cache + uses: actions/cache/restore@v4 + with: + path: depends/built + key: depends-built-asan-${{ hashFiles('depends/**', 'ci/test/00_setup_env_native_asan.sh') }} + restore-keys: depends-built-asan- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-asan-${{ github.sha }} + + - name: Save depends/built cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/built + key: depends-built-asan-${{ hashFiles('depends/**', 'ci/test/00_setup_env_native_asan.sh') }} + + # ------------------------------------------------------------------------- + # Fuzzer (address, undefined, integer; no depends) + # Image: ubuntu:jammy (8 CPU, 16 GB in Cirrus) + # ------------------------------------------------------------------------- + fuzzer: + name: '[fuzzer,address,undefined,integer, no depends] [jammy]' + runs-on: ${{ github.repository == 'ElementsProject/elements' && fromJSON('["self-hosted","linux","x64"]') || 'ubuntu-latest' }} + timeout-minutes: 120 + env: + FILE_ENV: "./ci/test/00_setup_env_native_fuzz.sh" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + apt-get update && apt-get install -y git + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-fuzzer-${{ github.sha }} + restore-keys: ccache-fuzzer- + + - name: Restore depends/built cache + uses: actions/cache/restore@v4 + with: + path: depends/built + key: depends-built-fuzzer-${{ hashFiles('depends/**', 'ci/test/00_setup_env_native_fuzz.sh') }} + restore-keys: depends-built-fuzzer- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-fuzzer-${{ github.sha }} + + - name: Save depends/built cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/built + key: depends-built-fuzzer-${{ hashFiles('depends/**', 'ci/test/00_setup_env_native_fuzz.sh') }} + + # ------------------------------------------------------------------------- + # No wallet + libbitcoinkernel + # Image: ubuntu:bionic + # ------------------------------------------------------------------------- + no-wallet-libbitcoinkernel: + name: '[no wallet, libbitcoinkernel] [bionic]' + runs-on: ${{ github.repository == 'ElementsProject/elements' && fromJSON('["self-hosted","linux","x64"]') || 'ubuntu-latest' }} + timeout-minutes: 120 + env: + FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh" + TEST_RUNNER_EXTRA: "--exclude feature_proxy.py,rpc_bind.py" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-no-wallet-${{ github.sha }} + restore-keys: ccache-no-wallet- + + - name: Restore depends/built cache + uses: actions/cache/restore@v4 + with: + path: depends/built + key: depends-built-no-wallet-${{ hashFiles('depends/**') }}-${{ hashFiles('ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh') }} + restore-keys: depends-built-no-wallet-${{ hashFiles('depends/**') }}- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-no-wallet-${{ github.sha }} + + - name: Save depends/built cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/built + key: depends-built-no-wallet-${{ hashFiles('depends/**') }}-${{ hashFiles('ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh') }} + + # ------------------------------------------------------------------------- + # macOS 10.15 cross-compile (gui, no tests) + # Image: ubuntu:focal (cross-compiles targeting macOS) + # ------------------------------------------------------------------------- + macos-cross: + name: 'macOS 10.15 [gui, no tests] [focal]' + runs-on: ${{ github.repository == 'ElementsProject/elements' && fromJSON('["self-hosted","linux","x64"]') || 'ubuntu-latest' }} + timeout-minutes: 120 + env: + MACOS_SDK: "Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers" + FILE_ENV: "./ci/test/00_setup_env_mac.sh" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Restore macOS SDK cache + uses: actions/cache/restore@v4 + with: + path: depends/SDKs/${{ env.MACOS_SDK }} + key: macos-sdk-${{ env.MACOS_SDK }} + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-macos-cross-${{ github.sha }} + restore-keys: ccache-macos-cross- + + - name: Restore depends/built cache + uses: actions/cache/restore@v4 + with: + path: depends/built + key: depends-built-macos-cross-${{ hashFiles('depends/packages/**', 'depends/Makefile') }}-${{ hashFiles('ci/test/00_setup_env_mac.sh') }} + restore-keys: depends-built-macos-cross- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save macOS SDK cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/SDKs/${{ env.MACOS_SDK }} + key: macos-sdk-${{ env.MACOS_SDK }} + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-macos-cross-${{ github.sha }} + + - name: Save depends/built cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/built + key: depends-built-macos-cross-${{ hashFiles('depends/packages/**', 'depends/Makefile') }}-${{ hashFiles('ci/test/00_setup_env_mac.sh') }} + + # ------------------------------------------------------------------------- + # macOS 13 native arm64 (gui, sqlite only, no depends) + # Runner: macos-14 (Apple Silicon, equivalent to Cirrus macos-runner:sequoia) + # ------------------------------------------------------------------------- + macos-native-arm64: + name: 'macOS 13 native arm64 [gui, sqlite only] [no depends]' + runs-on: macos-14 + timeout-minutes: 120 + env: + FILE_ENV: "./ci/test/00_setup_env_mac_native_arm64.sh" + CI_USE_APT_INSTALL: "no" + PACKAGE_MANAGER_INSTALL: "echo" # Nothing to install via apt + DANGER_RUN_CI_ON_HOST: "1" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Check clang version + run: clang --version + + - name: Install brew dependencies + run: | + brew install boost@1.85 libevent qt@5 miniupnpc libnatpmp ccache \ + zeromq qrencode libtool automake gnu-getopt + brew link --force --overwrite boost@1.85 + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-macos-native-arm64-${{ github.sha }} + restore-keys: ccache-macos-native-arm64- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-macos-native-arm64-${{ github.sha }} + + previous-releases: + name: '[previous releases, uses qt5 dev package and some depends packages, DEBUG] [unsigned char] [bionic]' + runs-on: [self-hosted, persistent] + timeout-minutes: 120 + env: + FILE_ENV: "./ci/test/00_setup_env_native_qt5.sh" + RESTART_CI_DOCKER_BEFORE_RUN: "1" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + run: | + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + # On the persistent runner the "releases/" folder persists on disk + # between runs. We still use cache as a fallback / for portability, + # but the on-disk copy will be used if present. + - name: Restore previous releases cache + uses: actions/cache@v4 + with: + path: releases + key: previous-releases-${{ hashFiles('ci/**') }} + restore-keys: previous-releases- + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-previous-releases-${{ github.sha }} + restore-keys: ccache-previous-releases- + + - name: Restore depends/built cache + uses: actions/cache/restore@v4 + with: + path: depends/built + key: depends-built-previous-releases-${{ hashFiles('depends/**', 'ci/test/00_setup_env_native_qt5.sh') }} + restore-keys: depends-built-previous-releases- + + - name: Run CI + run: ./ci/test_run_all.sh + + - name: Save ccache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.CCACHE_DIR }} + key: ccache-previous-releases-${{ github.sha }} + + - name: Save depends/built cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: depends/built + key: depends-built-previous-releases-${{ hashFiles('depends/**', 'ci/test/00_setup_env_native_qt5.sh') }} + + # ------------------------------------------------------------------------- + # Win64 native MSVC - Short running functional tests + # Runner: windows-2019 (has VS 2019, equivalent to cirrusci/windowsservercore:visualstudio2019) + # ------------------------------------------------------------------------- + win64-msvc-short: + name: 'Win64 native [msvc] (Short running functional tests)' + runs-on: windows-2019 + timeout-minutes: 120 + env: + PYTHONUTF8: 1 + CI_VCPKG_TAG: '2021.05.12' + VCPKG_DOWNLOADS: 'C:\Users\runneradmin\AppData\Local\vcpkg\downloads' + VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\runneradmin\AppData\Local\vcpkg\archives' + QT_DOWNLOAD_URL: 'https://download.qt.io/archive/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip' + QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip' + QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.3' + QTBASEDIR: 'C:\Qt_static' + IgnoreWarnIntDirInTempDetected: 'true' + DANGER_RUN_CI_ON_HOST: "1" + defaults: + run: + shell: cmd + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + shell: pwsh + run: | + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git config core.filemode false + git reset --hard + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + # Qt static build - cached by Qt download URL + MSBuild version. + # This is a large, slow build; the cache makes it nearly free on re-runs. + - name: Restore Qt static cache + id: qt-cache + uses: actions/cache@v4 + with: + path: ${{ env.QTBASEDIR }} + key: qt-static-${{ env.QT_DOWNLOAD_URL }}-${{ runner.os }} + + - name: Install jom + if: steps.qt-cache.outputs.cache-hit != 'true' + run: | + curl -L -o C:\jom.zip https://download.qt.io/official_releases/jom/jom_1_1_2.zip + mkdir C:\jom + tar -xf C:\jom.zip -C C:\jom + + - name: Build Qt static + if: steps.qt-cache.outputs.cache-hit != 'true' + shell: cmd + run: | + curl -L -o %QT_LOCAL_PATH% %QT_DOWNLOAD_URL% + tar -xf %QT_LOCAL_PATH% -C C:\ + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + cd %QT_SOURCE_DIR% + mkdir build + cd build + ..\configure -release -silent -opensource -confirm-license -opengl desktop ^ + -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng ^ + -nomake examples -nomake tests -nomake tools ^ + -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg ^ + -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan ^ + -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts ^ + -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc ^ + -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects ^ + -skip qtimageformats -skip qtlocation -skip qtlottie ^ + -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth ^ + -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols ^ + -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects ^ + -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus ^ + -skip qtserialport -skip qtspeech -skip qtsvg ^ + -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel ^ + -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets ^ + -skip qtwebview -skip qtx11extras -skip qtxmlpatterns ^ + -no-openssl -no-feature-bearermanagement -no-feature-printdialog ^ + -no-feature-printer -no-feature-printpreviewdialog ^ + -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel ^ + -no-feature-textbrowser -no-feature-textmarkdownwriter ^ + -no-feature-textodfwriter -no-feature-xml ^ + -prefix %QTBASEDIR% + C:\jom\jom.exe + C:\jom\jom.exe install + + # vcpkg tools (compilers/bootstrapper) - cached by tag + MSBuild version. + - name: Restore vcpkg tools cache + uses: actions/cache@v4 + with: + path: ${{ env.VCPKG_DOWNLOADS }}\tools + key: vcpkg-tools-${{ env.CI_VCPKG_TAG }}-${{ runner.os }} + + # vcpkg binary packages - cached by tag (reupload on changes). + - name: Restore vcpkg binary cache + uses: actions/cache@v4 + with: + path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} + key: vcpkg-binary-${{ env.CI_VCPKG_TAG }}-${{ runner.os }}-${{ github.sha }} + restore-keys: vcpkg-binary-${{ env.CI_VCPKG_TAG }}-${{ runner.os }}- + + - name: Install Python and pip packages + run: | + choco install --yes --no-progress python3 --version=3.9.6 + pip install zmq + python -VV + + - name: Install vcpkg + run: | + cd .. + git clone --quiet https://github.com/microsoft/vcpkg.git + cd vcpkg + git -c advice.detachedHead=false checkout %CI_VCPKG_TAG% + .\bootstrap-vcpkg -disableMetrics + echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake + .\vcpkg integrate install + .\vcpkg version + + - name: Build (MSVC) + run: | + cd %GITHUB_WORKSPACE% + python build_msvc\msvc-autogen.py + set PATH=C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin;%PATH% + msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo + + - name: Run short functional tests + shell: cmd + run: | + netsh int ipv4 set dynamicport tcp start=1025 num=64511 + netsh int ipv6 set dynamicport tcp start=1025 num=64511 + python test\functional\test_runner.py --nocleanup --ci --quiet ^ + --combinedlogslen=4000 --jobs=4 --timeout-factor=8 --extended ^ + --exclude wallet_avoidreuse,feature_trim_headers,feature_dbcrash,feature_fee_estimation + + - name: Save vcpkg binary cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} + key: vcpkg-binary-${{ env.CI_VCPKG_TAG }}-${{ runner.os }}-${{ github.sha }} + + # ------------------------------------------------------------------------- + # Win64 native MSVC - Long running functional tests + unit tests + # Runner: windows-2019 + # ------------------------------------------------------------------------- + win64-msvc-long: + name: 'Win64 native [msvc] (Long running functional tests + unit tests)' + runs-on: windows-2019 + timeout-minutes: 120 + env: + PYTHONUTF8: 1 + CI_VCPKG_TAG: '2021.05.12' + VCPKG_DOWNLOADS: 'C:\Users\runneradmin\AppData\Local\vcpkg\downloads' + VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\runneradmin\AppData\Local\vcpkg\archives' + QT_DOWNLOAD_URL: 'https://download.qt.io/archive/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip' + QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip' + QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.3' + QTBASEDIR: 'C:\Qt_static' + IgnoreWarnIntDirInTempDetected: 'true' + DANGER_RUN_CI_ON_HOST: "1" + defaults: + run: + shell: cmd + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Merge base branch (PR only) + if: github.event_name == 'pull_request' + shell: pwsh + run: | + git config --global user.email "ci@ci.ci" + git config --global user.name "ci" + git config core.filemode false + git reset --hard + git fetch origin ${{ github.base_ref }} + git merge origin/${{ github.base_ref }} + + - name: Restore Qt static cache + id: qt-cache + uses: actions/cache@v4 + with: + path: ${{ env.QTBASEDIR }} + key: qt-static-${{ env.QT_DOWNLOAD_URL }}-${{ runner.os }} + + - name: Install jom + if: steps.qt-cache.outputs.cache-hit != 'true' + run: | + curl -L -o C:\jom.zip https://download.qt.io/official_releases/jom/jom_1_1_2.zip + mkdir C:\jom + tar -xf C:\jom.zip -C C:\jom + + - name: Build Qt static + if: steps.qt-cache.outputs.cache-hit != 'true' + shell: cmd + run: | + curl -L -o %QT_LOCAL_PATH% %QT_DOWNLOAD_URL% + tar -xf %QT_LOCAL_PATH% -C C:\ + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + cd %QT_SOURCE_DIR% + mkdir build + cd build + ..\configure -release -silent -opensource -confirm-license -opengl desktop ^ + -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng ^ + -nomake examples -nomake tests -nomake tools ^ + -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg ^ + -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan ^ + -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts ^ + -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc ^ + -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects ^ + -skip qtimageformats -skip qtlocation -skip qtlottie ^ + -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth ^ + -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols ^ + -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects ^ + -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus ^ + -skip qtserialport -skip qtspeech -skip qtsvg ^ + -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel ^ + -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets ^ + -skip qtwebview -skip qtx11extras -skip qtxmlpatterns ^ + -no-openssl -no-feature-bearermanagement -no-feature-printdialog ^ + -no-feature-printer -no-feature-printpreviewdialog ^ + -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel ^ + -no-feature-textbrowser -no-feature-textmarkdownwriter ^ + -no-feature-textodfwriter -no-feature-xml ^ + -prefix %QTBASEDIR% + C:\jom\jom.exe + C:\jom\jom.exe install + + - name: Restore vcpkg tools cache + uses: actions/cache@v4 + with: + path: ${{ env.VCPKG_DOWNLOADS }}\tools + key: vcpkg-tools-${{ env.CI_VCPKG_TAG }}-${{ runner.os }} + + - name: Restore vcpkg binary cache + uses: actions/cache@v4 + with: + path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} + key: vcpkg-binary-${{ env.CI_VCPKG_TAG }}-${{ runner.os }}-${{ github.sha }} + restore-keys: vcpkg-binary-${{ env.CI_VCPKG_TAG }}-${{ runner.os }}- + + - name: Install Python and pip packages + run: | + choco install --yes --no-progress python3 --version=3.9.6 + pip install zmq + python -VV + + - name: Install vcpkg + run: | + cd .. + git clone --quiet https://github.com/microsoft/vcpkg.git + cd vcpkg + git -c advice.detachedHead=false checkout %CI_VCPKG_TAG% + .\bootstrap-vcpkg -disableMetrics + echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake + .\vcpkg integrate install + .\vcpkg version + + - name: Build (MSVC) + run: | + cd %GITHUB_WORKSPACE% + python build_msvc\msvc-autogen.py + set PATH=C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin;%PATH% + msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo + + - name: Run unit tests + shell: cmd + run: | + src\test_elements.exe -l test_suite + src\bench_elements.exe > NUL + python test\util\test_runner.py + python test\util\rpcauth-test.py + + - name: Run long functional tests + shell: cmd + run: | + netsh int ipv4 set dynamicport tcp start=1025 num=64511 + netsh int ipv6 set dynamicport tcp start=1025 num=64511 + python test\functional\test_runner.py --nocleanup --ci --quiet ^ + --combinedlogslen=4000 --jobs=4 --timeout-factor=8 ^ + wallet_avoidreuse feature_trim_headers feature_dbcrash feature_fee_estimation || exit /b 0 + + - name: Save vcpkg binary cache (push only) + if: github.event_name == 'push' + uses: actions/cache/save@v4 + with: + path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} + key: vcpkg-binary-${{ env.CI_VCPKG_TAG }}-${{ runner.os }}-${{ github.sha }} + + # ------------------------------------------------------------------------- + # DISABLED JOBS + # The following jobs were disabled in .cirrus.yml with `only_if: false` + # and are preserved here as comments for future re-enabling. + # + # multiprocess-i686-debug: + # name: '[multiprocess, i686, DEBUG] [focal]' + # # Disabled: multiprocess build is not supported or tested in Elements. + # if: false + # ... + # + # android-apk: + # name: 'ARM64 Android APK [focal]' + # # Disabled: Android build is broken and unsupported in Elements. + # if: false + # ... + # ------------------------------------------------------------------------- \ No newline at end of file diff --git a/ci/test/00_setup_env_lint.sh b/ci/test/00_setup_env_lint.sh new file mode 100755 index 00000000000..04816e27a22 --- /dev/null +++ b/ci/test/00_setup_env_lint.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2019-2021 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +export HOST="x86_64-pc-linux-gnu" +export CONTAINER_NAME=ci_lint +export DOCKER_NAME_TAG=ubuntu:focal +export RUN_LINT=true +export RUN_UNIT_TESTS=false +export RUN_FUNCTIONAL_TESTS=false +export GOAL="" +export BITCOIN_CONFIG="" \ No newline at end of file From 9b065d5a676ea09d359ceef91779a798dc623657 Mon Sep 17 00:00:00 2001 From: Tom Trevethan Date: Tue, 26 May 2026 14:44:22 +0100 Subject: [PATCH 2/7] use windows-2-22 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f56b77faf79..f2b1fec1722 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -680,7 +680,7 @@ jobs: # ------------------------------------------------------------------------- win64-msvc-short: name: 'Win64 native [msvc] (Short running functional tests)' - runs-on: windows-2019 + runs-on: windows-2022 timeout-minutes: 120 env: PYTHONUTF8: 1 @@ -824,7 +824,7 @@ jobs: # ------------------------------------------------------------------------- win64-msvc-long: name: 'Win64 native [msvc] (Long running functional tests + unit tests)' - runs-on: windows-2019 + runs-on: windows-2022 timeout-minutes: 120 env: PYTHONUTF8: 1 From 317f74e11d3a42f1ecfe996bef19542da52808f9 Mon Sep 17 00:00:00 2001 From: Tom Trevethan Date: Tue, 26 May 2026 16:34:44 +0100 Subject: [PATCH 3/7] update win64-msvc --- .github/workflows/ci.yml | 124 +++++++++------------------------------ 1 file changed, 27 insertions(+), 97 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2b1fec1722..08ddaf2530f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -681,7 +681,7 @@ jobs: win64-msvc-short: name: 'Win64 native [msvc] (Short running functional tests)' runs-on: windows-2022 - timeout-minutes: 120 + timeout-minutes: 360 env: PYTHONUTF8: 1 CI_VCPKG_TAG: '2021.05.12' @@ -700,18 +700,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Merge base branch (PR only) - if: github.event_name == 'pull_request' - shell: pwsh - run: | - git config --global user.email "ci@ci.ci" - git config --global user.name "ci" - git config core.filemode false - git reset --hard - git fetch origin ${{ github.base_ref }} - git merge origin/${{ github.base_ref }} - - # Qt static build - cached by Qt download URL + MSBuild version. + # Qt static build - cached by Qt download URL. # This is a large, slow build; the cache makes it nearly free on re-runs. - name: Restore Qt static cache id: qt-cache @@ -729,41 +718,15 @@ jobs: - name: Build Qt static if: steps.qt-cache.outputs.cache-hit != 'true' - shell: cmd + shell: pwsh run: | - curl -L -o %QT_LOCAL_PATH% %QT_DOWNLOAD_URL% - tar -xf %QT_LOCAL_PATH% -C C:\ - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - cd %QT_SOURCE_DIR% - mkdir build - cd build - ..\configure -release -silent -opensource -confirm-license -opengl desktop ^ - -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng ^ - -nomake examples -nomake tests -nomake tools ^ - -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg ^ - -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan ^ - -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts ^ - -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc ^ - -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects ^ - -skip qtimageformats -skip qtlocation -skip qtlottie ^ - -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth ^ - -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols ^ - -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects ^ - -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus ^ - -skip qtserialport -skip qtspeech -skip qtsvg ^ - -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel ^ - -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets ^ - -skip qtwebview -skip qtx11extras -skip qtxmlpatterns ^ - -no-openssl -no-feature-bearermanagement -no-feature-printdialog ^ - -no-feature-printer -no-feature-printpreviewdialog ^ - -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel ^ - -no-feature-textbrowser -no-feature-textmarkdownwriter ^ - -no-feature-textodfwriter -no-feature-xml ^ - -prefix %QTBASEDIR% - C:\jom\jom.exe - C:\jom\jom.exe install - - # vcpkg tools (compilers/bootstrapper) - cached by tag + MSBuild version. + curl -L -o $env:QT_LOCAL_PATH $env:QT_DOWNLOAD_URL + Write-Host "Extracting Qt source..." + Expand-Archive -Path $env:QT_LOCAL_PATH -DestinationPath C:\ -Force + $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + cmd /c "`"$vsPath\VC\Auxiliary\Build\vcvars64.bat`" && cd /d $env:QT_SOURCE_DIR && mkdir build && cd build && ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix $env:QTBASEDIR && C:\jom\jom.exe && C:\jom\jom.exe install" + + # vcpkg tools (compilers/bootstrapper) - cached by tag. - name: Restore vcpkg tools cache uses: actions/cache@v4 with: @@ -796,11 +759,13 @@ jobs: .\vcpkg version - name: Build (MSVC) + shell: pwsh run: | - cd %GITHUB_WORKSPACE% + cd $env:GITHUB_WORKSPACE python build_msvc\msvc-autogen.py - set PATH=C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin;%PATH% - msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo + $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + $msbuild = "$vsPath\MSBuild\Current\Bin\MSBuild.exe" + & $msbuild build_msvc\bitcoin.sln /property:Configuration=Release /maxCpuCount /verbosity:minimal /noLogo - name: Run short functional tests shell: cmd @@ -825,7 +790,7 @@ jobs: win64-msvc-long: name: 'Win64 native [msvc] (Long running functional tests + unit tests)' runs-on: windows-2022 - timeout-minutes: 120 + timeout-minutes: 360 env: PYTHONUTF8: 1 CI_VCPKG_TAG: '2021.05.12' @@ -844,17 +809,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Merge base branch (PR only) - if: github.event_name == 'pull_request' - shell: pwsh - run: | - git config --global user.email "ci@ci.ci" - git config --global user.name "ci" - git config core.filemode false - git reset --hard - git fetch origin ${{ github.base_ref }} - git merge origin/${{ github.base_ref }} - - name: Restore Qt static cache id: qt-cache uses: actions/cache@v4 @@ -871,39 +825,13 @@ jobs: - name: Build Qt static if: steps.qt-cache.outputs.cache-hit != 'true' - shell: cmd + shell: pwsh run: | - curl -L -o %QT_LOCAL_PATH% %QT_DOWNLOAD_URL% - tar -xf %QT_LOCAL_PATH% -C C:\ - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" - cd %QT_SOURCE_DIR% - mkdir build - cd build - ..\configure -release -silent -opensource -confirm-license -opengl desktop ^ - -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng ^ - -nomake examples -nomake tests -nomake tools ^ - -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg ^ - -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan ^ - -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts ^ - -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc ^ - -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects ^ - -skip qtimageformats -skip qtlocation -skip qtlottie ^ - -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth ^ - -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols ^ - -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects ^ - -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus ^ - -skip qtserialport -skip qtspeech -skip qtsvg ^ - -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel ^ - -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets ^ - -skip qtwebview -skip qtx11extras -skip qtxmlpatterns ^ - -no-openssl -no-feature-bearermanagement -no-feature-printdialog ^ - -no-feature-printer -no-feature-printpreviewdialog ^ - -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel ^ - -no-feature-textbrowser -no-feature-textmarkdownwriter ^ - -no-feature-textodfwriter -no-feature-xml ^ - -prefix %QTBASEDIR% - C:\jom\jom.exe - C:\jom\jom.exe install + curl -L -o $env:QT_LOCAL_PATH $env:QT_DOWNLOAD_URL + Write-Host "Extracting Qt source..." + Expand-Archive -Path $env:QT_LOCAL_PATH -DestinationPath C:\ -Force + $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + cmd /c "`"$vsPath\VC\Auxiliary\Build\vcvars64.bat`" && cd /d $env:QT_SOURCE_DIR && mkdir build && cd build && ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix $env:QTBASEDIR && C:\jom\jom.exe && C:\jom\jom.exe install" - name: Restore vcpkg tools cache uses: actions/cache@v4 @@ -936,11 +864,13 @@ jobs: .\vcpkg version - name: Build (MSVC) + shell: pwsh run: | - cd %GITHUB_WORKSPACE% + cd $env:GITHUB_WORKSPACE python build_msvc\msvc-autogen.py - set PATH=C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin;%PATH% - msbuild build_msvc\bitcoin.sln -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo + $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + $msbuild = "$vsPath\MSBuild\Current\Bin\MSBuild.exe" + & $msbuild build_msvc\bitcoin.sln /property:Configuration=Release /maxCpuCount /verbosity:minimal /noLogo - name: Run unit tests shell: cmd From bcbc205ca810c71f421461e71f648cb53bfae7e3 Mon Sep 17 00:00:00 2001 From: Tom Trevethan Date: Tue, 26 May 2026 20:36:19 +0100 Subject: [PATCH 4/7] fix vcpkg install --- .github/workflows/ci.yml | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08ddaf2530f..723b27a2217 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -685,7 +685,8 @@ jobs: env: PYTHONUTF8: 1 CI_VCPKG_TAG: '2021.05.12' - VCPKG_DOWNLOADS: 'C:\Users\runneradmin\AppData\Local\vcpkg\downloads' + VCPKG_ROOT: 'D:\a\elements\vcpkg' + VCPKG_DOWNLOADS: '${{ github.workspace }}\..\vcpkg\downloads' VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\runneradmin\AppData\Local\vcpkg\archives' QT_DOWNLOAD_URL: 'https://download.qt.io/archive/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip' QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip' @@ -700,8 +701,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # Qt static build - cached by Qt download URL. - # This is a large, slow build; the cache makes it nearly free on re-runs. - name: Restore Qt static cache id: qt-cache uses: actions/cache@v4 @@ -726,14 +725,12 @@ jobs: $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath cmd /c "`"$vsPath\VC\Auxiliary\Build\vcvars64.bat`" && cd /d $env:QT_SOURCE_DIR && mkdir build && cd build && ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix $env:QTBASEDIR && C:\jom\jom.exe && C:\jom\jom.exe install" - # vcpkg tools (compilers/bootstrapper) - cached by tag. - name: Restore vcpkg tools cache uses: actions/cache@v4 with: - path: ${{ env.VCPKG_DOWNLOADS }}\tools + path: ${{ env.VCPKG_ROOT }}\downloads\tools key: vcpkg-tools-${{ env.CI_VCPKG_TAG }}-${{ runner.os }} - # vcpkg binary packages - cached by tag (reupload on changes). - name: Restore vcpkg binary cache uses: actions/cache@v4 with: @@ -748,13 +745,13 @@ jobs: python -VV - name: Install vcpkg + shell: pwsh run: | - cd .. - git clone --quiet https://github.com/microsoft/vcpkg.git - cd vcpkg - git -c advice.detachedHead=false checkout %CI_VCPKG_TAG% - .\bootstrap-vcpkg -disableMetrics - echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake + git clone --quiet https://github.com/microsoft/vcpkg.git $env:VCPKG_ROOT + cd $env:VCPKG_ROOT + git -c advice.detachedHead=false checkout $env:CI_VCPKG_TAG + .\bootstrap-vcpkg.bat -disableMetrics + Add-Content triplets\x64-windows-static.cmake "set(VCPKG_BUILD_TYPE release)" .\vcpkg integrate install .\vcpkg version @@ -794,7 +791,7 @@ jobs: env: PYTHONUTF8: 1 CI_VCPKG_TAG: '2021.05.12' - VCPKG_DOWNLOADS: 'C:\Users\runneradmin\AppData\Local\vcpkg\downloads' + VCPKG_ROOT: 'D:\a\elements\vcpkg' VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\runneradmin\AppData\Local\vcpkg\archives' QT_DOWNLOAD_URL: 'https://download.qt.io/archive/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip' QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip' @@ -836,7 +833,7 @@ jobs: - name: Restore vcpkg tools cache uses: actions/cache@v4 with: - path: ${{ env.VCPKG_DOWNLOADS }}\tools + path: ${{ env.VCPKG_ROOT }}\downloads\tools key: vcpkg-tools-${{ env.CI_VCPKG_TAG }}-${{ runner.os }} - name: Restore vcpkg binary cache @@ -853,13 +850,13 @@ jobs: python -VV - name: Install vcpkg + shell: pwsh run: | - cd .. - git clone --quiet https://github.com/microsoft/vcpkg.git - cd vcpkg - git -c advice.detachedHead=false checkout %CI_VCPKG_TAG% - .\bootstrap-vcpkg -disableMetrics - echo set(VCPKG_BUILD_TYPE release) >> triplets\x64-windows-static.cmake + git clone --quiet https://github.com/microsoft/vcpkg.git $env:VCPKG_ROOT + cd $env:VCPKG_ROOT + git -c advice.detachedHead=false checkout $env:CI_VCPKG_TAG + .\bootstrap-vcpkg.bat -disableMetrics + Add-Content triplets\x64-windows-static.cmake "set(VCPKG_BUILD_TYPE release)" .\vcpkg integrate install .\vcpkg version From 56c1fc61593b1a5dd4c13d2ef24a887cc773b0d8 Mon Sep 17 00:00:00 2001 From: Tom Trevethan Date: Tue, 26 May 2026 22:46:32 +0100 Subject: [PATCH 5/7] create VCPKG_DEFAULT_BINARY_CACHE --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 723b27a2217..4d9fce1cf15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -755,6 +755,10 @@ jobs: .\vcpkg integrate install .\vcpkg version + - name: Create vcpkg binary cache directory + shell: pwsh + run: New-Item -ItemType Directory -Force -Path $env:VCPKG_DEFAULT_BINARY_CACHE + - name: Build (MSVC) shell: pwsh run: | @@ -860,6 +864,10 @@ jobs: .\vcpkg integrate install .\vcpkg version + - name: Create vcpkg binary cache directory + shell: pwsh + run: New-Item -ItemType Directory -Force -Path $env:VCPKG_DEFAULT_BINARY_CACHE + - name: Build (MSVC) shell: pwsh run: | From ff909916029c77cdbe361ffad2e0b20dcc0f3e6b Mon Sep 17 00:00:00 2001 From: Tom Trevethan Date: Wed, 27 May 2026 01:13:34 +0100 Subject: [PATCH 6/7] force vs-2019 --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d9fce1cf15..c82337660cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -720,11 +720,11 @@ jobs: shell: pwsh run: | curl -L -o $env:QT_LOCAL_PATH $env:QT_DOWNLOAD_URL - Write-Host "Extracting Qt source..." Expand-Archive -Path $env:QT_LOCAL_PATH -DestinationPath C:\ -Force - $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath - cmd /c "`"$vsPath\VC\Auxiliary\Build\vcvars64.bat`" && cd /d $env:QT_SOURCE_DIR && mkdir build && cd build && ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix $env:QTBASEDIR && C:\jom\jom.exe && C:\jom\jom.exe install" - + $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" ` + -version "[16.0,17.0)" -property installationPath + cmd /c "`"$vsPath\VC\Auxiliary\Build\vcvars64.bat`" && cd /d $env:QT_SOURCE_DIR && mkdir build && cd build && ..\configure ..." + - name: Restore vcpkg tools cache uses: actions/cache@v4 with: @@ -764,7 +764,8 @@ jobs: run: | cd $env:GITHUB_WORKSPACE python build_msvc\msvc-autogen.py - $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" ` + -version "[16.0,17.0)" -property installationPath $msbuild = "$vsPath\MSBuild\Current\Bin\MSBuild.exe" & $msbuild build_msvc\bitcoin.sln /property:Configuration=Release /maxCpuCount /verbosity:minimal /noLogo From 96ddc2b402a87d7932f0bb3b1e761b3390794ec4 Mon Sep 17 00:00:00 2001 From: Tom Trevethan Date: Wed, 27 May 2026 10:41:56 +0100 Subject: [PATCH 7/7] use tar instead of zip --- .github/workflows/ci.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c82337660cc..046ed5d763a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -720,10 +720,15 @@ jobs: shell: pwsh run: | curl -L -o $env:QT_LOCAL_PATH $env:QT_DOWNLOAD_URL - Expand-Archive -Path $env:QT_LOCAL_PATH -DestinationPath C:\ -Force + Write-Host "Extracting Qt source..." + tar -xf $env:QT_LOCAL_PATH -C C:\ $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" ` -version "[16.0,17.0)" -property installationPath - cmd /c "`"$vsPath\VC\Auxiliary\Build\vcvars64.bat`" && cd /d $env:QT_SOURCE_DIR && mkdir build && cd build && ..\configure ..." + if (-not $vsPath) { + throw "VS 2019 build tools not found. Required for Qt/Elements toolset compatibility." + } + Write-Host "Using VS at: $vsPath" + cmd /c "`"$vsPath\VC\Auxiliary\Build\vcvars64.bat`" && cd /d $env:QT_SOURCE_DIR && mkdir build && cd build && ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix $env:QTBASEDIR && C:\jom\jom.exe && C:\jom\jom.exe install" - name: Restore vcpkg tools cache uses: actions/cache@v4 @@ -831,8 +836,13 @@ jobs: run: | curl -L -o $env:QT_LOCAL_PATH $env:QT_DOWNLOAD_URL Write-Host "Extracting Qt source..." - Expand-Archive -Path $env:QT_LOCAL_PATH -DestinationPath C:\ -Force - $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + tar -xf $env:QT_LOCAL_PATH -C C:\ + $vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" ` + -version "[16.0,17.0)" -property installationPath + if (-not $vsPath) { + throw "VS 2019 build tools not found. Required for Qt/Elements toolset compatibility." + } + Write-Host "Using VS at: $vsPath" cmd /c "`"$vsPath\VC\Auxiliary\Build\vcvars64.bat`" && cd /d $env:QT_SOURCE_DIR && mkdir build && cd build && ..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix $env:QTBASEDIR && C:\jom\jom.exe && C:\jom\jom.exe install" - name: Restore vcpkg tools cache