Skip to content

Merge pull request #179 from rnestler/prepare-0.8.0-release #370

Merge pull request #179 from rnestler/prepare-0.8.0-release

Merge pull request #179 from rnestler/prepare-0.8.0-release #370

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
RUSTUP_HOME: /root/.rustup
jobs:
build_and_test:
runs-on: ubuntu-22.04
container: rnestler/archlinux-rust:1.78.0
steps:
- run: pacman -Syu --noconfirm
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v3
with:
path: target/
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- run: cargo build
- run: cargo test
lint:
runs-on: ubuntu-22.04
container: rnestler/archlinux-rust:1.78.0
steps:
- run: pacman -Syu --noconfirm
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v3
with:
path: target/
key: ${{ runner.os }}-cargo-lint-target-${{ hashFiles('**/Cargo.lock') }}
- run: rustup component add clippy
- run: cargo clippy --all-targets --all-features -- -D warnings
fmt:
runs-on: ubuntu-22.04
container: rnestler/archlinux-rust:1.78.0
steps:
- run: pacman -Syu --noconfirm
- uses: actions/checkout@v3
- run: rustup component add rustfmt
- run: cargo fmt -- --check