Build & Test #102
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: Build & Test | |
on: | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
schedule: | |
- cron: "0 5 * * 4" # 5 o'clock utc on thursdays | |
jobs: | |
build-test-native: | |
name: build and test native | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
#- stable minus 2 releases | |
#- beta | |
feature: | |
- ring | |
- openssl | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy, rustfmt | |
- name: check | |
run: cargo check --no-default-features --features ${{ matrix.feature }} | |
- name: check (benches) | |
run: cargo check --benches --no-default-features --features ${{ matrix.feature }} | |
- name: check (tests) | |
run: cargo check --tests --no-default-features --features ${{ matrix.feature }} | |
- name: test | |
run: cargo test --no-default-features --features ${{ matrix.feature }} | |
- name: clippy | |
run: cargo clippy --all-targets --no-default-features --features ${{ matrix.feature }} -- -Dwarnings | |
# test packaging to avoid surprisis at release time | |
- name: package | |
run: cargo package | |
build-wasm: | |
name: build wasm32 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
- name: build | |
run: cargo build --target wasm32-unknown-unknown --features ring |