Skip to content

Commit

Permalink
Use it check-mode instead of check-mode.sh; test on CI
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
EliahKagan committed Nov 29, 2024
1 parent b17935b commit 2107e17
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 50 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,18 @@ jobs:
run: cd gix-pack && cargo build --all-features --target "$TARGET"

check-mode:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: extractions/setup-just@v2
- name: Find scripts with mode/shebang mismatch
run: etc/check-mode.sh
run: just check-mode

check-packetline:
strategy:
Expand Down
47 changes: 0 additions & 47 deletions etc/check-mode.sh

This file was deleted.

4 changes: 3 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ target_dir := `cargo metadata --format-version 1 | jq -r .target_directory`
ein := target_dir / "debug/ein"
gix := target_dir / "debug/gix"
jtt := target_dir / "debug/jtt"
it := target_dir / "debug/it"

# run journey tests (max)
journey-tests:
Expand Down Expand Up @@ -257,7 +258,8 @@ find-yanked:

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

# Delete gix-packetline-blocking/src and regenerate from gix-packetline/src
copy-packetline:
Expand Down

0 comments on commit 2107e17

Please sign in to comment.