You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@casbin.apache.org by hs...@apache.org on 2026/08/07 03:42:45 UTC

(casbin-rs) branch master updated: ci: replace unmaintained actions-rs with rustup commands

This is an automated email from the ASF dual-hosted git repository.

hsluoyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/casbin-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new 518a2f1  ci: replace unmaintained actions-rs with rustup commands
518a2f1 is described below

commit 518a2f1a2937e825786490636665938641965caa
Author: Yang Luo <hs...@gmail.com>
AuthorDate: Fri Aug 7 11:42:37 2026 +0800

    ci: replace unmaintained actions-rs with rustup commands
---
 .github/workflows/ci.yml           | 55 ++++++++++----------------------------
 .github/workflows/coverage.yml     | 18 ++++++++-----
 .github/workflows/pull_request.yml |  9 +++----
 3 files changed, 29 insertions(+), 53 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3c6844c..7d52b0d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,24 +12,18 @@ jobs:
       matrix:
         os: [ubuntu-latest, windows-latest, macos-latest]
         rust: [stable]
+    defaults:
+      run:
+        shell: bash
     steps:
       - name: Checkout Repository
         uses: actions/checkout@v4
       - name: Install Rust toolchain ${{ matrix.rust }}
-        uses: actions-rs/toolchain@v1
-        with:
-          profile: minimal
-          toolchain: ${{ matrix.rust }}
-          override: true
-      - name: Install rustfmt and clippy
         run: |
-          rustup component add rustfmt clippy || true
-      - name: Install wasm32-unknown-unknown for ${{ matrix.rust }}
-        uses: actions-rs/toolchain@v1
-        with:
-          toolchain: ${{ matrix.rust }}
-          target: wasm32-unknown-unknown
-          override: true
+          rustup toolchain install ${{ matrix.rust }} --profile minimal --component rustfmt,clippy --target wasm32-unknown-unknown
+          rustup default ${{ matrix.rust }}
+          rustc --version
+          cargo --version
       # Work around https://github.com/actions/cache/issues/403 by using GNU tar
       # instead of BSD tar.
       - name: Install GNU tar
@@ -61,39 +55,18 @@ jobs:
           path: target
           key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}-${{ secrets.CACHE_VERSION || github.run_id }}
       - name: Release build async-std
-        uses: actions-rs/cargo@v1
-        with:
-          command: build
-          args: --release --no-default-features --features runtime-async-std,cached,glob,ip,watcher,logging,incremental,explain
+        run: cargo build --release --no-default-features --features runtime-async-std,cached,glob,ip,watcher,logging,incremental,explain
       - name: Release build tokio
-        uses: actions-rs/cargo@v1
-        with:
-          command: build
-          args: --release --no-default-features --features runtime-tokio,cached,glob,ip,watcher,logging,incremental,explain
+        run: cargo build --release --no-default-features --features runtime-tokio,cached,glob,ip,watcher,logging,incremental,explain
       - name: Cargo Test For All Features Using async-std
-        uses: actions-rs/cargo@v1
-        with:
-          command: test
-          args: --no-default-features --features runtime-async-std,cached,glob,ip,watcher,logging,incremental,explain
+        run: cargo test --no-default-features --features runtime-async-std,cached,glob,ip,watcher,logging,incremental,explain
       - name: Cargo Test For All Features Using tokio
-        uses: actions-rs/cargo@v1
-        with:
-          command: test
-          args: --no-default-features --features runtime-tokio,cached,glob,ip,watcher,logging,incremental,explain
+        run: cargo test --no-default-features --features runtime-tokio,cached,glob,ip,watcher,logging,incremental,explain
       - name: Cargo Check Wasm
-        uses: actions-rs/cargo@v1
         env:
           RUSTFLAGS: '--cfg getrandom_backend="wasm_js"'
-        with:
-          command: check
-          args: --target wasm32-unknown-unknown --no-default-features --features runtime-async-std,cached,glob,ip,watcher,logging,incremental
+        run: cargo check --target wasm32-unknown-unknown --no-default-features --features runtime-async-std,cached,glob,ip,watcher,logging,incremental
       - name: Clippy warnings
-        uses: actions-rs/cargo@v1
-        with:
-          command: clippy
-          args: -- -D warnings
+        run: cargo clippy -- -D warnings
       - name: Cargo Fmt Check
-        uses: actions-rs/cargo@v1
-        with:
-          command: fmt
-          args: --all -- --check
+        run: cargo fmt --all -- --check
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 7134135..031a35a 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -16,16 +16,20 @@ jobs:
         uses: actions/checkout@v4
 
       - name: Install Rust toolchain
-        uses: actions-rs/toolchain@v1
+        run: |
+          rustup toolchain install stable --profile minimal
+          rustup default stable
+
+      - name: Cache cargo-tarpaulin
+        id: cache-tarpaulin
+        uses: actions/cache@v4
         with:
-          profile: minimal
-          toolchain: stable
-          override: true
+          path: ~/.cargo/bin/cargo-tarpaulin
+          key: ${{ runner.os }}-cargo-tarpaulin
 
       - name: Install cargo-tarpaulin
-        uses: baptiste0928/cargo-install@v3
-        with:
-          crate: cargo-tarpaulin
+        if: steps.cache-tarpaulin.outputs.cache-hit != 'true'
+        run: cargo install cargo-tarpaulin --locked
 
       - name: Run cargo-tarpaulin
         run: |
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index e4445a9..5b788e5 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -10,11 +10,10 @@ jobs:
       - uses: actions/checkout@v4
         with:
           fetch-depth: 0
-      - uses: actions-rs/toolchain@v1
-        with:
-          toolchain: stable
-          override: true
-          profile: minimal
+      - name: Install Rust toolchain
+        run: |
+          rustup toolchain install stable --profile minimal
+          rustup default stable
       - name: Cache cargo
         uses: actions/cache@v4
         with:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@casbin.apache.org
For additional commands, e-mail: commits-help@casbin.apache.org