mirror of
https://github.com/tlsnotary/tlsn.git
synced 2026-04-28 03:00:14 -04:00
73 lines
1.7 KiB
YAML
73 lines
1.7 KiB
YAML
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
|