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

workflows: check MSRV in CI. #406

Merged
merged 5 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Ensure declared MSRV is tested

on: [push, pull_request]

jobs:
ensure_msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: script/check-msrv-matches-workflow
44 changes: 30 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,67 @@ name: Rust

on: [push, pull_request]

env:
MSRV: 1.62.1

jobs:
build_test:
build_lib_test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- nightly
- beta
- stable
- $MSRV
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Obtain Rust
run: rustup override set ${{ matrix.rust }}
- name: Build and test
run: env SPEC=false script/cibuild
build_spec:
- name: Build library
run: cargo build --verbose --lib
- name: Build examples
run: cargo build --verbose --lib --examples
- name: Run unit tests
run: cargo test --verbose
- name: "Run README sample (TODO: update me)"
run: cargo run --example sample
build_bin_spec:
runs-on: ubuntu-latest
needs: build_test
strategy:
matrix:
rust:
- nightly
- beta
- stable
- $MSRV
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Obtain Rust
run: rustup override set ${{ matrix.rust }}
- name: Build and run spec tests
run: env SPEC=true script/cibuild
- name: Build binary
run: cargo build --verbose --bin comrak --release
- name: Run spec tests
run: script/cibuild
build_wasm:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- nightly
- beta
- stable
- $MSRV
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Obtain Rust
run: rustup override set stable
run: rustup override set ${{ matrix.rust }}
- name: Setup for wasm
run: rustup target add wasm32-unknown-unknown
- name: Build
Expand All @@ -58,6 +77,7 @@ jobs:
- nightly
- beta
- stable
- $MSRV
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -73,21 +93,17 @@ jobs:
with:
submodules: true
- name: Obtain Rust
run: rustup override set stable
run: rustup override set $MSRV
- name: Build and test with no features
run: cargo +stable build --locked --release --all-features
clippy_format:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Obtain Rust
run: rustup override set ${{ matrix.rust }}
run: rustup override set $MSRV
- name: Check clippy
run: rustup component add clippy && cargo clippy
- name: Check formatting
Expand Down
Loading