build(deps): update swatinem/rust-cache action to v2.7.7 #393
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
on: [push, pull_request] | |
name: Continuous integration | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
RUST_BACKTRACE: short | |
RUSTUP_MAX_RETRIES: 10 | |
CARGO: cargo | |
jobs: | |
test: | |
name: Test | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
- 1.69.0 # MSRV | |
target: | |
- i686-unknown-linux-gnu | |
- x86_64-unknown-linux-gnu | |
- x86_64-unknown-linux-musl | |
- i686-pc-windows-msvc | |
- x86_64-pc-windows-msvc | |
- x86_64-apple-darwin | |
include: | |
- target: i686-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
- target: i686-pc-windows-msvc | |
os: windows-latest | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
target: ${{ matrix.target }} | |
- uses: Swatinem/rust-cache@v2.7.7 | |
with: | |
key: ${{ matrix.target }} | |
- name: Setup | Install cross [Linux] | |
if: matrix.os == 'ubuntu-latest' | |
uses: taiki-e/install-action@cross | |
- name: Setup | Use cross [Linux] | |
if: matrix.os == 'ubuntu-latest' | |
run: echo "CARGO=cross" >> $GITHUB_ENV | |
- name: Build | |
run: ${{ env.CARGO }} build --target ${{ matrix.target }} --all-features --all-targets | |
- name: Run tests | |
run: ${{ env.CARGO }} test --target ${{ matrix.target }} --all-features --all-targets | |
- name: Run clippy | |
if: matrix.toolchain == 'stable' | |
run: ${{ env.CARGO }} clippy --target ${{ matrix.target }} -- -D clippy::all | |
build_only: | |
name: Test [Build only] | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
- 1.69.0 # MSRV | |
target: | |
- x86_64-unknown-freebsd | |
- x86_64-unknown-netbsd | |
- aarch64-unknown-linux-gnu | |
- aarch64-unknown-linux-musl | |
- aarch64-pc-windows-msvc | |
- aarch64-apple-darwin | |
include: | |
- target: x86_64-unknown-freebsd | |
os: ubuntu-latest | |
- target: x86_64-unknown-netbsd | |
os: ubuntu-latest | |
- target: aarch64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: aarch64-unknown-linux-musl | |
os: ubuntu-latest | |
- target: aarch64-pc-windows-msvc | |
os: windows-latest | |
- target: aarch64-apple-darwin | |
os: macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
target: ${{ matrix.target }} | |
- uses: Swatinem/rust-cache@v2.7.7 | |
with: | |
key: ${{ matrix.target }} | |
- name: Setup | Install cross [Linux] | |
if: matrix.os == 'ubuntu-latest' | |
uses: taiki-e/install-action@cross | |
- name: Setup | Use cross [Linux] | |
if: matrix.os == 'ubuntu-latest' | |
run: echo "CARGO=cross" >> $GITHUB_ENV | |
- name: Build | |
run: ${{ env.CARGO }} build --target ${{ matrix.target }} --all-features --all-targets | |
- name: Run clippy | |
if: matrix.toolchain == 'stable' | |
run: ${{ env.CARGO }} clippy --target ${{ matrix.target }} -- -D clippy::all | |
rustfmt: | |
name: Rustfmt [Formatter] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup | Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Build | Format | |
run: cargo fmt --all -- --check |