Update GHA configuration #51
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, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: cargo test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
rust: [1.21.0, stable] | |
include: | |
- os: ubuntu-latest | |
rust: nightly | |
- os: windows-latest | |
rust: stable-i686 | |
- os: windows-latest | |
rust: stable-x86_64-gnu | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Generate lock file | |
run: cargo generate-lockfile | |
# cfg-if 0.1.10 does not support rust 1.21.0, so downgrade it to the last | |
# known working version after generating the lockfile above | |
- name: Downgrade dependencies | |
if: matrix.rust == '1.21.0' | |
run: cargo update -p cfg-if --precise 0.1.9 | |
- name: Run `cargo check` | |
run: cargo check | |
- name: Run `cargo test` | |
run: cargo check |