Merge pull request #300 from tlsnotary/tlsn-server-examples #944
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 | |
on: | |
push: | |
branches: [dev] | |
pull_request: | |
branches: [dev] | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
jobs: | |
build_and_test: | |
if: ( ! github.event.pull_request.draft ) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: | |
- components/integration-tests | |
- components/uid-mux | |
- components/actors/actor-ot | |
- components/cipher | |
- components/universal-hash | |
- components/aead | |
- components/key-exchange | |
- components/point-addition | |
- components/prf | |
- components/tls | |
- tlsn | |
include: | |
- package: components/integration-tests | |
release: true | |
defaults: | |
run: | |
working-directory: ${{ matrix.package }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Nightly with rustfmt | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- name: "Check formatting" | |
run: cargo +nightly fmt --check --all | |
- name: Stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: clippy | |
- uses: Swatinem/rust-cache@v2.5.0 | |
with: | |
workspaces: ${{ matrix.package }} -> target | |
- name: "Build" | |
run: cargo build ${{ matrix.release && '--release' }} | |
- name: "Test" | |
if: ${{ matrix.release != true }} | |
run: cargo test --lib --bins --tests --examples --workspace | |
- name: "Integration Test" | |
if: ${{ matrix.release == true }} | |
run: cargo test --release --tests | |
- name: "Clippy" | |
run: cargo clippy --all-features -- -D warnings |