Skip to content

Commit 93524fb

Browse files
committed
move cc-test & gen-windows-sys-binding into workspace
put these helper crates inside a new dev-tools directory to make it obvious what their purpose is
1 parent 6320cf3 commit 93524fb

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
check-tvos:
9694
name: Test aarch64-apple-tvos
@@ -104,11 +102,9 @@ jobs:
104102
rustup component add rust-src --toolchain nightly
105103
rustup default nightly
106104
shell: bash
107-
- run: cargo test -Z build-std=std --no-run --target aarch64-apple-tvos
108-
- run: cargo test -Z build-std=std --no-run --features parallel --target aarch64-apple-tvos
109-
- run: cargo test -Z build-std=std --no-run --manifest-path cc-test/Cargo.toml --target aarch64-apple-tvos
110-
- run: cargo test -Z build-std=std --no-run --manifest-path cc-test/Cargo.toml --target aarch64-apple-tvos --features parallel
111-
- run: cargo test -Z build-std=std --no-run --manifest-path cc-test/Cargo.toml --target aarch64-apple-tvos --release
105+
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos
106+
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos --release
107+
- run: cargo test -Z build-std=std --no-run --workspace --target aarch64-apple-tvos --features parallel
112108

113109
cuda:
114110
name: Test CUDA support
@@ -126,7 +122,7 @@ jobs:
126122
- name: Test 'cudart' feature
127123
shell: bash
128124
run: |
129-
PATH="/usr/local/cuda/bin:$PATH" cargo test --manifest-path cc-test/Cargo.toml --features test_cuda
125+
PATH="/usr/local/cuda/bin:$PATH" cargo test --manifest-path dev-tools/cc-test/Cargo.toml --features test_cuda
130126
131127
msrv:
132128
name: MSRV
@@ -147,8 +143,8 @@ jobs:
147143
run: cargo +nightly update -Zminimal-versions
148144
- name: Cache downloaded crates since 1.53 is really slow in fetching
149145
uses: Swatinem/rust-cache@v2
150-
- run: cargo check --lib
151-
- run: cargo check --lib --all-features
146+
- run: cargo check --lib -p cc
147+
- run: cargo check --lib -p cc --all-features
152148

153149
clippy:
154150
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)