Docs #180
Workflow file for this run
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: Test | |
on: push | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: "clippy, rustfmt" | |
- uses: Swatinem/rust-cache@v2 | |
- name: Checking formatting | |
run: cargo fmt -- --check --color always | |
- name: Running clippy | |
run: cargo clippy --all-targets --all-features -p tango-bench | |
test: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
- os: macos-11 | |
- os: windows-2019 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run Tests | |
run: cargo test | |
bench: | |
needs: [test, lint] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/checkout@v3 | |
with: | |
ref: dev | |
path: baseline-branch | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-export | |
- name: Building Benchmarks | |
run: | | |
cargo export target/benchmarks -- bench --bench=tango | |
cd baseline-branch | |
cargo export target/benchmarks -- bench --bench=tango | |
- name: Run Benchmarks | |
run: | | |
set -eo pipefail | |
target/benchmarks/tango --color=never compare baseline-branch/target/benchmarks/tango \ | |
-v -t 1 --fail-threshold 10 | tee target/benchmark.txt | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: benchmark.txt | |
path: target/benchmark.txt |