Skip to content

Commit

Permalink
feat: Add rust-cache (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurosakishigure authored Dec 19, 2024
1 parent 175d382 commit ba4320b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.job.target }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Checkout repository
uses: actions/checkout@v4
- name: Install cross
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.job.target }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Install cross
if: matrix.job.use-cross
uses: taiki-e/install-action@v2
Expand Down Expand Up @@ -74,6 +76,8 @@ jobs:
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Build for release
run: cargo build --target ${{ matrix.target }} --release
- name: Run executable
Expand All @@ -91,6 +95,8 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all --check

Expand All @@ -104,6 +110,8 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Clippy Check
run: cargo clippy -- -D warnings

Expand All @@ -115,6 +123,8 @@ jobs:
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-tarpaulin
uses: taiki-e/install-action@v2
with:
Expand Down

0 comments on commit ba4320b

Please sign in to comment.