ci: build and test on Windows #32
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: Rust CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-and-test: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-13, macos-14] | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
build-and-test-windows: | |
name: Build and test (Windows) | |
runs-on: windows-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Install MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: mingw64 | |
install: diffutils m4 make mingw-w64-x86_64-gcc | |
path-type: inherit | |
- name: Build | |
shell: msys2 {0} | |
run: cargo build --verbose | |
- name: Run tests | |
shell: msys2 {0} | |
run: cargo test --verbose |