Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add semver checks action #120

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ jobs:
strategy:
matrix:
flags:
- --cfg async_executor_impl=\"async-std\" --cfg async_channel_impl=\"async-std\"
- --cfg async_executor_impl=\"async-std\" --cfg async_channel_impl=\"flume\"
- --cfg async_executor_impl=\"tokio\" --cfg async_channel_impl=\"tokio\"
- --cfg async_executor_impl=\"tokio\" --cfg async_channel_impl=\"flume\"
- --cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std"
- --cfg async_executor_impl="async-std" --cfg async_channel_impl="flume"
- --cfg async_executor_impl="tokio" --cfg async_channel_impl="tokio"
- --cfg async_executor_impl="tokio" --cfg async_channel_impl="flume"
runs-on: ubuntu-latest
timeout-minutes: 60
env:
RUSTFLAGS: ${{ matrix.flags }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -43,23 +45,28 @@ jobs:

- name: Build
run: |
RUSTFLAGS="${{ matrix.flags }}" cargo build --all-targets --workspace --release --features="logging-utils"
cargo build --all-targets --workspace --release --features="logging-utils"

- name: Test
run: |
RUSTFLAGS="${{ matrix.flags }}" cargo test --all-targets --workspace --release --features="logging-utils"
cargo test --all-targets --workspace --release --features="logging-utils"

- name: Lint
run: |
RUSTFLAGS="${{ matrix.flags }}" cargo clippy --workspace --all-targets --bins --tests --examples --features="logging-utils" -- -D warnings
cargo clippy --workspace --all-targets --bins --tests --examples --features="logging-utils" -- -D warnings

- name: Install cargo-semver-checks
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-semver-checks

- name: Check semver
run: cargo semver-checks

publish:
needs:
- build
runs-on: ubuntu-latest
env:
RUST_LOG: info
RUSTFLAGS: "--cfg async_executor_impl=\"async-std\" --cfg async_channel_impl=\"async-std\""
steps:
- uses: actions/checkout@v4
- uses: katyo/publish-crates@v2
Expand Down
Loading