Update dependencies to allow building with latest Rust version #101
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: Rust | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest | |
| rust: | |
| - stable | |
| - msrv | |
| include: | |
| - os: ubuntu-latest | |
| rust: stable | |
| lint: 1 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v3 | |
| - name: Install toolchain | |
| shell: bash | |
| run: | | |
| ver="${{ matrix.rust }}" | |
| if [ "$ver" = msrv ]; then | |
| ver=$(cargo metadata --format-version 1 --no-deps | \ | |
| jq -r '.packages[0].rust_version') | |
| fi | |
| rustup toolchain install "$ver" --profile minimal --no-self-update | |
| rustup default "$ver" | |
| echo "Installed:" | |
| cargo --version | |
| rustc --version --verbose | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: cargo test | |
| run: cargo test --workspace --all-features | |
| - name: rustfmt | |
| if: github.event_name == 'pull_request' && matrix.lint | |
| run: cargo fmt --all -- --check | |
| - name: clippy | |
| if: github.event_name == 'pull_request' && matrix.lint | |
| run: cargo clippy --all --tests --all-features -- -D warnings |