From 334778ded934993b847ead9d1de60c91dc4d9b71 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 8 Oct 2026 14:10:32 -0400 Subject: [PATCH 1/2] ci: overlap independent steps with background/parallel Assisted-by: ClaudeCode:claude-opus-5-5 --- .github/workflows/ci.yml | 22 +++++++------ .github/workflows/reusable-standard.yml | 43 ++++++++++++++----------- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41e21dc129..3dd5eec0e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -445,10 +445,19 @@ jobs: steps: - uses: actions/checkout@v7 - - name: Clean out unused stuff to save space - run: | - sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /opt/hostedtoolcache/CodeQL - sudo apt-get clean + - parallel: + - name: Clean out unused stuff to save space + run: | + sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /opt/hostedtoolcache/CodeQL + sudo apt-get clean + + # Downloaded with curl instead of apt: the Akamai CDN in front of + # developer.download.nvidia.com intermittently 404s, and apt neither + # retries 404s nor resumes a broken 5 GB transfer. + - name: Download NVHPC + run: | + curl -fSLO --retry 10 --retry-all-errors --retry-delay 15 --continue-at - \ + https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64/nvhpc-26-5_26.5-0_amd64.deb - name: Install 🐍 3 run: | @@ -457,13 +466,8 @@ jobs: python3 -m pip install --upgrade pip python3 -m pip install --upgrade pytest - # Downloaded with curl instead of apt: the Akamai CDN in front of - # developer.download.nvidia.com intermittently 404s, and apt neither - # retries 404s nor resumes a broken 5 GB transfer. - name: Install NVHPC run: | - curl -fSLO --retry 10 --retry-all-errors --retry-delay 15 --continue-at - \ - https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64/nvhpc-26-5_26.5-0_amd64.deb sudo apt-get install -y --no-install-recommends ./nvhpc-26-5_26.5-0_amd64.deb rm nvhpc-26-5_26.5-0_amd64.deb diff --git a/.github/workflows/reusable-standard.yml b/.github/workflows/reusable-standard.yml index 59449ac9b9..a2431e99cf 100644 --- a/.github/workflows/reusable-standard.yml +++ b/.github/workflows/reusable-standard.yml @@ -43,13 +43,15 @@ jobs: check-latest: >- ${{ inputs.python-version == '3.13' && runner.os == 'Windows' }} - - name: Setup Boost (Linux) - if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get install -y libboost-dev - - - name: Setup Boost (macOS) - if: runner.os == 'macOS' - run: brew install boost + - name: Setup Boost + id: boost + background: true + shell: bash + run: | + case "$RUNNER_OS" in + Linux) sudo apt-get update && sudo apt-get install -y libboost-dev ;; + macOS) brew install boost ;; + esac - name: Install uv uses: astral-sh/setup-uv@v10.2.0 @@ -57,7 +59,7 @@ jobs: enable-cache: true - name: Prepare env - run: uv pip install --python=python --system -r tests/requirements.txt + run: uv pip install --python=python --system -r tests/requirements.txt setuptools - name: Setup annotations on Linux if: runner.os == 'Linux' @@ -71,6 +73,9 @@ jobs: # Pass setup-python's resolved interpreter path to CMake so FindPython # does not select a different interpreter (e.g. Homebrew's 3.14 instead # of setup-python's 3.14t). + - name: Wait for Boost + wait: boost + - name: Configure run: > cmake -S. -Bbuild -Werror=dev @@ -84,20 +89,22 @@ jobs: - name: Build run: cmake --build build - - name: Python tests - run: cmake --build build --target pytest + # Python tests run pytest directly: two concurrent `cmake --build` calls + # on one build tree are not safe. + - parallel: + - name: Python tests + working-directory: build/tests + run: python -m pytest -v + + - name: Interface test + run: cmake --build build --target test_cmake_build + + - name: Setuptools helpers test + run: pytest tests/extra_setuptools - name: C++ tests timeout-minutes: 3 run: cmake --build build --target cpptest - - name: Interface test - run: cmake --build build --target test_cmake_build - - name: Visibility test run: cmake --build build --target test_cross_module_rtti - - - name: Setuptools helpers test - run: | - uv pip install --python=python --system setuptools - pytest tests/extra_setuptools From 5ff44ef2ec814c54f9804336e58b8f99fe90a053 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 8 Oct 2026 22:54:20 -0400 Subject: [PATCH 2/2] ci: keep NVHPC setup sequential Overlapping the cleanup and download saved only ~17 s, and the download competed with the cleanup for disk I/O. Assisted-by: ClaudeCode:claude-opus-5-5 --- .github/workflows/ci.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dd5eec0e4..41e21dc129 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -445,19 +445,10 @@ jobs: steps: - uses: actions/checkout@v7 - - parallel: - - name: Clean out unused stuff to save space - run: | - sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /opt/hostedtoolcache/CodeQL - sudo apt-get clean - - # Downloaded with curl instead of apt: the Akamai CDN in front of - # developer.download.nvidia.com intermittently 404s, and apt neither - # retries 404s nor resumes a broken 5 GB transfer. - - name: Download NVHPC - run: | - curl -fSLO --retry 10 --retry-all-errors --retry-delay 15 --continue-at - \ - https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64/nvhpc-26-5_26.5-0_amd64.deb + - name: Clean out unused stuff to save space + run: | + sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /opt/hostedtoolcache/CodeQL + sudo apt-get clean - name: Install 🐍 3 run: | @@ -466,8 +457,13 @@ jobs: python3 -m pip install --upgrade pip python3 -m pip install --upgrade pytest + # Downloaded with curl instead of apt: the Akamai CDN in front of + # developer.download.nvidia.com intermittently 404s, and apt neither + # retries 404s nor resumes a broken 5 GB transfer. - name: Install NVHPC run: | + curl -fSLO --retry 10 --retry-all-errors --retry-delay 15 --continue-at - \ + https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64/nvhpc-26-5_26.5-0_amd64.deb sudo apt-get install -y --no-install-recommends ./nvhpc-26-5_26.5-0_amd64.deb rm nvhpc-26-5_26.5-0_amd64.deb