Minor tweaks. #3976
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] | |
jobs: | |
test: | |
name: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
rust: [1.76.0, stable, beta, nightly] | |
env: | |
RUSTFLAGS: "-D warnings" | |
# We use 'vcpkg' to install OpenSSL on Windows. | |
VCPKG_ROOT: "${{ github.workspace }}\\vcpkg" | |
VCPKGRS_TRIPLET: x64-windows-release | |
# Ensure that OpenSSL is dynamically linked. | |
VCPKGRS_DYNAMIC: 1 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Install Rust | |
uses: hecrj/setup-rust-action@v2 | |
with: | |
rust-version: ${{ matrix.rust }} | |
- if: matrix.os == 'ubuntu-latest' | |
run: sudo apt install libssl-dev | |
- if: matrix.os == 'windows-latest' | |
id: vcpkg | |
uses: johnwason/vcpkg-action@v6 | |
with: | |
pkgs: openssl | |
triplet: ${{ env.VCPKGRS_TRIPLET }} | |
token: ${{ github.token }} | |
github-binarycache: true | |
- if: matrix.rust == 'stable' | |
run: rustup component add clippy | |
- if: matrix.rust == 'stable' | |
run: cargo clippy --all-features --all-targets -- -D warnings | |
- if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' | |
run: cargo fmt --all -- --check | |
- run: cargo check --no-default-features --all-targets | |
- run: cargo test --all-features | |
minimal-versions: | |
name: Check minimal versions | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: "-D warnings" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Install Rust | |
uses: hecrj/setup-rust-action@v2 | |
with: | |
rust-version: "1.68.2" | |
- name: Install OpenSSL | |
run: sudo apt install libssl-dev | |
- name: Install nightly Rust | |
run: rustup install nightly | |
- name: Check with minimal-versions | |
run: | | |
cargo +nightly update -Z minimal-versions | |
cargo check --all-features --all-targets --locked | |