Skip to content

Commit f6a109d

Browse files
committed
New workflowfile added
1 parent ed5c123 commit f6a109d

File tree

2 files changed

+94
-112
lines changed

2 files changed

+94
-112
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Benchmarking platform in Docker CI
2+
3+
on:
4+
push:
5+
branches:
6+
- dumux_and_rotating_cylinder
7+
pull_request:
8+
branches:
9+
- dumux_and_rotating_cylinder
10+
workflow_dispatch:
11+
12+
env:
13+
CACHE_NUMBER: 1
14+
15+
jobs:
16+
tests:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v3
22+
23+
- name: Set up QEMU for amd64 emulation
24+
uses: docker/setup-qemu-action@v3
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Build Docker image (amd64)
30+
run: |
31+
docker build \
32+
--platform linux/amd64 \
33+
-f dockerfiles/Dockerfile \
34+
-t nfdi_benchmark_docker_ci .
35+
36+
- name: Run benchmarking platform inside Docker container
37+
run: |
38+
docker run --platform linux/amd64 \
39+
-v $GITHUB_WORKSPACE:/NFDI_Benchmark \
40+
nfdi_benchmark_docker_ci \
41+
bash -lc "
42+
set -e
43+
source /opt/miniforge/etc/profile.d/conda.sh
44+
45+
echo '>>> Generating config'
46+
cd /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole
47+
python generate_config.py
48+
49+
echo '>>> Pre-building Conda environments'
50+
51+
echo '>>> Building Kratos environment'
52+
mamba env create -n kratos-sim -f /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole/kratos/environment_simulation.yml
53+
conda activate kratos-sim
54+
python -c \"import KratosMultiphysics; print('Kratos version:', KratosMultiphysics.__version__)\"
55+
56+
echo '>>> Building FEniCS environment'
57+
mamba env create -n fenics-sim -f /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole/fenics/environment_simulation.yml
58+
conda activate fenics-sim
59+
export OMP_NUM_THREADS=1
60+
export KMP_AFFINITY=disabled
61+
python -c \"import dolfinx; print('FEniCSx imported OK')\"
62+
63+
echo '>>> Building Mesh environment'
64+
conda deactivate
65+
mamba env create -n mesh -f /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole/environment_mesh.yml
66+
67+
echo '>>> Building Postprocessing environment'
68+
mamba env create -n postprocessing -f /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole/environment_postprocessing.yml
69+
70+
echo '>>> Running Snakemake simulation'
71+
cd /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole
72+
snakemake --use-conda --force --cores all
73+
74+
echo '>>> Running metadata/provenance extraction'
75+
snakemake --use-conda --force --cores all \
76+
--reporter metadata4ing \
77+
--report-metadata4ing-paramscript ../common/parameter_extractor.py \
78+
--report-metadata4ing-filename metadata4ing_provenance
79+
80+
echo '>>> Unzipping provenance results'
81+
unzip -o metadata4ing_provenance.zip -d metadata4ing_provenance
82+
83+
echo '>>> Postprocessing'
84+
conda activate postprocessing
85+
python plot_provenance.py metadata4ing_provenance
86+
"
87+
88+
- name: Upload results (provenance + plot)
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: Benchmarking platform in Docker CI
92+
path: |
93+
benchmarks/linear-elastic-plate-with-hole/metadata4ing_provenance/
94+
benchmarks/linear-elastic-plate-with-hole/element_size_vs_stress.pdf

.github/workflows/run-benchmark.yml

Lines changed: 0 additions & 112 deletions
This file was deleted.

0 commit comments

Comments
 (0)