Make Lit
its own type
#98
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: Rust | |
on: | |
push: | |
branches: ["develop"] | |
pull_request: | |
branches: ["develop"] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_CHANNEL: stable | |
# Lets us format with unstable rustfmt options | |
RUST_FMT_CHANNEL: nightly | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install --profile minimal --no-self-update ${{ env.RUST_CHANNEL }} | |
rustup default ${{ env.RUST_CHANNEL }} | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Build ${{ matrix.crate }} | |
run: cargo install --root dist/ --path crates/${{ matrix.crate }} | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.crate }}-${{ matrix.os }} | |
path: dist/ | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install --profile minimal --no-self-update ${{ env.RUST_CHANNEL }} | |
rustup default ${{ env.RUST_CHANNEL }} | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run cargo test | |
run: cargo test | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install --profile minimal --component clippy --no-self-update ${{ env.RUST_CHANNEL }} | |
rustup default ${{ env.RUST_CHANNEL }} | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run clippy | |
run: cargo clippy -- -D warnings | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
run: | | |
rustup toolchain install --profile minimal --component rustfmt --no-self-update ${{ env.RUST_FMT_CHANNEL }} | |
rustup default ${{ env.RUST_CHANNEL }} | |
- name: Run cargo format | |
run: cargo +nightly fmt --all --check | |
semver: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check semver | |
uses: obi1kenobi/cargo-semver-checks-action@v1 | |
with: | |
crate-name: pindakaas |