trigger benchmark #18
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: Benchmark | |
on: | |
push: | |
branches: #TODO: DEBUG - REMOVE | |
- '**' | |
repository_dispatch: | |
types: [execute-benchmark] | |
workflow_dispatch: | |
inputs: | |
machines_config: | |
description: 'Machine related configurations' | |
required: True | |
benchmark_config: | |
description: 'Applcation related configuration' | |
required: True | |
jobs: | |
activate: | |
runs-on: self-ubuntu-22.04 | |
if: | | |
github.repository == 'feelpp/benchmarking' && !startsWith(github.event.head_commit.message, 'Release ') | |
steps: | |
- run: echo ok go | |
build_wheel: | |
needs: activate | |
runs-on: self-ubuntu-22.04 | |
name: Build wheel package | |
if: "!contains(github.event.head_commit.message, 'code skip')" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Ktirio Cases wheel | |
run: | | |
npm install | |
npx downdoc README.adoc | |
pip3 wheel --no-deps --wheel-dir dist . | |
env: | |
CXX: clang++ | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheel-artifacts | |
path: dist/*.whl | |
factory: | |
name: HPC Systems Factory | |
needs: build_wheel | |
runs-on: self-ubuntu-22.04 | |
outputs: | |
matrix: ${{ steps.hpc-systems.outputs.matrix }} | |
steps: | |
- name: Download wheel | |
uses: actions/download-artifact@v4 | |
with: | |
name: wheel-artifacts | |
path: dist | |
- name: Create Virtual Environment | |
run: | | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip3 install -r requirements.txt | |
- name: Download machines configuration | |
run: | | |
source .venv/bin/activate | |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
machine_cfg_id=${{ github.event.inputs.machines_config }}; | |
elif [[ "${{ github.event_name}}" == "repository_dispatch" ]]; then | |
machine_cfg_id=${{ github.event.client_payload.machines_config }}; | |
else #TODO: REMOVE - DEBUG | |
machine_cfg_id="6720f5a8b0e95728eb010af5" | |
fi | |
girder-download -gid $machine_cfg_id -o ./tmp/ -fn "machines_config.json" | |
env: | |
GIRDER_API_KEY: ${{secrets.GIRDER}} | |
- id: hpc-systems | |
name: Set HPC systems matrix | |
run: | | |
source .venv/bin/activate | |
matrix=$(hpc-dispatch -mp ./tmp/machines_config.json -o ./tmp/machines/) | |
echo $matrix | |
echo "matrix={ include : $matrix }" >> $GITHUB_OUTPUT | |
- name: Donwload benchmark configuration | |
run: | | |
source .venv/bin/activate | |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
bench_cfg_id=${{ github.event.inputs.benchmark_config }}; | |
elif [[ "${{ github.event_name}}" == "repository_dispatch" ]]; then | |
bench_cfg_id=${{ github.event.client_payload.benchmark_config }}; | |
else #TODO: REMOVE - DEBUG | |
bench_cfg_id="6720f601b0e95728eb010af8" | |
fi | |
girder-download -gid $bench_cfg_id -o ./tmp/ -fn "benchmark_config.json" | |
env: | |
GIRDER_API_KEY: ${{secrets.GIRDER}} | |
- name: pull_images | |
run: | | |
source .venv/bin/activate | |
#ONLY IF NEEDED | |
- name: Upload configs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: config-artifacts | |
path: | | |
./tmp/benchmark_config.json | |
./tmp/machines/ | |
benchmark: | |
needs: factory | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.factory.outputs.matrix) }} | |
runs-on: ${{matrix.runner}} | |
timeout-minutes: 7200 | |
name: ${{matrix.machine}} | |
steps: | |
- name: Download wheel | |
uses: actions/download-artifact@v4 | |
with: | |
name: wheel-artifacts | |
path: dist | |
- name: Download configs | |
uses: actions/download-artifact@v4 | |
with: | |
name: config-artifacts | |
path: ./tmp/ | |
- name: Create Virtual Environment | |
run: | | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip3 install -r requirements.txt | |
- name: Execute benchmarks | |
run: | | |
source .venv/bin/activate | |
execute-benchmark -ec ${{matrix.machine_cfg}} --config ./tmp/benchmark_config.json -vv | |
echo $? | |
env: | |
GIRDER_API_KEY: ${{secrets.GIRDER}} |