From fc0bba3a0d12741cbd3c1965eade8635d0cf3752 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Mon, 8 Apr 2024 19:01:38 -0400 Subject: [PATCH] Add CI checks for copy-packetline For the real purpose of this new check, which is to verify that `just copy-packetline` has been run when needed, to ensure that gix-packetline-blocking/src is not out of date, it should only be necessary to run this check on one platform. So this should probably be changed to `runs-on: ubuntu-latest` instead of a matrix strategy soon. I'm running it on three platforms initially to check the script (though some functionality of the script is not exercised). I've also tested the script locally on Ubuntu 22.04.4 LTS, and on Windows 10 (in Git Bash). --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ddef665b6d..97d34adf584 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,6 +168,7 @@ jobs: - uses: EmbarkStudios/cargo-deny-action@v1 with: command: check ${{ matrix.checks }} + wasm: name: WebAssembly runs-on: ubuntu-latest @@ -188,3 +189,27 @@ jobs: name: crates with 'wasm' feature - run: cd gix-pack && cargo build --all-features --target ${{ matrix.target }} name: gix-pack with all features (including wasm) + + check-packetline: + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@v1 + with: + toolchain: stable + - uses: extractions/setup-just@v2 + - name: Check that working tree is initially clean + run: git status | tee | grep -qF 'nothing to commit, working tree clean' + - name: Regenerate gix-packetline-blocking/src + run: just copy-packetline + - name: Check that gix-packetline-blocking/src was already up to date + run: git status | tee | grep -qF 'nothing to commit, working tree clean'