Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolves: 181 handle report deployment #183

Merged
merged 65 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
59b5413
rm production website config #180
JavierCladellas Dec 6, 2024
412467d
use remote website config #180
JavierCladellas Dec 6, 2024
ebc3207
ignore tmp
JavierCladellas Dec 6, 2024
4ca1e5a
add date metadata #181
JavierCladellas Dec 6, 2024
d7c9c08
start deployment logic #181
JavierCladellas Dec 6, 2024
826f88e
add some body text [ci skip]
JavierCladellas Dec 6, 2024
db0d904
bad name
JavierCladellas Dec 6, 2024
b9b7ff8
add dir option to girder-download
JavierCladellas Dec 6, 2024
62499e8
add merge json config script #181
JavierCladellas Dec 6, 2024
30ddced
rm main
JavierCladellas Dec 6, 2024
440e3f8
help
JavierCladellas Dec 6, 2024
a6d294d
add update config option #181
JavierCladellas Dec 6, 2024
f65148b
add first staging workflow #181
JavierCladellas Dec 6, 2024
5236fc3
add girder api key to env #181
JavierCladellas Dec 6, 2024
5ac7eec
add push event for debug
JavierCladellas Dec 6, 2024
a72a0b9
debug [ci skip]
JavierCladellas Dec 6, 2024
63ff1d5
fix debug
JavierCladellas Dec 6, 2024
5135cdf
bug fix
JavierCladellas Dec 6, 2024
e30e9ba
rm netlify rebuild [ci skip] #181
JavierCladellas Dec 6, 2024
f7e130f
rm netlify stage [ci skip]
JavierCladellas Dec 6, 2024
01365a3
conditional preview #181
JavierCladellas Dec 9, 2024
a148c7d
fix error #181
JavierCladellas Dec 9, 2024
ac36084
add missing girder key to download website config step #181
JavierCladellas Dec 9, 2024
930ff71
rm staging preview workflow (handled now by netlify) #181
JavierCladellas Dec 9, 2024
9b4e429
typo fix #181
JavierCladellas Dec 9, 2024
41eb4ed
add echos and fix id #181 [ci skip]
JavierCladellas Dec 9, 2024
d17e89e
[create-pull-request] automated change
JavierCladellas Dec 9, 2024
89525d7
Merge branch '181-handle-report-deployment' into new-benchmark-feelpp…
JavierCladellas Dec 9, 2024
c5c5c9c
debug netlify #181
JavierCladellas Dec 9, 2024
8760823
more netlify debug #181
JavierCladellas Dec 9, 2024
62666a5
more echoing #181
JavierCladellas Dec 9, 2024
0ed3b79
branch -> head #181
JavierCladellas Dec 9, 2024
45ddf20
Merge pull request #184 from feelpp/new-benchmark-feelpp_toolbox_heat
JavierCladellas Dec 9, 2024
0cfc297
add reusable upload to girder wrapped cli
JavierCladellas Dec 9, 2024
882cd4c
rename option (directory -> item)
JavierCladellas Dec 9, 2024
ea42816
fix bug in configMerge
JavierCladellas Dec 9, 2024
221828c
imrpove json merge
JavierCladellas Dec 9, 2024
154a416
fix arg name
JavierCladellas Dec 10, 2024
485afea
return item id on upload #181
JavierCladellas Dec 10, 2024
d3ef1db
return id to find folder #181
JavierCladellas Dec 10, 2024
3d0c030
add script to handle stage configuration parsing #181
JavierCladellas Dec 10, 2024
e71d2c4
try fix girder upload of benchmarks in wf #181
JavierCladellas Dec 10, 2024
82ba95c
fix folder name in girder #181 [ci skip]
JavierCladellas Dec 10, 2024
0b47fac
add move cli #181
JavierCladellas Dec 10, 2024
1685903
add move cli script #181
JavierCladellas Dec 10, 2024
7120ea9
factor id fetching #181
JavierCladellas Dec 10, 2024
d3c4080
rm print #181
JavierCladellas Dec 10, 2024
1ffa0e1
write deploy workflow #181
JavierCladellas Dec 10, 2024
04fc743
[create-pull-request] automated change
JavierCladellas Dec 10, 2024
63c85e2
bug fix [ci skip]
JavierCladellas Dec 10, 2024
42672d0
Merge pull request #186 from feelpp/new-benchmark-feelpp_toolbox_heat
JavierCladellas Dec 10, 2024
cacfba5
factor girder ids #181
JavierCladellas Dec 10, 2024
306908e
fix sourced var [ci skip]
JavierCladellas Dec 10, 2024
3b62c8a
rm tmp files from git tree... #181
JavierCladellas Dec 10, 2024
82b4dd5
Merge branch 'master' into 181-handle-report-deployment
JavierCladellas Dec 10, 2024
80bc4a6
[create-pull-request] automated change
JavierCladellas Dec 12, 2024
7b71257
trigger netlify
JavierCladellas Dec 12, 2024
d61ca70
fix merge-json-config args #181
JavierCladellas Dec 12, 2024
de63fb1
Merge branch '181-handle-report-deployment' into new-benchmark-feelpp…
JavierCladellas Dec 12, 2024
0e91697
try fix label recognition [ci skip]
JavierCladellas Dec 12, 2024
cc61ece
Merge branch '181-handle-report-deployment' into new-benchmark-feelpp…
JavierCladellas Dec 12, 2024
9b82dc2
forgot girder api key #181 :p [ci skip]
JavierCladellas Dec 12, 2024
1e2a603
Merge branch '181-handle-report-deployment' into new-benchmark-feelpp…
JavierCladellas Dec 12, 2024
6b4247a
Merge pull request #187 from feelpp/new-benchmark-feelpp_toolbox_heat
JavierCladellas Dec 12, 2024
236d194
Merge branch 'master' into 181-handle-report-deployment
JavierCladellas Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ on:
description: 'Plots related configuration'
required: True
default: 675053424c9ccbdde21a470a
girder_folder_id:
description: 'ID of the folder to upload to'
required: True
default: 67504ecd4c9ccbdde21a4704

jobs:

Expand All @@ -31,7 +27,7 @@ jobs:
if: "!contains(github.event.head_commit.message, 'code skip')"
steps:
- uses: actions/checkout@v4
- name: Build Ktirio Cases wheel
- name: Build wheel
run: |
npm install
npx downdoc README.adoc
Expand Down Expand Up @@ -164,14 +160,23 @@ jobs:
- name: Upload to girder
run: |
source .venv/bin/activate
new_foldername=./tmp/$(date +"%Y_%m_%dT%H_%M_%S")
mv ./tmp/results/ $new_foldername
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
girder_upload_id=${{ github.event.inputs.girder_folder_id }};
elif [[ "${{ github.event_name}}" == "repository_dispatch" ]]; then
girder_upload_id=${{ github.event.client_payload.girder_folder_id }};
fi
girder-upload --directory $new_foldername --girder_id $girder_upload_id
rm -r $new_foldername
source ./girder_deploy_config.sh
girder-upload --item "./tmp/results/*" --girder_id $staging_folder_id
env:
GIRDER_API_KEY: ${{ secrets.GIRDER }}
- name: Update Index Date
run: |
sed -i "s/^:docdatetime: .*/:docdatetime: $(date +'%Y-%m-%dT%H:%M:%S')/" "docs/modules/ROOT/pages/index.adoc"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
title: "Add benchmark for ${{ needs.factory.outputs.executable_name }} - ${{ needs.factory.outputs.use_case }}"
body: |
Generating reports from staging directory.
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
reviewers: JavierCladellas
labels: new-benchmark
branch: new-benchmark-${{needs.factory.outputs.executable_name}}
env:
GIRDER_API_KEY: ${{ secrets.GIRDER }}
GITHUB_TOKEN: ${{ secrets.CR_PAT }}
111 changes: 111 additions & 0 deletions .github/workflows/benchmark_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Benchmark Deploy

on:
pull_request:
types: [closed]

jobs:
build_wheel:
runs-on: self-ubuntu-22.04
name: Build wheel package
if: contains(github.event.pull_request.labels.*.name, 'new-benchmark')
steps:
- uses: actions/checkout@v4
- name: Build 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

accepted:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'new-benchmark')
runs-on: self-ubuntu-22.04
name: Move to production
needs: build_wheel
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 stage reports
run: |
source .venv/bin/activate
source ./girder_deploy_config.sh
girder-download -gid $staging_folder_id -o ./tmp/ -d
env:
GIRDER_API_KEY: ${{ secrets.GIRDER }}
- name: Download Production config
run: |
source .venv/bin/activate
source ./girder_deploy_config.sh
girder-download -gid $production_website_config_id -o ./configs_tmp/ -fn production_config.json
env:
GIRDER_API_KEY: ${{ secrets.GIRDER }}
- name: Merge stage configs
run: |
source .venv/bin/activate
merge-json-configs -fp "./tmp/**/website_config.json" -o ./configs_tmp/stage_config.json -u
- name: Update Stage Config
run: |
source .venv/bin/activate
source ./girder_deploy_config.sh
update-stage-config -stag ./configs_tmp/stage_config.json -prod ./configs_tmp/production_config.json -prodid $production_folder_id
env:
GIRDER_API_KEY: ${{ secrets.GIRDER }}
- name: Merge stage and prod configs
run: |
source .venv/bin/activate
merge-json-configs -fp "./configs_tmp/**/*.json" -o ./configs_tmp/website_config.json
- name: Upload New Website config
run: |
source .venv/bin/activate
source ./girder_deploy_config.sh
girder-upload --item ./configs_tmp/website_config.json --girder_id $production_folder_id
env:
GIRDER_API_KEY: ${{ secrets.GIRDER }}
- name: Cleanup stage folder
run: |
echo "Moving all folders from staging/ to merged/"
source .venv/bin/activate
source ./girder_deploy_config.sh
girder-move -oid $staging_folder_id -nid $accepted_folder_id
env:
GIRDER_API_KEY: ${{ secrets.GIRDER }}
denied:
if: github.event.pull_request.merged == false && contains(github.event.pull_request.labels.*.name, 'new-benchmark')
runs-on: self-ubuntu-22.04
name: Move to denied
needs: build_wheel
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: Cleanup stage folder
run: |
echo "Moving all folders from staging/ to denied/"
source .venv/bin/activate
source ./girder_deploy_config.sh
girder-move -oid $staging_folder_id -nid $denied_folder_id
env:
GIRDER_API_KEY: ${{ secrets.GIRDER }}
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,17 @@ jobs:
pip3 install -I -r requirements.txt
pip3 install dist/*.whl
tree .venv
- name: Download website config
run: |
source .venv/bin/activate
source ./girder_deploy_config.sh
girder-download --girder_id=$production_website_config_id --output_dir=./tmp/ --filename=website_config.json
env:
GIRDER_API_KEY: ${{secrets.GIRDER}}
- name: Render reports
run: |
source .venv/bin/activate
render-benchmarks
render-benchmarks --config_file=./tmp/website_config.json
env:
GIRDER_API_KEY: ${{ secrets.GIRDER }}
- name: Build Antora Site
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,9 @@ reports/
#Test Outputs
tests/data/outputs/


tmp/
tmp.ipynb

#Executables
tests/data/parallelSum
tests/data/parallelSum
3 changes: 2 additions & 1 deletion docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
ifdef::env-github,env-browser,env-vscode[:imagesprefix: ../images/]
= Benchmarking
:page-layout: toolboxes
:page-tags: catalog, catalog-index
:page-tags: catalog, catalog-index
:docdatetime: 2024-12-12T09:10:54
7 changes: 7 additions & 0 deletions girder_deploy_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

production_website_config_id=6752f0734c9ccbdde21a48ca
staging_folder_id=6752b5194c9ccbdde21a48b8
production_folder_id=6752efed4c9ccbdde21a48c7
accepted_folder_id=67580d534c9ccbdde21a4a75
denied_folder_id=6752b66d4c9ccbdde21a48b9
11 changes: 10 additions & 1 deletion netlify-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,14 @@ pip3 install -r requirements.txt
pip3 wheel --no-deps --wheel-dir dist .
pip3 install dist/*.whl
npm i
render-benchmarks
source ./girder_deploy_config.sh
if [[ $HEAD == *"new-benchmark"* ]]; then
echo "Downloading Staging benchmarks"
girder-download -gid $staging_folder_id -o ./tmp/ -d
merge-json-configs -fp "./tmp/**/website_config.json" -o ./tmp/website_config.json -u
else
echo "Downloading Production benchmarks"
girder-download -gid $production_website_config_id -o ./tmp/ -fn website_config.json
fi
render-benchmarks --config_file=./tmp/website_config.json
npx antora --stacktrace generate --cache-dir cache --clean --html-url-extension-style=indexify site.yml
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ render-benchmarks = "feelpp.benchmarking.report.__main__:main_cli"
execute-benchmark = "feelpp.benchmarking.reframe.__main__:main_cli"
girder-download = "feelpp.benchmarking.scripts.girder:download_cli"
girder-upload = "feelpp.benchmarking.scripts.girder:upload_cli"
girder-move = "feelpp.benchmarking.scripts.girder:move_cli"
hpc-dispatch = "feelpp.benchmarking.scripts.hpcSystems:hpcSystemDispatcher_cli"
merge-json-configs = "feelpp.benchmarking.scripts.misc:jsonConfigMerge_cli"
update-stage-config = "feelpp.benchmarking.scripts.misc:upldateStageConfig_cli"

[tool.pytest.ini_options]
minversion = "6.0"
Expand Down
128 changes: 0 additions & 128 deletions src/feelpp/benchmarking/report/config/config.json

This file was deleted.

Loading
Loading