actions: simplify ci

This commit is contained in:
figsoda 2021-10-05 10:30:15 -04:00
parent 00e9fbdbf6
commit 041a932fc1

View file

@ -24,60 +24,23 @@ jobs:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Install rust toolchain
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
default: true
- name: Cargo build
uses: actions-rs/cargo@v1.0.3
with:
command: build
args: --target ${{ matrix.target }}
run: |
rustup toolchain install stable --profile minimal
cargo +stable build
env:
GEN_COMPLETIONS: 1
clippy:
name: clippy
clippy-rustfmt:
name: clippy-rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Install rust toolchain
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: stable
components: clippy
default: true
- name: Cargo clippy
uses: actions-rs/cargo@v1.0.3
with:
command: clippy
args: -- -D warnings
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Install rust toolchain
uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: nightly
components: rustfmt
default: true
- name: Cargo fmt
uses: actions-rs/cargo@v1.0.3
with:
command: fmt
args: -- --check
- name: "Cargo: clippy, fmt"
run: |
rustup toolchain install stable --profile minimal -c clippy
rustup toolchain install nightly --profile minimal -c rustfmt
cargo +stable clippy -- -D warnings
cargo +nightly fmt -- --check