Skip to content

Commit

Permalink
Merge pull request #406 from kivikakk/msrv-ci
Browse files Browse the repository at this point in the history
workflows: check MSRV in CI.
  • Loading branch information
kivikakk authored May 10, 2024
2 parents cf9d263 + f8d2f36 commit baab52b
Show file tree
Hide file tree
Showing 10 changed files with 304 additions and 508 deletions.
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

0 comments on commit baab52b

Please sign in to comment.