From 9e25da17e449ab4d3eae151487a7b7847019eb2d Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Fri, 4 Aug 2023 15:46:17 +0300 Subject: [PATCH] chore: bump MSRV and use stable in actions Signed-off-by: Lachezar Lechev --- .github/workflows/build.yml | 17 ++++++++++------- .github/workflows/release.yml | 21 +++++++-------------- Cargo.lock | 4 ++-- Cargo.toml | 2 ++ 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28d7404..7db6bcd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,13 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 - - name: Set default rust toolchain - run: rustup default 1.61.0 - - name: Install rustfmt - run: rustup component add rustfmt - - name: Install clippy - run: rustup component add clippy + uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt - name: Rust cache uses: Swatinem/rust-cache@v2 - name: Build code @@ -25,3 +22,9 @@ jobs: run: cargo fmt --all -- --check - name: Lint code run: cargo clippy --all -- -D warnings + + # MSRV + - name: Check MSRV + uses: dtolnay/rust-toolchain@1.66.1 + - name: Cargo check + run: cargo check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d35140..e7af9db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,20 +20,13 @@ jobs: uses: android-actions/setup-android@v2 - name: Setup Android NDK run: yes | sdkmanager "ndk;21.0.6113669" >/dev/null - - name: Set default rust toolchain - run: rustup default 1.61.0 - - name: Install rustfmt - run: rustup component add rustfmt - - name: Install clippy - run: rustup component add clippy - - name: Add armv7 target - run: rustup target add armv7-linux-androideabi - - name: Add aarch64 target - run: rustup target add aarch64-linux-android - - name: Add i686 target - run: rustup target add i686-linux-android - - name: Add x86_64 target - run: rustup target add x86_64-linux-android + + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + # Add armv7, aarch64, i686, x86_64 targets + targets: armv7-linux-androideabi, aarch64-linux-android, i686-linux-android, x86_64-linux-android + - name: Rust cache uses: Swatinem/rust-cache@v2 - name: Build aar diff --git a/Cargo.lock b/Cargo.lock index 2406352..2fa4fe6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -377,9 +377,9 @@ dependencies = [ [[package]] name = "either" -version = "1.6.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "enclose" diff --git a/Cargo.toml b/Cargo.toml index 9651f9c..9179d56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Smart Code OOD"] edition = "2021" resolver = "2" +rust-version = "1.66.1" + [lib] crate_type = ["staticlib", "dylib"] path = "src/commonMain/rust/lib.rs"