ci, win: Add BITCOINWALLET
#1585
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2023 The Bitcoin Core developers | |
# Distributed under the MIT software license, see the accompanying | |
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | |
name: CI | |
on: | |
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request. | |
pull_request: | |
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push. | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
concurrency: | |
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }} | |
cancel-in-progress: true | |
env: | |
DANGER_RUN_CI_ON_HOST: 1 | |
CI_FAILFAST_TEST_LEAVE_DANGLING: 1 # GHA does not care about dangling processes and setting this variable avoids killing the CI script itself on error | |
MAKEJOBS: '-j10' | |
jobs: | |
macos-native-x86_64: | |
name: 'macOS 13 native, x86_64, no depends, sqlite only, gui' | |
# Use latest image, but hardcode version to avoid silent upgrades (and breaks). | |
# See: https://github.com/actions/runner-images#available-images. | |
runs-on: macos-13 | |
# No need to run on the read-only mirror, unless it is a PR. | |
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request' | |
timeout-minutes: 120 | |
env: | |
FILE_ENV: './ci/test/00_setup_env_mac_native.sh' | |
BASE_ROOT_DIR: ${{ github.workspace }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Clang version | |
run: | | |
sudo xcode-select --switch /Applications/Xcode_15.0.app | |
clang --version | |
- name: Install Homebrew packages | |
env: | |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 | |
run: | | |
# A workaround for "The `brew link` step did not complete successfully" error. | |
brew install python@3 || brew link --overwrite python@3 | |
brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode | |
- name: Set Ccache directory | |
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV" | |
- 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 }} | |
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache | |
key: ${{ github.job }}-ccache-${{ github.run_id }} | |
win64-native: | |
name: 'Win64 native, VS 2022' | |
# Use latest image, but hardcode version to avoid silent upgrades (and breaks). | |
# See: https://github.com/actions/runner-images#available-images. | |
runs-on: windows-2022 | |
# No need to run on the read-only mirror, unless it is a PR. | |
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request' | |
env: | |
CCACHE_MAXSIZE: '200M' | |
PYTHONUTF8: 1 | |
TEST_RUNNER_TIMEOUT_FACTOR: 40 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Remove non-MSVC tool installations | |
run: | | |
Remove-Item -Path "$env:ProgramFiles/CMake" -Recurse -Force | |
- name: Configure Developer Command Prompt for Microsoft Visual C++ | |
# Using microsoft/setup-msbuild is not enough. | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
- name: Get tool information | |
run: | | |
cmake --version | Out-File -FilePath "cmake_version" | |
Get-Content -Path "cmake_version" | |
Write-Output "---" | |
msbuild -version | Out-File -FilePath "$env:GITHUB_WORKSPACE\msbuild_version" | |
Get-Content -Path "$env:GITHUB_WORKSPACE\msbuild_version" | |
$env:VCToolsVersion | Out-File -FilePath "$env:GITHUB_WORKSPACE\toolset_version" | |
Write-Host "VCToolsVersion $(Get-Content -Path "$env:GITHUB_WORKSPACE\toolset_version")" | |
py -3 --version | |
- name: Install Ccache | |
run: | | |
choco install --yes --no-progress ccache | |
- name: Using vcpkg with MSBuild | |
run: | | |
Set-Location "$env:VCPKG_INSTALLATION_ROOT" | |
Add-Content -Path "triplets\x64-windows.cmake" -Value "set(VCPKG_BUILD_TYPE release)" | |
Add-Content -Path "triplets\x64-windows.cmake" -Value "set(VCPKG_PLATFORM_TOOLSET_VERSION $env:VCToolsVersion)" | |
- name: vcpkg tools cache | |
uses: actions/cache@v4 | |
with: | |
path: C:/vcpkg/downloads/tools | |
key: ${{ github.job }}-vcpkg-tools | |
- name: Restore vcpkg binary cache | |
uses: actions/cache/restore@v4 | |
id: vcpkg-binary-cache | |
with: | |
path: ~/AppData/Local/vcpkg/archives | |
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }} | |
- name: Generate build system | |
run: | | |
cmake -B build --preset vs2022 -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" -DWERROR=ON | |
- name: Save vcpkg binary cache | |
uses: actions/cache/save@v4 | |
if: github.event_name != 'pull_request' && steps.vcpkg-binary-cache.outputs.cache-hit != 'true' | |
with: | |
path: ~/AppData/Local/vcpkg/archives | |
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }} | |
- name: Restore Ccache cache | |
id: ccache-cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: ~/AppData/Local/ccache | |
key: ${{ github.job }}-ccache- | |
- name: Build | |
working-directory: build | |
run: | | |
ccache --zero-stats | |
cmake --build . -j $env:NUMBER_OF_PROCESSORS --config Release | |
- name: Ccache stats | |
run: | | |
ccache --version | head -n 1 | |
ccache --show-stats --verbose | |
- name: Save Ccache cache | |
uses: actions/cache/save@v4 | |
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true' | |
with: | |
path: ~/AppData/Local/ccache | |
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache | |
key: ${{ github.job }}-ccache-${{ github.run_id }} | |
- name: Run test suite | |
working-directory: build | |
run: | | |
ctest -j $env:NUMBER_OF_PROCESSORS -C Release | |
- name: Run functional tests | |
working-directory: build | |
env: | |
BITCOIND: '${{ github.workspace }}\build\src\Release\bitcoind.exe' | |
BITCOINCLI: '${{ github.workspace }}\build\src\Release\bitcoin-cli.exe' | |
BITCOINWALLET: '${{ github.workspace }}\build\src\Release\bitcoin-wallet.exe' | |
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }} | |
shell: cmd | |
run: py -3 test\functional\test_runner.py --jobs %NUMBER_OF_PROCESSORS% --ci --quiet --tmpdirprefix=%RUNNER_TEMP% --combinedlogslen=99999999 --timeout-factor=%TEST_RUNNER_TIMEOUT_FACTOR% %TEST_RUNNER_EXTRA% |