From 6f824a85a0320ff492986fe5d018cf1c17db5b0f Mon Sep 17 00:00:00 2001 From: nikbott Date: Tue, 7 Jul 2026 09:17:50 -0300 Subject: [PATCH] ci: fix the self-hosted gpu job and make it opt-in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gpu job built via 'make -C cuda' and ran ./cuda/test / ./cuda/bench — none of which exist (there is no cuda/Makefile; the CUDA targets are CMake's amr_cuda_tests / amr_cuda_bench). It also ran on every push, so when the self-hosted A2000 is offline the job sits queued indefinitely and the whole run never completes (the prior dev run was auto-cancelled after ~24h). Build via CMake to the real targets, and gate the job to workflow_dispatch so GPU runtime validation is on-demand (run it when the runner is online) instead of stalling every merge. Drop continue-on-error so an opt-in run now reports failures honestly. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/ci.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc64b33..7ba3323 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,18 +137,21 @@ jobs: cmake --build build-cuda --target amr_cuda amr_cuda_tests # ------------------------------------------- GPU runtime (self-hosted) ------- - # Optional: runs only if a self-hosted runner with the `gpu` label is online - # (e.g. the project's A2000). Never blocks PRs from forks. + # Opt-in: manual `workflow_dispatch` only, run when the self-hosted GPU runner + # (the project's A2000, `gpu` label) is online. Deliberately NOT triggered on + # push/PR: with no runner online a self-hosted job sits `queued` indefinitely + # and stalls the whole run, so GPU runtime validation is on-demand instead. gpu: needs: cuda-build - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name == 'workflow_dispatch' }} runs-on: [self-hosted, linux, gpu] timeout-minutes: 30 - continue-on-error: true steps: - uses: actions/checkout@v6 - - name: Build + run CUDA tests and balance benchmark + - name: Build + run CUDA tests and balance benchmark (needs a GPU) run: | - make -C cuda ARCH=sm_86 - ./cuda/test - ./cuda/bench + cmake -B build-gpu -DCMAKE_BUILD_TYPE=Release \ + -DAMR_BUILD_CUDA=ON -DAMR_CUDA_ARCHITECTURES=86 -DBUILD_TESTING=ON + cmake --build build-gpu --parallel --target amr_cuda_tests amr_cuda_bench + ./build-gpu/amr_cuda_tests + ./build-gpu/amr_cuda_bench