Run benchmarks via open tofu #336
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the main branch | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Allows you to run this workflow manually from the Actions tab | |
| # workflow_dispatch: | |
| jobs: | |
| CI: | |
| runs-on: ubuntu-latest | |
| env: | |
| PY_VERSION: "3.12" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PY_VERSION }} | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip pre-commit | |
| pip install -r website/requirements.txt | |
| - name: Check code formatting | |
| run: | | |
| pre-commit install | |
| pre-commit run --all-files | |
| - name: Run Streamlit App Action | |
| uses: streamlit/streamlit-app-action@v0.0.3 | |
| with: | |
| app-path: website/app.py | |
| - name: Setup Conda for benchmark runner | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| python-version: ${{ env.PY_VERSION }} | |
| # TODO cache conda pkgs dir | |
| - name: Run sample benchmarks | |
| shell: bash -el {0} | |
| run: | | |
| ./runner/benchmark_all.sh -y "tests" benchmarks/tests.yaml | |
| echo "" | |
| cat results/benchmark_results.csv | |
| if awk -F',' 'NR>1 {if ($6 != "ok") exit 1}' results/benchmark_results.csv; then | |
| echo "All benchmarks ran successfully." | |
| else | |
| echo "Some benchmarks did not complete successfully." | |
| exit 1 | |
| fi |