Skip to content

Commit

Permalink
Debug environment
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Nov 24, 2023
1 parent 2308738 commit 91fe29e
Showing 1 changed file with 3 additions and 142 deletions.
145 changes: 3 additions & 142 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,145 +51,6 @@ jobs:
with:
arch: x64

- name: Check MSBuild and Qt
run: |
msbuild -version | Out-File -FilePath "$env:GITHUB_WORKSPACE\msbuild_version"
Get-Content -Path "$env:GITHUB_WORKSPACE\msbuild_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"
- name: Restore static Qt cache
id: static-qt-cache
uses: actions/cache/restore@v3
with:
path: C:\Qt_static
key: ${{ github.job }}-static-qt-${{ hashFiles('msbuild_version', 'qt_url', 'qt_conf') }}

- name: Build static Qt. Download
if: steps.static-qt-cache.outputs.cache-hit != 'true'
shell: cmd
run: |
curl --location --output C:\qt-src.zip %CI_QT_URL%
choco install --yes --no-progress jom
- name: Build static Qt. Expand source archive
if: steps.static-qt-cache.outputs.cache-hit != 'true'
shell: cmd
run: tar -xf C:\qt-src.zip -C C:\

- name: Build static Qt. Create build directory
if: steps.static-qt-cache.outputs.cache-hit != 'true'
run: |
Rename-Item -Path "C:\$env:CI_QT_DIR" -NewName "C:\qt-src"
New-Item -ItemType Directory -Path "C:\qt-src\build"
- name: Build static Qt. Configure
if: steps.static-qt-cache.outputs.cache-hit != 'true'
working-directory: C:\qt-src\build
shell: cmd
run: ..\configure %CI_QT_CONF% -prefix C:\Qt_static

- name: Build static Qt. Build
if: steps.static-qt-cache.outputs.cache-hit != 'true'
working-directory: C:\qt-src\build
shell: cmd
run: jom

- name: Build static Qt. Install
if: steps.static-qt-cache.outputs.cache-hit != 'true'
working-directory: C:\qt-src\build
shell: cmd
run: jom install

- name: Save static Qt cache
if: steps.static-qt-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
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
with:
path: |
C:\ProgramData\chocolatey\lib\ccache
C:\ProgramData\chocolatey\bin\ccache.exe
C:\ccache\cl.exe
key: ${{ github.job }}-ccache-installation-${{ env.CI_CCACHE_VERSION }}

- name: Install Ccache
if: steps.ccache-installation-cache.outputs.cache-hit != 'true'
run: |
choco install --yes --no-progress ccache --version=$env:CI_CCACHE_VERSION
New-Item -ItemType Directory -Path "C:\ccache"
Copy-Item -Path "$env:ChocolateyInstall\lib\ccache\tools\ccache-$env:CI_CCACHE_VERSION-windows-x86_64\ccache.exe" -Destination "C:\ccache\cl.exe"
- name: Restore Ccache cache
id: ccache-cache
uses: actions/cache/restore@v3
with:
path: ~/AppData/Local/ccache
key: ${{ github.job }}-ccache-${{ github.run_id }}
restore-keys: ${{ github.job }}-ccache-

- name: Using vcpkg with MSBuild
run: |
Set-Location "$env:VCPKG_INSTALLATION_ROOT"
Add-Content -Path "triplets\x64-windows-static.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
vcpkg --vcpkg-root "$env:VCPKG_INSTALLATION_ROOT" integrate install
git rev-parse HEAD | Out-File -FilePath "$env:GITHUB_WORKSPACE\vcpkg_commit"
Get-Content -Path "$env:GITHUB_WORKSPACE\vcpkg_commit"
- name: vcpkg tools cache
uses: actions/cache@v3
with:
path: C:/vcpkg/downloads/tools
key: ${{ github.job }}-vcpkg-tools

- name: vcpkg binary cache
uses: actions/cache@v3
with:
path: ~/AppData/Local/vcpkg/archives
key: ${{ github.job }}-vcpkg-binary-${{ hashFiles('vcpkg_commit', 'msbuild_version', 'build_msvc/vcpkg.json') }}

- name: Generate project files
run: py -3 build_msvc\msvc-autogen.py

- name: Build
shell: cmd
run: |
ccache --zero-stats
msbuild build_msvc\bitcoin.sln -property:CLToolPath=C:\ccache;CLToolExe=cl.exe;UseMultiToolTask=true;Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
- name: Ccache stats
run: ccache --show-stats

- name: Save Ccache cache
uses: actions/cache/save@v3
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 unit tests
run: src\test_bitcoin.exe -l test_suite

- name: Run benchmarks
run: src\bench_bitcoin.exe -sanity-check

- name: Run util tests
run: py -3 test\util\test_runner.py

- name: Run rpcauth test
run: py -3 test\util\rpcauth-test.py

- name: Run functional tests
# Don't run functional tests for pull requests.
# The test suit regularly fails to complete in windows native github
# actions as a child process stops making progress. The root cause has
# not yet been determined.
# Discussed in https://github.com/bitcoin/bitcoin/pull/28509
if: github.event_name != 'pull_request'
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 --extended
- run: |
Write-Host "$env:VCToolsVersion"
Write-Host "$env:VisualStudioVersion"

0 comments on commit 91fe29e

Please sign in to comment.