Skip to content

Commit 935113d

Browse files
authored
move cc-test & gen-windows-sys-binding into workspace (#927)
1 parent 4f1c255 commit 935113d

31 files changed

+17
-19
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,9 @@ jobs:
8686
sudo apt-get update
8787
sudo apt-get install g++-multilib
8888
if: matrix.build == 'linux32'
89-
- run: cargo test ${{ matrix.no_run }}
90-
- run: cargo test ${{ matrix.no_run }} --features parallel
91-
- run: cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }}
92-
- run: cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }} --features parallel
93-
- run: cargo test ${{ matrix.no_run }} --manifest-path cc-test/Cargo.toml --target ${{ matrix.target }} --release
89+
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }}
90+
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --release
91+
- run: cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} --features parallel
9492

9593
# This is separate from the matrix above because there is no prebuilt rust-std component for the target.
9694
check-tvos:
@@ -105,11 +103,9 @@ jobs:
105103
rustup component add rust-src --toolchain nightly
106104
rustup default nightly
107105
shell: bash
108-
- run: cargo test -Z build-std=std --no-run --target aarch64-apple-tvos
109-
- run: cargo test -Z build-std=std --no-run --features parallel --target aarch64-apple-tvos
110-
- run: cargo test -Z build-std=std --no-run --manifest-path cc-test/Cargo.toml --target aarch64-apple-tvos
111-
- run: cargo test -Z build-std=std --no-run --manifest-path cc-test/Cargo.toml --target aarch64-apple-tvos --features parallel
112-
- run: cargo test -Z build-std=std --no-run --manifest-path cc-test/Cargo.toml --target aarch64-apple-tvos --release
106+
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos
107+
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos --release
108+
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos --features parallel
113109

114110
cuda:
115111
name: Test CUDA support
@@ -127,7 +123,7 @@ jobs:
127123
- name: Test 'cudart' feature
128124
shell: bash
129125
run: |
130-
PATH="/usr/local/cuda/bin:$PATH" cargo test --manifest-path cc-test/Cargo.toml --features test_cuda
126+
PATH="/usr/local/cuda/bin:$PATH" cargo test --manifest-path dev-tools/cc-test/Cargo.toml --features test_cuda
131127
132128
msrv:
133129
name: MSRV
@@ -148,8 +144,8 @@ jobs:
148144
run: cargo +nightly update -Zminimal-versions
149145
- name: Cache downloaded crates since 1.53 is really slow in fetching
150146
uses: Swatinem/rust-cache@v2
151-
- run: cargo check --lib
152-
- run: cargo check --lib --all-features
147+
- run: cargo check --lib -p cc
148+
- run: cargo check --lib -p cc --all-features
153149

154150
clippy:
155151
name: Clippy

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@ parallel = []
2828

2929
[dev-dependencies]
3030
tempfile = "3"
31+
32+
[workspace]
33+
members = [
34+
"dev-tools/cc-test",
35+
"dev-tools/gen-windows-sys-binding",
36+
]

cc-test/Cargo.toml renamed to dev-tools/cc-test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ doctest = false
1111
test = false
1212

1313
[build-dependencies]
14-
cc = { path = ".." }
14+
cc = { path = "../.." }
1515
which = "^4.0"
1616

1717
[features]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)