From e343e6aa57b1c7f6dfaa13cb992f02cc3b3b9890 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Tue, 15 Apr 2025 17:38:04 -0400 Subject: [PATCH 1/9] Add a custom no-op cargo test runner --- .ci/cargo_glue.sh | 11 +++++++++++ .ci/config.toml | 8 ++++++++ .github/workflows/ci_linux.yml | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .ci/cargo_glue.sh create mode 100644 .ci/config.toml diff --git a/.ci/cargo_glue.sh b/.ci/cargo_glue.sh new file mode 100644 index 00000000..727b6a1f --- /dev/null +++ b/.ci/cargo_glue.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + +# This script is used by cargo to run the test runner with the +# specified arguments. +# +# We need this script because the cwd that cargo runs the runner in changes +# depending on crate. + +cd "$GITHUB_WORKSPACE/.ci/; +echo "In glue script with cwd: $(pwd)" diff --git a/.ci/config.toml b/.ci/config.toml new file mode 100644 index 00000000..d860b86e --- /dev/null +++ b/.ci/config.toml @@ -0,0 +1,8 @@ +[target.x86_64-unknown-linux-gnu] +# The command to execute instead of the compiled test binary. Cargo will append the +# actual path to the compiled test executable and any arguments (like --list, --exact, +# --nocapture) after this command. +# We use a tool without a slash in it so cargo will search $PATH. +# +# Before calling the `cargo test` we append the location of the glue to the path. +runner = ["cargo_glue.sh"] diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index fe12895a..cdaa1823 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -152,7 +152,8 @@ jobs: MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} run: | - echo "Stubbed out" + export PATH="$PATH:$GITHUB_WORKSPACE/.ci" + cargo --config .ci/config.toml test --workspace --exclude "optix" --exclude "path_tracer" --exclude "denoiser" --exclude "add" --exclude "ex*" compiletest: name: Compile tests runs-on: ubuntu-latest From 04b1c0a237d3acc1aeac7e6b6a6e10874bb54dbc Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Tue, 15 Apr 2025 17:40:40 -0400 Subject: [PATCH 2/9] Output args so we can see --- .ci/cargo_glue.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/cargo_glue.sh b/.ci/cargo_glue.sh index 727b6a1f..e1da2066 100644 --- a/.ci/cargo_glue.sh +++ b/.ci/cargo_glue.sh @@ -9,3 +9,4 @@ set -e cd "$GITHUB_WORKSPACE/.ci/; echo "In glue script with cwd: $(pwd)" +echo "Got args: $@" From 430f57d999b4efe362f8463c6dec56ecd9656b2a Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Tue, 15 Apr 2025 19:33:14 -0400 Subject: [PATCH 3/9] Install rust when testing --- .github/workflows/ci_linux.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index cdaa1823..341c3010 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -147,6 +147,10 @@ jobs: - name: List downloaded files run: ls -lR ${{ needs.build.outputs.artifact_path }} + # random command that forces rustup to install stuff in rust-toolchain + - name: Install rust-toolchain + run: cargo version + - name: Run remote tests env: MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} From 1290826905acc7701f7ee6d41f53a0e7fdbe58f1 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Tue, 15 Apr 2025 19:45:27 -0400 Subject: [PATCH 4/9] Checkout repo --- .github/workflows/ci_linux.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 341c3010..8ddfb30b 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -147,10 +147,13 @@ jobs: - name: List downloaded files run: ls -lR ${{ needs.build.outputs.artifact_path }} + - name: Checkout repository + uses: actions/checkout@v4 + # random command that forces rustup to install stuff in rust-toolchain - name: Install rust-toolchain run: cargo version - + - name: Run remote tests env: MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} From 0d01f1bbec2e7b1ca11e23e3971172ff617e6d5d Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Tue, 15 Apr 2025 19:58:14 -0400 Subject: [PATCH 5/9] Make checkout first Otherwise it deletes the downloaded artifacts --- .github/workflows/ci_linux.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 8ddfb30b..f96daf48 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -138,6 +138,13 @@ jobs: - name: RockyLinux-9 / CUDA-12.8.1 image: "ghcr.io/rust-gpu/rust-cuda-rockylinux9-cuda12:latest" steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # random command that forces rustup to install stuff in rust-toolchain + - name: Install rust-toolchain + run: cargo version + - name: Download build artifacts uses: actions/download-artifact@v4 with: @@ -147,13 +154,6 @@ jobs: - name: List downloaded files run: ls -lR ${{ needs.build.outputs.artifact_path }} - - name: Checkout repository - uses: actions/checkout@v4 - - # random command that forces rustup to install stuff in rust-toolchain - - name: Install rust-toolchain - run: cargo version - - name: Run remote tests env: MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} From 1a30c61e6908e9d727b548c7cea28d24ebbf1974 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Tue, 15 Apr 2025 20:26:29 -0400 Subject: [PATCH 6/9] Add correct excludes --- .github/workflows/ci_linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index f96daf48..be5c589a 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -160,7 +160,7 @@ jobs: MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} run: | export PATH="$PATH:$GITHUB_WORKSPACE/.ci" - cargo --config .ci/config.toml test --workspace --exclude "optix" --exclude "path_tracer" --exclude "denoiser" --exclude "add" --exclude "ex*" + cargo --config .ci/config.toml test --workspace --exclude "optix*" --exclude "path_tracer" --exclude "denoiser" --exclude "ex*" --exclude "cudnn*" compiletest: name: Compile tests runs-on: ubuntu-latest From fc36ade992ff1a20f0b6e64067060c303bb57e49 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Tue, 15 Apr 2025 20:56:22 -0400 Subject: [PATCH 7/9] Make glue script executable --- .ci/cargo_glue.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .ci/cargo_glue.sh diff --git a/.ci/cargo_glue.sh b/.ci/cargo_glue.sh old mode 100644 new mode 100755 From 301a27c078d1a0a87e9f456022f097be8181adb9 Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Tue, 15 Apr 2025 21:12:03 -0400 Subject: [PATCH 8/9] Fix glue code quotes --- .ci/cargo_glue.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/cargo_glue.sh b/.ci/cargo_glue.sh index e1da2066..cc424b5e 100755 --- a/.ci/cargo_glue.sh +++ b/.ci/cargo_glue.sh @@ -7,6 +7,6 @@ set -e # We need this script because the cwd that cargo runs the runner in changes # depending on crate. -cd "$GITHUB_WORKSPACE/.ci/; +cd "$GITHUB_WORKSPACE/.ci/" echo "In glue script with cwd: $(pwd)" echo "Got args: $@" From decbc43ac3472fee8d25547d94275b57cce0f33f Mon Sep 17 00:00:00 2001 From: Christian Legnitto Date: Wed, 16 Apr 2025 09:31:10 -0400 Subject: [PATCH 9/9] Exclude blastoff for now --- .github/workflows/ci_linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index be5c589a..cc3e053a 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -160,7 +160,7 @@ jobs: MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} run: | export PATH="$PATH:$GITHUB_WORKSPACE/.ci" - cargo --config .ci/config.toml test --workspace --exclude "optix*" --exclude "path_tracer" --exclude "denoiser" --exclude "ex*" --exclude "cudnn*" + cargo --config .ci/config.toml test --workspace --exclude "optix*" --exclude "path_tracer" --exclude "denoiser" --exclude "ex*" --exclude "cudnn*" --exclude "blastoff" compiletest: name: Compile tests runs-on: ubuntu-latest