refactor: use eric/actions-rust composite action
All checks were successful
Rust Build / build (push) Successful in 4m25s
All checks were successful
Rust Build / build (push) Successful in 4m25s
This commit is contained in:
@@ -17,28 +17,11 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: https://gitea.com/actions/checkout@v4
|
||||
|
||||
- name: Get Cargo lock hash
|
||||
id: hash
|
||||
run: |
|
||||
echo "hash=$(cat Cargo.lock Cargo.toml | sha256sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache cargo + rustup
|
||||
id: cache
|
||||
uses: https://gitea.com/actions/cache@v3
|
||||
- name: Setup Rust + Cache
|
||||
id: rust
|
||||
uses: https://git.ericxliu.me/eric/actions-rust/.gitea/actions/rust-cache@main
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.rustup/toolchains
|
||||
~/.rustup/settings.toml
|
||||
target
|
||||
key: rust-Linux-${{ steps.hash.outputs.hash }}
|
||||
restore-keys: rust-Linux-
|
||||
|
||||
- name: Setup Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
toolchain: stable
|
||||
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
|
||||
Reference in New Issue
Block a user