From 894aa620775d6dd7c6909add715ee7e9f06478ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Wed, 20 Sep 2023 15:52:58 +0300 Subject: [PATCH 1/7] ci: add `+${{ matrix.toolchain }}` arg to `Test Core: test` job --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 287c7f03a..0450b6a33 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: - uses: Swatinem/rust-cache@v1 - run: rustup target add wasm32-unknown-unknown - name: Test - run: cargo test --all --features unstable,legacy + run: cargo +${{ matrix.toolchain }} test --all --features unstable,legacy lint: name: Clippy and fmt runs-on: ubuntu-latest From fa65f72a67591321930a338038d1ea32154ae421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Wed, 20 Sep 2023 15:09:37 +0300 Subject: [PATCH 2/7] build: update `schemars-0.8.13` -> `schemars-0.8.15` in ui test --- near-sdk/compilation_tests/schema_derive_invalids.stderr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/near-sdk/compilation_tests/schema_derive_invalids.stderr b/near-sdk/compilation_tests/schema_derive_invalids.stderr index 8a842a534..b179da531 100644 --- a/near-sdk/compilation_tests/schema_derive_invalids.stderr +++ b/near-sdk/compilation_tests/schema_derive_invalids.stderr @@ -84,7 +84,7 @@ error[E0277]: the trait bound `Inner: JsonSchema` is not satisfied i128 and $N others note: required by a bound in `SchemaGenerator::subschema_for` - --> $CARGO/schemars-0.8.13/src/gen.rs + --> $CARGO/schemars-0.8.15/src/gen.rs | | pub fn subschema_for(&mut self) -> Schema { | ^^^^^^^^^^ required by this bound in `SchemaGenerator::subschema_for` From 395db7566de129b159d013ddb17876c3d15b6329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Wed, 20 Sep 2023 16:40:05 +0300 Subject: [PATCH 3/7] ci: add conditional crates downgrade step for `Test Core: test` job --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0450b6a33..993f16764 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,12 @@ jobs: toolchain: ${{ matrix.toolchain }} - uses: Swatinem/rust-cache@v1 - run: rustup target add wasm32-unknown-unknown + - name: downgrade `anstyle`, `clap`, `clap_lex` crates to support older Rust toolchain + if: matrix.toolchain == '1.69.0' + run: | + cargo update -p anstyle --precise 1.0.2 + cargo update -p clap --precise 4.3.24 + cargo update -p clap_lex --precise 0.5.0 - name: Test run: cargo +${{ matrix.toolchain }} test --all --features unstable,legacy lint: From fe3e53b6e709a5db9f71aa449363c26002c68587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Wed, 20 Sep 2023 16:59:35 +0300 Subject: [PATCH 4/7] ci: add `target: wasm32-unknown-unknown` to `actions-rs/toolchain@v1` `Test Core: test` job --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 993f16764..3b3e4e63a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,14 +21,14 @@ jobs: with: profile: minimal toolchain: ${{ matrix.toolchain }} - - uses: Swatinem/rust-cache@v1 - - run: rustup target add wasm32-unknown-unknown + target: wasm32-unknown-unknown - name: downgrade `anstyle`, `clap`, `clap_lex` crates to support older Rust toolchain if: matrix.toolchain == '1.69.0' run: | cargo update -p anstyle --precise 1.0.2 cargo update -p clap --precise 4.3.24 cargo update -p clap_lex --precise 0.5.0 + - uses: Swatinem/rust-cache@v1 - name: Test run: cargo +${{ matrix.toolchain }} test --all --features unstable,legacy lint: From 1979670f6d34e8862c95415e48f325ce39f666a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Wed, 20 Sep 2023 17:28:06 +0300 Subject: [PATCH 5/7] ci: add `default:true` to `actions-rs/toolchain@v1` instead of explicit arg --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b3e4e63a..69cb7a571 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,7 @@ jobs: with: profile: minimal toolchain: ${{ matrix.toolchain }} + default: true target: wasm32-unknown-unknown - name: downgrade `anstyle`, `clap`, `clap_lex` crates to support older Rust toolchain if: matrix.toolchain == '1.69.0' @@ -30,7 +31,7 @@ jobs: cargo update -p clap_lex --precise 0.5.0 - uses: Swatinem/rust-cache@v1 - name: Test - run: cargo +${{ matrix.toolchain }} test --all --features unstable,legacy + run: cargo test --all --features unstable,legacy lint: name: Clippy and fmt runs-on: ubuntu-latest From 80e6c9a5a82c813aeba51d1b0c580f6a134c947e Mon Sep 17 00:00:00 2001 From: Vlad Frolov Date: Wed, 20 Sep 2023 20:30:05 +0200 Subject: [PATCH 6/7] chore: explicitly set `stable` as default toolchain as otherwise if we ever will update `toolchain` we may not notice that it was not actually selected --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 69cb7a571..fda14f938 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,7 @@ jobs: with: profile: minimal toolchain: stable + default: true components: rustfmt, clippy - uses: Swatinem/rust-cache@v1 - name: Test Format @@ -57,6 +58,7 @@ jobs: with: profile: minimal toolchain: stable + default: true - uses: Swatinem/rust-cache@v1 - run: cargo check -p near-sdk --features unstable,legacy - run: cargo check -p near-sdk --no-default-features @@ -74,6 +76,7 @@ jobs: with: profile: minimal toolchain: stable + default: true - uses: Swatinem/rust-cache@v1 - name: Install Audit run: cargo install cargo-audit From f7ef74a57f717aed9bfa6d2642c995255c370522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Wed, 20 Sep 2023 22:37:01 +0300 Subject: [PATCH 7/7] build: whitespace change to trigger rebuild --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fda14f938..1cac7e6c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: toolchain: ${{ matrix.toolchain }} default: true target: wasm32-unknown-unknown - - name: downgrade `anstyle`, `clap`, `clap_lex` crates to support older Rust toolchain + - name: downgrade `anstyle`,`clap`,`clap_lex` crates to support older Rust toolchain if: matrix.toolchain == '1.69.0' run: | cargo update -p anstyle --precise 1.0.2