aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2023-09-29 13:56:31 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2023-09-29 16:13:24 +0200
commitc2b9192dfc0aa2ff40ecd19c2a034e06cea2124e (patch)
tree3edcc9ed4885a5c9dceda34f2c89cf74be3ea1b0
parenteef38cea67d98249b3e0720961ac119f5c7858b0 (diff)
downloadaskama-c2b9192dfc0aa2ff40ecd19c2a034e06cea2124e.tar.gz
askama-c2b9192dfc0aa2ff40ecd19c2a034e06cea2124e.tar.bz2
askama-c2b9192dfc0aa2ff40ecd19c2a034e06cea2124e.zip
Use externally maintained Actions
Diffstat (limited to '')
-rw-r--r--.github/actions/setup/action.yml35
-rw-r--r--.github/workflows/rust.yml13
2 files changed, 5 insertions, 43 deletions
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
deleted file mode 100644
index c2d9be5..0000000
--- a/.github/actions/setup/action.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: Setup Rust Environment
-
-inputs:
- key:
- description: Cache key
- required: true
- toolchain:
- description: Pass-through to toolchain on actions-rs
- default: stable
- required: false
- components:
- description: Pass-through to components on actions-rs
- required: false
-
-runs:
- using: composite
- steps:
- - uses: actions-rs/toolchain@v1
- id: toolchain-install
- with:
- profile: minimal
- override: true
- toolchain: ${{ inputs.toolchain }}
- components: ${{ inputs.components }}
- - uses: actions/cache@v3
- with:
- path: |
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
- target/
- key: ${{ inputs.key }}-${{ runner.os }}-${{ inputs.toolchain }}-${{ steps.toolchain-install.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
- restore-keys: |
- ${{ inputs.key }}-${{ runner.os }}-${{ inputs.toolchain }}-${{ steps.toolchain-install.outputs.rustc_hash }}-
- ${{ inputs.key }}-${{ runner.os }}-${{ inputs.toolchain }}-
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index b4ba2bb..6e4ed4e 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -21,10 +21,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- - uses: ./.github/actions/setup
+ - uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- key: test-${{ matrix.os }}-${{ matrix.rust }}
+ - uses: Swatinem/rust-cache@v2
- run: cargo build --all-targets
- run: cargo test
@@ -39,10 +39,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- - uses: ./.github/actions/setup
- with:
- key: ${{ matrix.package }}
- components: clippy
+ - uses: Swatinem/rust-cache@v2
- run: cd ${{ matrix.package }} && cargo test --all-targets
- run: cd ${{ matrix.package }} && cargo clippy --all-targets -- -D warnings
@@ -50,9 +47,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- - uses: ./.github/actions/setup
+ - uses: dtolnay/rust-toolchain@stable
with:
- key: lint
components: rustfmt, clippy
+ - uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets -- -D warnings