Skip to content

Port to use clap

Port to use clap #48

Workflow file for this run

name: Rust
on:
push:
branches: [main]
tags:
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
jobs:
checks:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
toolchain:
- 1.71.0
- stable
- nightly
steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
with:
just-version: 1.10.0
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
override: true
components: rustfmt, clippy
target: x86_64-unknown-linux-musl
- uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-${{ hashFiles('Cargo.toml') }}-${{ matrix.toolchain }}
- name: Install musl tools
run: sudo apt-get install -y musl-tools
if: runner.os == 'Linux'
- name: Build
run: cargo build
- name: Run tests
run: |
just test
just test-init-image
cd pid1 && just test
if: runner.os == 'Linux'
- name: clippy
run: cargo clippy -- --deny "warnings"
- name: fmt
run: cargo fmt -- --check