Skip to content

updated license expression in manifest #44

updated license expression in manifest

updated license expression in manifest #44

Workflow file for this run

name: Rust
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
run: cargo test
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
with:
key: cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Enforce formatting
run: cargo fmt --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
key: cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Linting
run: cargo clippy -- -D warnings
coverage:
name: Code coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install tarpaulin
run: cargo install cargo-tarpaulin
- name: Generate code coverage
run: cargo tarpaulin --verbose --workspace
cli:
name: CLI Binaries
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
bin: target/release/when3meet
- os: windows-latest
target: x86_64-pc-windows-msvc
bin: target/release/when3meet.exe
- os: macOS-latest
target: x86_64-apple-darwin
bin: target/release/when3meet
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-cli
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --manifest-path ./Cargo.toml --bin when3meet
- uses: actions/upload-artifact@v2
with:
name: when3meet-${{ matrix.target }}
path: ${{ matrix.bin}}