Ignore generated Git messages and SemVer #50
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - run: cargo fmt --all --check | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings | |
| cov: | |
| permissions: | |
| id-token: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: | | |
| cargo-llvm-cov | |
| cargo-nextest | |
| - run: mkdir -p target/llvm-cov | |
| - run: cargo llvm-cov nextest --workspace --all-targets --all-features --locked --fail-under-regions 90 --codecov --output-path target/llvm-cov/codecov.json | |
| - if: github.ref_type != 'tag' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| use_oidc: true | |
| report_type: coverage | |
| disable_search: true | |
| files: target/llvm-cov/codecov.json | |
| - if: github.ref_type != 'tag' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: true | |
| use_oidc: true | |
| report_type: test_results | |
| disable_search: true | |
| files: target/nextest/default/junit.xml | |
| publish: | |
| if: github.ref_type == 'tag' | |
| needs: | |
| - fmt | |
| - clippy | |
| - cov | |
| environment: publish | |
| permissions: | |
| id-token: write | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - uses: rust-lang/crates-io-auth-action@v1 | |
| id: auth | |
| - run: cargo publish --workspace --all-features --locked | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| - uses: taiki-e/create-gh-release-action@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| binaries: | |
| needs: | |
| - publish | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-24.04-arm | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| - target: aarch64-pc-windows-msvc | |
| os: windows-11-arm | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| - if: runner.os == 'macOS' | |
| run: brew install lld | |
| - uses: taiki-e/upload-rust-binary-action@v1 | |
| with: | |
| bin: commit-lint | |
| archive: atypical-commit-$tag-$target | |
| package: atypical-commit | |
| locked: true | |
| target: ${{ matrix.target }} | |
| checksum: sha256 |