WIP: Add windows support #90
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: only if it is a pull request build. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
env: | |
RUST_BACKTRACE: 1 | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Test ${{ matrix.rust-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 120 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
rust-version: | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust-version }} | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install tarpaulin | |
run: cargo install cargo-tarpaulin | |
- name: Test compilation | |
run: cargo check --all --all-targets | |
- name: Test formatting | |
run: cargo fmt --all -- --check | |
- name: Test clippy | |
run: cargo clippy --all --all-targets -- -D warnings | |
- name: Test documentation | |
run: cargo doc --all --no-deps | |
- name: Test with code coverage | |
run: cargo tarpaulin --release --engine llvm --follow-exec --post-test-delay 10 --coveralls ${{ secrets.COVERALLS_REPO_TOKEN }} | |
release-please: | |
name: Execute release chores | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
needs: test | |
outputs: | |
created: ${{ steps.release.outputs.release_created }} | |
tag_name: ${{ steps.release.outputs.tag_name }} | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
release-type: rust | |
bump-patch-for-minor-pre-major: true | |
bump-minor-pre-major: true | |
publish: | |
name: Publish to crates.io | |
runs-on: ubuntu-latest | |
needs: release-please | |
if: needs.release-please.outputs.created | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Publish | |
run: cargo publish --verbose --locked --no-verify --token ${{ secrets.CARGO_REGISTRY_TOKEN }} |