No explicit hpke feature, test nacl on CI #1
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: Check | ||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo clippy --workspace --tests -- --deny "warnings" | ||
rust-fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo fmt --all --check | ||
cargo-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo test && cargo test --doc | ||
cargo-deny: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check | ||
arguments: --workspace | ||
<<<<<<< HEAD | ||
- name: Test | ||
run: cargo test -- --nocapture && cargo test --doc | ||
shell: bash | ||
check-wasm32-unknown-unknown: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup toolchain install stable --profile minimal | ||
- uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: linux-x86-64-gnu-${{ hashFiles('Cargo.toml') }} | ||
restore-keys: linux-x86-64-gnu- | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install wasm-pack | ||
run: cargo install wasm-pack | ||
- name: Run tests with wasm-pack | ||
working-directory: tsp | ||
run: wasm-pack test --node -- -p tsp --no-default-features --features "resolve" | ||
======= | ||
>>>>>>> b469444 (Add nacl and essr features) | ||
fuzz: | ||
name: run cargo-fuzz | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
features: | ||
- "" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install nightly toolchain | ||
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 | ||
with: | ||
toolchain: nightly | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Install cargo fuzz | ||
uses: taiki-e/install-action@8984d603c208823d3c1a1b796f4081736f3ae3f9 | ||
with: | ||
tool: cargo-fuzz | ||
- name: Smoke-test fuzz targets | ||
run: | | ||
cargo fuzz build ${{ matrix.features }} | ||
for target in $(cargo fuzz list ${{ matrix.features }}) ; do | ||
cargo fuzz run ${{ matrix.features }} $target -- -max_total_time=10 | ||
done | ||
check-python: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup toolchain install stable --profile minimal | ||
- run: rustup component add clippy | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
- uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: linux-x86-64-gnu-${{ hashFiles('Cargo.toml') }} | ||
restore-keys: linux-x86-64-gnu- | ||
- name: Install maturin | ||
run: pip install maturin | ||
- name: Create and activate virtual environment | ||
working-directory: tsp-python | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install maturin | ||
- name: Build and test | ||
working-directory: tsp-python | ||
run: | | ||
source venv/bin/activate | ||
maturin develop | ||
python3 test.py |