Add doc comments & tests. Some refactoring #108
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: Rust | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: | | |
cargo build --verbose | |
cargo build --verbose --features simd | |
- name: Run tests | |
run: | | |
cargo test --verbose | |
cargo test --verbose --features simd | |
clippy_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup component add clippy | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features | |
benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install nightly | |
run: rustup toolchain install nightly | |
- name: Benchmark | |
run: cargo +nightly bench --features simd perft::bench_perft_5 | tee bench-output.txt | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
tool: cargo | |
output-file-path: bench-output.txt | |
auto-push: false | |
- name: Push benchmark result | |
run: git push 'https://github-actions:${{ secrets.GITHUB_TOKEN }}@github.com/sugyan/yasai.git' gh-pages:gh-pages | |
if: github.event_name != 'pull_request' |