mirror of
https://github.com/figsoda/mmtc
synced 2024-11-22 15:13:03 +00:00
actions: simplify ci
This commit is contained in:
parent
00e9fbdbf6
commit
041a932fc1
1 changed files with 11 additions and 48 deletions
59
.github/workflows/ci.yml
vendored
59
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue