Skip to content

Commit 86da83e

Browse files
committed
Add a custom no-op cargo test runner
1 parent 81aa642 commit 86da83e

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

.ci/cargo_glue.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# This script is used by cargo to run the test runner with the
5+
# specified arguments.
6+
#
7+
# We need this script because the cwd that cargo runs the runner in changes
8+
# depending on crate.
9+
10+
cd "$GITHUB_WORKSPACE/.ci/;
11+
echo "In glue script with cwd: $(pwd)"

.ci/config.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[target.x86_64-unknown-linux-gnu]
2+
# The command to execute instead of the compiled test binary. Cargo will append the
3+
# actual path to the compiled test executable and any arguments (like --list, --exact,
4+
# --nocapture) after this command.
5+
# We use a tool without a slash in it so cargo will search $PATH.
6+
#
7+
# Before calling the `cargo test` we append the location of the glue to the path.
8+
runner = ["cargo_glue.sh"]

.github/workflows/ci_linux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,5 @@ jobs:
152152
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
153153
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
154154
run: |
155-
echo "Stubbed out"
155+
export PATH="$PATH:$GITHUB_WORKSPACE/.ci"
156+
cargo --config .ci/config.toml test --workspace --exclude "optix" --exclude "path_tracer" --exclude "denoiser" --exclude "add" --exclude "ex*"

0 commit comments

Comments
 (0)