diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index cc0f6bb0e0..f13460c7ab 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -19,7 +19,13 @@ jobs: - uses: actions-rs/cargo@v1 name: Default test with: + # Our intention here is to test `naga` with no features enabled. But + # since `cli` is the default package, a plain `cargo test` will build + # `naga` with the features requested in `cli/Cargo.toml`. Passing + # `--package naga` causes us to use the default features in the + # top-level `Cargo.toml` instead. command: test + args: --package naga - uses: actions-rs/cargo@v1 name: Test all features with: diff --git a/Cargo.toml b/Cargo.toml index 55248d678b..341a6300b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,4 +52,8 @@ rspirv = "0.7" [workspace] members = [".", "cli"] -default-members = ["cli"] + +# Include "cli", so that `cargo run` runs the CLI by default. Include ".", so +# that `cargo test` includes naga's own tests by default (but note, using the +# features that `cli/Cargo.toml` requests). +default-members = [".", "cli"]