Submodule, api_gen rework #78
Workflow file for this run
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
on: | |
push: | |
pull_request: | |
jobs: | |
rust: | |
name: Lint Rust code | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Cargo clippy | |
run: cargo clippy --workspace --all-targets -- -D warnings | |
- name: Cargo test | |
run: cargo test --workspace | |
- name: Cargo doc | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
run: cargo doc --all --all-features | |
rust-msrv: | |
name: Build-test MSRV (1.74) with minal crate dependencies | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- name: Generate minimal-version dependencies | |
run: cargo -Zminimal-versions generate-lockfile | |
- uses: dtolnay/[email protected] | |
- name: Cargo check | |
run: cargo check --workspace --all-targets | |
generate: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout submodule | |
# Manually update submodules with --checkout because they are configured with update=none and will be skipped otherwise | |
run: git submodule update --recursive --init --force --checkout | |
- name: Run generator | |
run: cargo r -p api_gen | |
- name: Normalize line endings | |
run: | | |
git add --renormalize -u | |
git reset | |
- name: Diff autogen result | |
shell: bash | |
run: test -z "$(git status --porcelain)" || (echo "::error::Generated files are different, please regenerate with cargo run -p api_gen!"; git diff; false) |