mirror of
https://github.com/dnaka91/obws
synced 2024-11-13 19:12:03 +00:00
Improve CI setup
This commit is contained in:
parent
5d25e9e0c6
commit
8f5fa81f12
45
.github/workflows/ci.yml
vendored
45
.github/workflows/ci.yml
vendored
@ -2,6 +2,7 @@ name: CI
|
||||
on: [pull_request, push]
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: "-C debuginfo=0 -D warnings"
|
||||
jobs:
|
||||
check:
|
||||
@ -11,22 +12,15 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: taiki-e/github-actions/install-rust@main
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
- name: Configure cache
|
||||
uses: Swatinem/rust-cache@v1
|
||||
- name: Install cargo-hack
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: install
|
||||
args: cargo-hack
|
||||
run: cargo install cargo-hack
|
||||
- name: Check feature combinations
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: hack
|
||||
args: clippy --feature-powerset --no-dev-deps
|
||||
run: cargo hack clippy --feature-powerset --no-dev-deps
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ${{ matrix.os }}
|
||||
@ -38,17 +32,13 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: taiki-e/github-actions/install-rust@main
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
override: true
|
||||
- name: Configure cache
|
||||
uses: Swatinem/rust-cache@v1
|
||||
- name: Test
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
run: cargo test
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
@ -56,28 +46,21 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Rust (nightly)
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: taiki-e/github-actions/install-rust@main
|
||||
with:
|
||||
toolchain: nightly
|
||||
override: true
|
||||
components: rustfmt
|
||||
component: rustfmt
|
||||
- name: Run rustfmt
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: -- --check
|
||||
run: cargo fmt -- --check
|
||||
- name: Setup Rust (stable)
|
||||
uses: actions-rs/toolchain@v1
|
||||
uses: taiki-e/github-actions/install-rust@main
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
component: clippy
|
||||
- name: Configure cache
|
||||
uses: Swatinem/rust-cache@v1
|
||||
- name: Run clippy
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: --all-features -- -D warnings
|
||||
run: cargo clippy -- -D warnings
|
||||
cargo-deny:
|
||||
name: Cargo Deny
|
||||
runs-on: ubuntu-latest
|
||||
@ -91,6 +74,6 @@ jobs:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Check ${{ matrix.checks }}
|
||||
uses: EmbarkStudios/cargo-deny-action@v1
|
||||
uses: dnaka91/actions/deny-check@main
|
||||
with:
|
||||
command: check ${{ matrix.checks }}
|
||||
checks: ${{ matrix.checks }}
|
||||
|
Loading…
Reference in New Issue
Block a user