Fix paths for Windows #37
Workflow file for this run
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 Validation | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
RUSTDOCFLAGS: -D warnings | |
RUSTFLAGS: -D warnings | |
RUST_BACKTRACE: 1 | |
CARGO_UNSTABLE_SPARSE_REGISTRY: true | |
jobs: | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo clippy --all-features --all-targets -- -D warnings | |
- run: cargo clippy --no-default-features --all-targets -- -D warnings | |
min_versions: | |
name: check minimum rustc version | |
runs-on: ubuntu-latest | |
env: | |
# we don't care about unused with these feature configurations | |
RUSTFLAGS: -A unused | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/[email protected] | |
- uses: Swatinem/rust-cache@v2 | |
# check only the library; we can use later for the CLI | |
- run: cargo check -p rcrypto --all-features | |
- run: cargo check -p rcrypto --no-default-features | |
test: | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
include: | |
- os: ubuntu-latest | |
name: linux | |
- os: windows-latest | |
name: windows | |
- os: macos-latest | |
name: mac | |
name: "test on ${{ matrix.name }}" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: llvm-tools-preview | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
- run: cargo build # tests need prebuild .so for tests | |
- run: cargo llvm-cov nextest --no-fail-fast --lcov --output-path lcov.info | |
- run: cargo test --doc | |
- name: Upload coverage data to codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: lcov.info | |
check_bindings: | |
name: verify bindings are up to date | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
- run: mv rcrypto.h rcrypto-orig.h | |
- run: cargo run --package generate-bindings | |
- run: diff rcrypto-orig.h rcrypto.h | |
fmt: | |
name: formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo fmt --all -- --check | |
doc: | |
name: docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo doc | |