Bump actions/cache from 2 to 4 #205
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- run: cargo fmt --check | |
- run: cargo clippy --all-targets | |
doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo gem install asciidoctor -v 2.0.18 | |
- run: asciidoctor -b manpage -a reproducible git-gone.1.adoc | |
cargo-deny: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
cargo-vet: | |
name: Vet Dependencies | |
runs-on: ubuntu-latest | |
env: | |
CARGO_VET_VERSION: "0.9.1" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ runner.tool_cache }}/cargo-vet | |
key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }} | |
- run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH | |
- run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet | |
- run: cargo vet | |
test: | |
strategy: | |
matrix: | |
target: | |
# Linux default | |
- x86_64-unknown-linux-gnu | |
# For statically linked release builds | |
- x86_64-unknown-linux-musl | |
# macOS | |
- x86_64-apple-darwin | |
# Windows | |
- x86_64-pc-windows-msvc | |
include: | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
flags: --no-default-features | |
- target: x86_64-apple-darwin | |
os: macOS-latest | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
# Install musl tools for musl target | |
- name: Install musl tools | |
run: sudo apt-get install musl-tools | |
if: "contains(matrix.target, 'musl')" | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.target }} | |
- run: cargo build --all-targets --target ${{ matrix.target }} | |
- run: cargo test --target ${{ matrix.target }} |