Change aries-askar to original source #153
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 test --package tsp --features nacl | |
cargo test --package tsp --lib --features pq | |
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 | |
check-wasm32: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- 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" | |
check-python: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: rustup component add clippy | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- 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 | |
check-node: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Install wasm-pack | |
run: | | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
wasm-pack --version | |
- name: Build Wasm extension | |
run: wasm-pack build --target nodejs tsp-javascript/ | |
- name: Install npm dependencies | |
working-directory: tsp-node/ | |
run: npm install | |
- name: Run tests with Mocha | |
working-directory: tsp-node/ | |
run: npm test | |
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 |