Skip to content

Commit

Permalink
Update bench-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelburnham committed Jan 16, 2024
1 parent 128f4b1 commit 0b9d386
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/bench-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ jobs:
runs-on: [self-hosted, gpu-bench, gh-pages]
steps:
# Install deps
- uses: actions/checkout@v4
with:
repository: lurk-lab/ci-workflows
- uses: ./.github/actions/gpu-setup
with:
gpu-framework: 'cuda'
- uses: ./.github/actions/ci-env
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: just@1.15.0
# 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
tool: just@1.22.0
# Run benchmarks and deploy
- name: Get old benchmarks
uses: actions/checkout@v4
Expand All @@ -36,15 +37,15 @@ jobs:
run: cargo install cargo-criterion
- name: Run benchmarks
run: |
just --dotenv-filename bench.env gpu-bench fibonacci
cp ${{ github.sha }}.json ..
just gpu-bench-ci fibonacci
cp fibonacci-${{ github.sha }}.json ..
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
tar -cvzf fibonacci-${{ github.sha }}.tar.gz Cargo.lock fibonacci-${{ github.sha }}.json labels.md
working-directory: ${{ github.workspace }}
- name: Deploy latest benchmark report
uses: peaceiris/actions-gh-pages@v3
Expand All @@ -53,7 +54,7 @@ jobs:
publish_dir: ./target/criterion
destination_dir: benchmarks/criterion
- name: Copy benchmark json to history
run: mkdir history; cp ${{ github.sha }}.tar.gz history/
run: mkdir history; cp fibonacci-${{ github.sha }}.tar.gz history/
- name: Deploy benchmark history
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down

0 comments on commit 0b9d386

Please sign in to comment.