|
| 1 | +name: bitcoin-core-ci |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + runs-on: windows-latest |
| 8 | + env: |
| 9 | + PYTHONUTF8: 1 |
| 10 | + QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.4/Qt5.9.8_x64_static_vs2019.zip' |
| 11 | + QT_DOWNLOAD_HASH: 'f285cbb02bec3b3f3cc2621e3fa7d5edf0d6a66fa30c57859e583acda954ea80' |
| 12 | + QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019' |
| 13 | + VCPKG_INSTALL_PATH: "$env:VCPKG_INSTALLATION_ROOT/installed" |
| 14 | + PLATFORM: x64 |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v1 |
| 17 | + |
| 18 | + - uses: actions/cache@v1 |
| 19 | + id: vcpkgcache |
| 20 | + with: |
| 21 | + path: C:/vcpkg/installed |
| 22 | + key: ${{ runner.os }}-vcpkg |
| 23 | + |
| 24 | + - name: Update vcpkg and install packages |
| 25 | + if: steps.vcpkgcache.outputs.cache-hit != 'true' |
| 26 | + run: | |
| 27 | + $env:PACKAGES = Get-Content -Path "$env:GITHUB_WORKSPACE/build_msvc/vcpkg-packages.txt" |
| 28 | + Write-Host "vcpkg list: $env:PACKAGES" |
| 29 | + cd $env:VCPKG_INSTALLATION_ROOT |
| 30 | + git pull origin master |
| 31 | + .\bootstrap-vcpkg.bat |
| 32 | + .\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null |
| 33 | + - name: Install prebuilt Qt libraries |
| 34 | + run: | |
| 35 | + if(!(Test-Path -Path ($env:QT_LOCAL_PATH))) { |
| 36 | + Write-Host "Downloading Qt binaries."; |
| 37 | + Invoke-WebRequest -Uri $env:QT_DOWNLOAD_URL -Out qtdownload.zip; |
| 38 | + Write-Host "Qt binaries successfully downloaded, checking hash against $env:QT_DOWNLOAD_HASH..."; |
| 39 | + if((Get-FileHash qtdownload.zip).Hash -eq $env:QT_DOWNLOAD_HASH) { |
| 40 | + Expand-Archive qtdownload.zip -DestinationPath $env:QT_LOCAL_PATH; |
| 41 | + Write-Host "Qt binary download matched the expected hash."; |
| 42 | + } |
| 43 | + else { |
| 44 | + Write-Host "ERROR: Qt binary download did not match the expected hash."; |
| 45 | + exit 1 |
| 46 | + } |
| 47 | + } |
| 48 | + else { |
| 49 | + Write-Host "Qt binaries already present."; |
| 50 | + } |
| 51 | + - name: Generate project files |
| 52 | + run: python build_msvc\msvc-autogen.py |
| 53 | + - name: Setup MSBuild.exe |
| 54 | + uses: warrenbuckley/Setup-MSBuild@v1 |
| 55 | + - name: vcpkg integration |
| 56 | + run: C:/vcpkg/vcpkg.exe integrate install |
| 57 | + - name: Build |
| 58 | + run: msbuild build_msvc\bitcoin.sln /m /v:n /p:Configuration=Release |
| 59 | + - name: Run test_bticoin |
| 60 | + shell: cmd |
| 61 | + run: src\test_bitcoin.exe -k stdout -e stdout 2> NUL |
| 62 | + - name: Run bench_bitcoin |
| 63 | + shell: cmd |
| 64 | + run: src\bench_bitcoin.exe -evals=1 -scaling=0 > NUL |
| 65 | + - name: bitcoin-util-test |
| 66 | + run: python test\util\bitcoin-util-test.py |
| 67 | + - name: rpcauth-test |
| 68 | + shell: cmd |
| 69 | + run: python test\util\rpcauth-test.py |
| 70 | +# This step fails due to character UTF encoding error. If anyone knows how Python deals with Unicode they might be |
| 71 | +# able to decipher the error message. |
| 72 | +# - name: test_runner |
| 73 | +# shell: cmd |
| 74 | +# run: | |
| 75 | +# python test\functional\test_runner.py --ansi --ci --quiet --combinedlogslen=4000 --failfast --exclude feature_fee_estimation |
| 76 | + |
0 commit comments