From e6643c083da75d7b5bc9ba3a8ea736e555030495 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 14 Jul 2023 12:32:14 +1000 Subject: [PATCH 1/2] CI: Pin dependencies for MSRV build ... properly Commit `0e0dcb7f CI: Pin dependencies required for MSRV build` is totally wrong, why did it get through CI? In the CI script do: - `serde_json` is not a dependency of `secp256k1`, remove the pinning - Put the pinning _before_ any call to `cargo` - Pin the transient dependency `wasm-bindgen-test` --- contrib/test.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/contrib/test.sh b/contrib/test.sh index 8cf87a5..e76c193 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -13,19 +13,18 @@ if cargo --version | grep nightly; then NIGHTLY=true fi +# Pin dependencies as required if we are using MSRV toolchain. +if cargo --version | grep "1\.48"; then + cargo update -p wasm-bindgen-test --precise 0.3.34 + cargo update -p serde --precise 1.0.156 +fi + # Test if panic in C code aborts the process (either with a real panic or with SIGILL) cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally' 2>&1 | tee /dev/stderr | grep "SIGILL\\|panicked at '\[libsecp256k1\]" # Make all cargo invocations verbose export CARGO_TERM_VERBOSE=true -# Pin dependencies as required if we are using MSRV toolchain. -if cargo --version | grep "1\.48"; then - # 1.0.157 uses syn 2.0 which requires edition 2021 - cargo update -p serde_json --precise 1.0.99 - cargo update -p serde --precise 1.0.156 -fi - # Defaults / sanity checks cargo build --all cargo test --all From 567c39c7f1ff8e1602e7317f7ec04173e3150410 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 13 Jul 2023 09:06:01 +1000 Subject: [PATCH 2/2] Revert "WIP: Add toolchain matrix to job" This reverts commit 77808b7d837da2a1c99f2a7b46213efe04e5f7dd. dtolnay/rust-toolchain does not support using a matrix as far as I can tell. Since the PR brief description contains "WIP" it looks like the original author (me) was testing this using CI, no idea how this patch got merged. --- .github/workflows/rust.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1cd4186..9297ba0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -105,16 +105,13 @@ jobs: WASM: name: WASM runs-on: ubuntu-latest - strategy: - matrix: - toolchain: [stable, beta, nightly, 1.48.0] steps: - name: Checkout Crate uses: actions/checkout@v3 - name: Install clang run: sudo apt-get install -y clang - name: Checkout Toolchain - uses: dtolnay/rust-toolchain@${{ matrix.toolchain }} + uses: dtolnay/rust-toolchain@stable - name: Running WASM tests env: DO_WASM: true