Skip to content

Switch to a local runner #15

Switch to a local runner

Switch to a local runner #15

Workflow file for this run

name: Run Benchmark
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
run-benchmark:
name: Run Benchmark
## runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Cache pip packages
id: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ hashFiles('requirements.txt') }}
- name: Install omnibenchmark CLI
run: |
pip install git+https://github.com/omnibenchmark/omnibenchmark.git@dev
- name: Load benchmark cache
id: cache-benchmark
uses: actions/cache@v3
with:
path: out/
key: benchmark-${{ runner.os }}-${{ hashFiles('Clustering.yaml') }}
- name: Run benchmark
continue-on-error: true
run: |
echo "y" | ob run benchmark -b Clustering.yaml --local --threads 20 --continue-on-error
upload-artifact:
name: Benchmark Artifact
## runs-on: ubuntu-latest
runs-on: self-hosted
needs: run-benchmark
if: always()
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Load cached output
uses: actions/cache@v3
with:
path: out/
key: benchmark-${{ runner.os }}-${{ hashFiles('Clustering.yaml') }}
- name: Zip output folder
run: |
zip -r benchmark_output.zip out/
- name: Upload zipped output
uses: actions/upload-artifact@v4
with:
name: benchmark-output
path: benchmark_output.zip
retention-days: 7