Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianmarco Garrisi committed Feb 29, 2024
1 parent 2d1998b commit 23488a4
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 31 deletions.
39 changes: 33 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,42 @@ env:

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: stable
features: std
- rust: stable
features: serde
- rust: beta
features:
- rust: nightly
features:

steps:
- uses: actions/checkout@v2
- run: rustup target add $TARGET
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Build
run: cargo build --verbose --features "${{ matrix.features }}"

nostd_build:
runs-on: ubuntu-latest
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: $TARGET
- name: Build
run: cargo build --verbose
- name: Build with serde
run: cargo build --verbose --features serde
- name: Build for no-std
run: cargo build -v -p test-nostd --target=$TARGET

docs_rs_build:
runs-on: ubuntu-latest
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Docs.rs
run: RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
21 changes: 0 additions & 21 deletions .github/workflows/format.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Static checks

on:
push:
branches: [ "*" ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check format
run: cargo fmt --all -- --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@beta
with:
components: clippy
- run: cargo clippy --all-features

miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- run: cargo miri test
21 changes: 17 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,26 @@ env:

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: stable
features: std
- rust: stable
features: serde
- rust: beta
features:
- rust: nightly
features:

steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Run tests
run: cargo test --verbose
- name: Run tests with serde
run: cargo test --verbose --features serde
run: cargo test --verbose --features "${{ matrix.features }}"
- name: Run tests in release mode
run: cargo test --release --verbose --features "${{ matrix.features }}"

0 comments on commit 23488a4

Please sign in to comment.