diff options
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r-- | .github/workflows/ci.yml | 51 |
1 files changed, 35 insertions, 16 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8262b9f90..a5c322fc23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ env: jobs: test-each-commit: name: 'test each commit' - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 if: github.event_name == 'pull_request' && github.event.pull_request.commits != 1 timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes. Assuming a worst case time of 1 hour per commit, this leads to a --max-count=6 below. env: @@ -62,12 +62,12 @@ jobs: echo "TEST_BASE=$(git rev-list -n$((${{ env.MAX_COUNT }} + 1)) --reverse HEAD ^$(git rev-list -n1 --merges HEAD)^@ | head -1)" >> "$GITHUB_ENV" - run: | sudo apt-get update - sudo apt-get install clang-15 ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y + sudo apt-get install clang ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libnatpmp-dev qtbase5-dev qttools5-dev qttools5-dev-tools qtwayland5 libqrencode-dev -y - name: Compile and run tests run: | # Run tests on commits after the last merge commit and before the PR head commit # Use clang++, because it is a bit faster and uses less memory than g++ - git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && ./autogen.sh && CC=clang-15 CXX=clang++-15 ./configure && make clean && make -j $(nproc) check && ./test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }} + git rebase --exec "echo Running test-one-commit on \$( git log -1 ) && ./autogen.sh && CC=clang CXX=clang++ ./configure && make clean && make -j $(nproc) check && ./test/functional/test_runner.py -j $(( $(nproc) * 2 ))" ${{ env.TEST_BASE }} macos-native-x86_64: name: 'macOS 13 native, x86_64, no depends, sqlite only, gui' @@ -96,14 +96,17 @@ jobs: - name: Install Homebrew packages env: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 - run: brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode + 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@v3 + uses: actions/cache/restore@v4 with: path: ${{ env.CCACHE_DIR }} key: ${{ github.job }}-ccache-${{ github.run_id }} @@ -113,7 +116,7 @@ jobs: run: ./ci/test_run_all.sh - name: Save Ccache cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true' with: path: ${{ env.CCACHE_DIR }} @@ -148,18 +151,20 @@ jobs: with: arch: x64 - - name: Check MSBuild and Qt + - name: Get tool information run: | 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" - Get-Content -Path "$env:GITHUB_WORKSPACE\toolset_version" + Write-Host "VCToolsVersion $(Get-Content -Path "$env:GITHUB_WORKSPACE\toolset_version")" $env:CI_QT_URL | Out-File -FilePath "$env:GITHUB_WORKSPACE\qt_url" $env:CI_QT_CONF | Out-File -FilePath "$env:GITHUB_WORKSPACE\qt_conf" + py -3 --version + Write-Host "PowerShell version $($PSVersionTable.PSVersion.ToString())" - name: Restore static Qt cache id: static-qt-cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: C:\Qt_static key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }} @@ -202,14 +207,14 @@ jobs: - name: Save static Qt cache if: steps.static-qt-cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 with: path: C:\Qt_static key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }} - name: Ccache installation cache id: ccache-installation-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | C:\ProgramData\chocolatey\lib\ccache @@ -226,7 +231,7 @@ jobs: - name: Restore Ccache cache id: ccache-cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: path: ~/AppData/Local/ccache key: ${{ github.job }}-ccache-${{ github.run_id }} @@ -242,13 +247,13 @@ jobs: Get-Content -Path "$env:GITHUB_WORKSPACE\vcpkg_commit" - name: vcpkg tools cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: C:/vcpkg/downloads/tools key: ${{ github.job }}-vcpkg-tools - name: vcpkg binary cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/AppData/Local/vcpkg/archives key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('vcpkg_commit', 'msbuild_version', 'toolset_version', 'build_msvc/vcpkg.json') }} @@ -266,7 +271,7 @@ jobs: run: ccache --show-stats - name: Save Ccache cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true' with: path: ~/AppData/Local/ccache @@ -288,4 +293,18 @@ jobs: - name: Run functional tests env: TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }} - run: py -3 test\functional\test_runner.py --jobs $env:NUMBER_OF_PROCESSORS --ci --quiet --tmpdirprefix=$env:RUNNER_TEMP --combinedlogslen=99999999 --timeout-factor=$env:TEST_RUNNER_TIMEOUT_FACTOR $env:TEST_RUNNER_EXTRA + 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% + + - name: Clone fuzz corpus + run: | + git clone --depth=1 https://github.com/bitcoin-core/qa-assets "$env:RUNNER_TEMP\qa-assets" + Set-Location "$env:RUNNER_TEMP\qa-assets" + Write-Host "Using qa-assets repo from commit ..." + git log -1 + + - name: Run fuzz binaries + env: + BITCOINFUZZ: "${{ github.workspace}}\\src\\fuzz.exe" + shell: cmd + run: py -3 test\fuzz\test_runner.py --par %NUMBER_OF_PROCESSORS% --loglevel DEBUG %RUNNER_TEMP%\qa-assets\fuzz_seed_corpus |