Running benchmarks on AWS #157
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: Benchmarks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
runs: | |
description: 'Number of runs' | |
required: true | |
type: number | |
default: 25 | |
upload-results: | |
description: 'Upload results' | |
required: true | |
type: boolean | |
default: true | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
maps: | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
defaults: | |
run: | |
shell: bash -l {0} | |
container: | |
image: quay.io/carbonplan/benchmark-maps:latest | |
options: --user root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up conda environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: binder/environment.yml | |
init-shell: >- | |
bash | |
cache-environment: true | |
post-cleanup: 'all' | |
- name: Install browsers | |
run: | | |
playwright install | |
- name: Run tests | |
run: | | |
pytest -v -s | |
- name: Run test benchmarks | |
if: github.event_name != 'workflow_dispatch' | |
run: | | |
python main.py \ | |
--detect-provider \ | |
--approach direct-client \ | |
--dataset 5MB-chunks \ | |
--zarr-version v2 | |
python main.py \ | |
--approach direct-client \ | |
--dataset 10MB-chunks \ | |
--zarr-version v3 \ | |
--action zoom_in \ | |
--zoom-level 1 | |
- name: Run benchmarks using user inputs | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
python main.py \ | |
--runs ${{ github.event.inputs.runs }} \ | |
--detect-provider \ | |
--approach direct-client \ | |
--dataset 10MB-chunks \ | |
--zarr-version v3 \ | |
--action zoom_in \ | |
--zoom-level 1 | |
- name: Create Pull Request | |
if: github.event_name == 'workflow_dispatch' && github.event.inputs.upload-results == 'true' | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: 'benchmark-results: update data' | |
committer: GitHub <[email protected]> | |
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
title: Update Benchmark Results | |
body: | | |
- Updates benchmark results with the latest data from runs triggered by: @${{ github.actor }} | |
- Configurations used: | |
- Number of runs: ${{ github.event.inputs.runs }} | |
[1]: https://github.com/peter-evans/create-pull-request | |
branch: update-data-${{ github.actor }}-${{ github.event.inputs.runs }} | |
delete-branch: true |