add apple-darwin and pc-windows release targets #11
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: | |
push: | |
branches: [ "main" , "develop" ] | |
pull_request: | |
branches: [ "develop" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check | |
run: cargo clippy --workspace --all-targets --all-features | |
- name: rustfmt | |
run: cargo fmt --all --check | |
test: | |
needs: ["check", "dependencies-are-sorted"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@protoc | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
run: cargo test --workspace --all-features --all-targets | |
dependencies-are-sorted: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-sort | |
run: | | |
cargo install cargo-sort | |
# Work around cargo-sort not honoring workspace.exclude | |
- name: Check dependency tables | |
run: | | |
cargo sort --workspace --grouped --check |