Attempt to get CI green again #260
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: | |
pull_request: | |
push: | |
branches: main | |
jobs: | |
test: | |
name: Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest ] | |
# NOTE: when changing the MSRV version, change it below as well | |
rust: [ 1.65.0, stable, beta ] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
# `x509_parser` dev-dependency has transitive dependency `time` which | |
# has a 6-month MSRV policy, don't run tests on MSRV version since they | |
# will always fail. | |
- name: Revert time dep if needed | |
if: ${{ matrix.rust == '1.65.0' }} | |
run: cargo update --precise 0.3.23 --package time | |
- name: Run cargo test | |
run: cargo test --all-features --all | |
- name: Check default features | |
run: cargo check --all | |
ios: | |
name: iOS compile-check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
target: aarch64-apple-ios | |
- name: Run check | |
run: cargo check --all-features -p security-framework --target aarch64-apple-ios | |
apple-silicon: | |
name: Apple Silicon compile-check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
target: aarch64-apple-darwin | |
- name: Run check | |
run: cargo check --all-features -p security-framework --target aarch64-apple-darwin | |
lints: | |
name: Lints | |
runs-on: macos-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy, rustfmt | |
- name: DO NOT USE RUSTFMT | |
run: "if cargo fmt --quiet --check -- --config-path=/dev/null; then echo >&2 'Do not reformat the code with rustfmt. This project does not use rustfmt.'; fi" | |
- name: Run cargo clippy | |
run: cargo clippy --all-features |