Skip to content

Commit 2107e17

Browse files
committed
Use it check-mode instead of check-mode.sh; test on CI
- Delete the old `etc/check-mode.sh` script. - Update `justfile` recipe `check-mode` to use internal-tools. - Modify and expand `check-mode` CI job to use internal-tools. - Temporarily make `check-mode` job a matrix job to test platforms. The latter of those changes should be undone once things looks like they are working. I have manually tested `it check-mode` on Arch Linux and Windows in the same ways `check-mode.sh` was tested (and unlike with a shell-script based approach, it is not anticipated to differ on macOS). So trying three platforms on CI is a secondary supporting strategy to catch possible problems.
1 parent b17935b commit 2107e17

File tree

3 files changed

+11
-50
lines changed

3 files changed

+11
-50
lines changed

.github/workflows/ci.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,18 @@ jobs:
360360
run: cd gix-pack && cargo build --all-features --target "$TARGET"
361361

362362
check-mode:
363-
runs-on: ubuntu-latest
363+
strategy:
364+
matrix:
365+
os: [ ubuntu-latest, macos-latest, windows-latest ]
366+
367+
runs-on: ${{ matrix.os }}
364368

365369
steps:
366370
- uses: actions/checkout@v4
371+
- uses: dtolnay/rust-toolchain@stable
372+
- uses: extractions/setup-just@v2
367373
- name: Find scripts with mode/shebang mismatch
368-
run: etc/check-mode.sh
374+
run: just check-mode
369375

370376
check-packetline:
371377
strategy:

etc/check-mode.sh

-47
This file was deleted.

justfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ target_dir := `cargo metadata --format-version 1 | jq -r .target_directory`
196196
ein := target_dir / "debug/ein"
197197
gix := target_dir / "debug/gix"
198198
jtt := target_dir / "debug/jtt"
199+
it := target_dir / "debug/it"
199200

200201
# run journey tests (max)
201202
journey-tests:
@@ -257,7 +258,8 @@ find-yanked:
257258

258259
# Find shell scripts whose +x/-x bits and magic bytes (e.g. `#!`) disagree
259260
check-mode:
260-
./etc/check-mode.sh
261+
cargo build -p internal-tools
262+
{{ it }} check-mode
261263

262264
# Delete gix-packetline-blocking/src and regenerate from gix-packetline/src
263265
copy-packetline:

0 commit comments

Comments
 (0)