Skip to content

force init workflow

force init workflow #1

Workflow file for this run

name: New Benchmark
on:
push:
branches:
- '**'
workflow_dispatch:
inputs:
machine:
description: 'Name of the supercomputer where the benchmark ran'
required: true
default: 'gaya'
application:
description: 'Name of the benchmarked application'
required: true
default: 'feelpp_toolbox_electric'
test_case:
description: 'Name of the test case'
required: true
default: 'default'
benchmark_remote_folder_id:
description: 'Girder folder id where the benchmark results are stored'
required: true
data_management_platform:
type: choice
description: 'Name of the data management platform'
default: 'girder'
options:
- girder
- ckan
repository_dispatch:
types: [benchmark-uploaded]
jobs:
build_wheel:
runs-on: self-ubuntu-22.04
name: Build wheel
if: "!contains(github.event.head_commit.message, 'wheel skip')"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
submodules: 'recursive'
- name: Create Virtual Environment
run: |
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
- name: Compile
run: |
pip3 wheel --no-deps --wheel-dir dist .
env:
CXX: clang++
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: wheel-artifacts
path: dist/*.whl
update_benchmarks:
runs-on: self-ubuntu-22.04
name: Update config
needs: build_wheel
if: (github.event_name == 'repository_dispatch') || (github.event_name == 'workflow_dispatch')
steps:
- uses: actions/checkout@v4
- name: Create Virtual Environment
run: |
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install girder_client
- name: Download wheel
uses: actions/download-artifact@v4
with:
name: wheel-artifacts
- name: Install wheel
run: |
source .venv/bin/activate
python3 -m pip install --force-reinstall dist/*.whl
- name: Set inputs
id: set-inputs
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "machine=${{ github.event.inputs.machine }}" >> $GITHUB_OUTPUT
echo "application=${{ github.event.inputs.application }}" >> $GITHUB_OUTPUT
echo "test_case=${{ github.event.inputs.test_case }}" >> $GITHUB_OUTPUT
echo "benchmark_remote_folder_id=${{ github.event.inputs.benchmark_remote_folder_id }}" >> $GITHUB_OUTPUT
echo "data_management_platform=${{ github.event.inputs.data_management_platform }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
echo "machine=${{ github.event.client_payload.machine }}" >> $GITHUB_OUTPUT
echo "application=${{ github.event.client_payload.application }}" >> $GITHUB_OUTPUT
echo "test_case=${{ github.event.client_payload.test_case }}" >> $GITHUB_OUTPUT
echo "benchmark_remote_folder_id=${{ github.event.client_payload.benchmark_remote_folder_id }}" >> $GITHUB_OUTPUT
echo "data_management_platform=${{ github.event.client_payload.data_management_platform }}" >> $GITHUB_OUTPUT
fi
- name: Update benchmarks
run: |
source .venv/bin/activate
render-benchmarks \
--config_file ./src/feelpp/benchmarking/report/config.json \
--json_output_path reports \
--modules_path ./docs/modules/ROOT/pages
env:
GIRDER_API_KEY: ${{ secrets.GIRDER }}
- name: Create PR
uses: peter-evans/create-pull-request@v6
with:
title: "Add/Update benchmark for ${{ steps.set-inputs.outputs.application }} on ${{ steps.set-inputs.outputs.machine }}"
body: |
Add/Update benchmark:
- Application ${{ steps.set-inputs.outputs.application }}
- Machine ${{ steps.set-inputs.outputs.machine }}
- Test case ${{ steps.set-inputs.outputs.test_case }}
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: |
enhancement
documentation
reviewers: JavierCladellas
env:
GITHUB_TOKEN: ${{ secrets.CR_PAT }}