updates #99
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: CI | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
push: | |
branches: [main] | |
jobs: | |
ci: | |
name: CI | |
needs: [test, rustfmt, clippy, docs, release] | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' | |
- name: Done | |
run: exit 0 | |
release: | |
name: Release | |
runs-on: windows-latest | |
needs: [test, rustfmt, clippy, docs] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 # fetch tags for publish | |
# ssh-key: "${{ secrets.COMMIT_KEY }}" # use deploy key to trigger workflow on tag | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo xtask release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
test: | |
name: Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest] | |
rust: ["1.70", nightly] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Test voicemeeter | |
run: cargo test --all-features ${{matrix.rust == 'nightly' && '--workspace --all-targets' || ''}} | |
rustfmt: | |
name: Rustfmt | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- name: Run fmt -- --check | |
run: cargo fmt -- --check | |
clippy: | |
name: Clippy | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo clippy --no-default-features -p voicemeeter | |
- run: cargo clippy --no-default-features --features "interface" -p voicemeeter | |
- run: cargo clippy --all-targets --all-features --workspace | |
docs: | |
name: Docs | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
- uses: Swatinem/rust-cache@v2 | |
# We do the following to make sure docs.rs can document properly without anything broken, and that docs are working. | |
- name: Run doc tests | |
run: cargo test --doc --all-features | |
- name: Compile docs | |
run: cargo doc --all-features --no-deps -Zrustdoc-map |