From 14e5de6d0253448f9b284f0705e4697b479a8677 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 1 Sep 2023 11:08:05 +0100 Subject: [PATCH 1/2] ci: Avoid oversubscription in functional tests on Windows --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdeb6914799..2dfe43053b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -264,5 +264,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 From f2d4e510b37c0b132732ede214d29a8bf1daea93 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 1 Sep 2023 11:08:20 +0100 Subject: [PATCH 2/2] ci: Avoid saving the same Ccache cache This occurred when a job was being rerun. --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2dfe43053b0..a3b5e869bdd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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