use non-deprecated getters for WitnessCS (#840) #17
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: GPU benchmark on `master` | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
# TODO: Account for different `justfile` and `bench.env` files | |
# One option is to upload them to gh-pages for qualitative comparison | |
# TODO: Fall back to a default if `justfile`/`bench.env` not present | |
benchmark: | |
name: Bench and deploy | |
runs-on: [self-hosted, gpu-bench, gh-pages] | |
steps: | |
# Install deps | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: [email protected] | |
# Set up GPU | |
# Check we have access to the machine's Nvidia drivers | |
- run: nvidia-smi | |
# Check that CUDA is installed with a driver-compatible version | |
# This must also be compatible with the GPU architecture, see above link | |
- run: nvcc --version | |
# Run benchmarks and deploy | |
- name: Get old benchmarks | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- run: mkdir -p target; cp -r gh-pages/benchmarks/criterion target; | |
- name: Install criterion | |
run: cargo install cargo-criterion | |
- name: Run benchmarks | |
run: just --dotenv-filename bench.env gpu-bench fibonacci_lem | |
working-directory: ${{ github.workspace }}/benches | |
# TODO: Prettify labels for easier viewing | |
# Compress the benchmark file and metadata for later analysis | |
- name: Compress artifacts | |
run: | | |
echo $LABELS > labels.md | |
tar -cvzf ${{ github.sha }}.tar.gz Cargo.lock ${{ github.sha }}.json labels.md | |
- name: Deploy latest benchmark report | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./target/criterion | |
destination_dir: benchmarks/criterion | |
- name: Copy benchmark json to history | |
run: mkdir history; cp ${{ github.sha }}.tar.gz history/ | |
- name: Deploy benchmark history | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: history/ | |
destination_dir: benchmarks/history | |
keep_files: true |