mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
Merge bitcoin/bitcoin#28384: ci: Avoid oversubscription in functional tests on Windows
f2d4e510b3
ci: Avoid saving the same Ccache cache (Hennadii Stepanov)14e5de6d02
ci: Avoid oversubscription in functional tests on Windows (Hennadii Stepanov) Pull request description: This PR aims to reduce the frequency of functional test failures on Windows like this [one](https://github.com/bitcoin/bitcoin/actions/runs/6040229997): ``` 2023-09-01T01:05:01.850000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_framework.py", line 552, in start_nodes node.wait_for_rpc_connection() File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_node.py", line 296, in wait_for_rpc_connection self._raise_assertion_error("Unable to connect to bitcoind after {}s".format(self.rpc_timeout)) File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_node.py", line 177, in _raise_assertion_error raise AssertionError(self._node_msg(msg)) AssertionError: [node 1] Unable to connect to bitcoind after 2400s ``` This code has had zero failures in my personal repository in more than 25 runs (and is still counting). --- The second commit is a minor improvement to avoid "Cache save failed." warnings during job re-runs. For [example](https://github.com/bitcoin/bitcoin/actions/runs/5998688759): ![image](https://github.com/bitcoin/bitcoin/assets/32963518/d8a049df-fccd-4395-99c9-4be01d0ea706) ACKs for top commit: MarcoFalke: lgtm ACKf2d4e510b3
🐾 Tree-SHA512: 0c92817d37325a114886900e49a4d644201397d98d6ac9f2dcd41170c7e7ea2cb1873f7e51b5cb3ad3cc2e59554ad1c8f87d439ea6c1c960bf5c339153be7040
This commit is contained in:
commit
b2f1d732cb
1 changed files with 5 additions and 4 deletions
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
|
@ -52,6 +52,7 @@ jobs:
|
|||
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Restore Ccache cache
|
||||
id: ccache-cache
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
|
@ -63,7 +64,7 @@ jobs:
|
|||
|
||||
- name: Save Ccache cache
|
||||
uses: actions/cache/save@v3
|
||||
if: github.event_name != 'pull_request'
|
||||
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
|
||||
|
@ -203,6 +204,7 @@ jobs:
|
|||
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
|
||||
|
@ -243,7 +245,7 @@ jobs:
|
|||
|
||||
- name: Save Ccache cache
|
||||
uses: actions/cache/save@v3
|
||||
if: github.event_name != 'pull_request'
|
||||
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
|
||||
|
@ -264,5 +266,4 @@ jobs:
|
|||
- name: Run functional tests
|
||||
env:
|
||||
TEST_RUNNER_EXTRA: ${{ github.event_name != 'pull_request' && '--extended' || '' }}
|
||||
shell: cmd
|
||||
run: py -3 test\functional\test_runner.py --ci --quiet --tmpdirprefix=%RUNNER_TEMP% --combinedlogslen=99999999 --timeout-factor=%TEST_RUNNER_TIMEOUT_FACTOR% %TEST_RUNNER_EXTRA%
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue