New workflowfile added #1
This file contains hidden or 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: Benchmarking platform in Docker CI | |
| on: | |
| push: | |
| branches: | |
| - dumux_and_rotating_cylinder | |
| pull_request: | |
| branches: | |
| - dumux_and_rotating_cylinder | |
| workflow_dispatch: | |
| env: | |
| CACHE_NUMBER: 1 | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up QEMU for amd64 emulation | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image (amd64) | |
| run: | | |
| docker build \ | |
| --platform linux/amd64 \ | |
| -f dockerfiles/Dockerfile \ | |
| -t nfdi_benchmark_docker_ci . | |
| - name: Run benchmarking platform inside Docker container | |
| run: | | |
| docker run --platform linux/amd64 \ | |
| -v $GITHUB_WORKSPACE:/NFDI_Benchmark \ | |
| nfdi_benchmark_docker_ci \ | |
| bash -lc " | |
| set -e | |
| source /opt/miniforge/etc/profile.d/conda.sh | |
| echo '>>> Generating config' | |
| cd /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole | |
| python generate_config.py | |
| echo '>>> Pre-building Conda environments' | |
| echo '>>> Building Kratos environment' | |
| mamba env create -n kratos-sim -f /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole/kratos/environment_simulation.yml | |
| conda activate kratos-sim | |
| python -c \"import KratosMultiphysics; print('Kratos version:', KratosMultiphysics.__version__)\" | |
| echo '>>> Building FEniCS environment' | |
| mamba env create -n fenics-sim -f /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole/fenics/environment_simulation.yml | |
| conda activate fenics-sim | |
| export OMP_NUM_THREADS=1 | |
| export KMP_AFFINITY=disabled | |
| python -c \"import dolfinx; print('FEniCSx imported OK')\" | |
| echo '>>> Building Mesh environment' | |
| conda deactivate | |
| mamba env create -n mesh -f /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole/environment_mesh.yml | |
| echo '>>> Building Postprocessing environment' | |
| mamba env create -n postprocessing -f /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole/environment_postprocessing.yml | |
| echo '>>> Running Snakemake simulation' | |
| cd /NFDI_Benchmark/benchmarks/linear-elastic-plate-with-hole | |
| snakemake --use-conda --force --cores all | |
| echo '>>> Running metadata/provenance extraction' | |
| snakemake --use-conda --force --cores all \ | |
| --reporter metadata4ing \ | |
| --report-metadata4ing-paramscript ../common/parameter_extractor.py \ | |
| --report-metadata4ing-filename metadata4ing_provenance | |
| echo '>>> Unzipping provenance results' | |
| unzip -o metadata4ing_provenance.zip -d metadata4ing_provenance | |
| echo '>>> Postprocessing' | |
| conda activate postprocessing | |
| python plot_provenance.py metadata4ing_provenance | |
| " | |
| - name: Upload results (provenance + plot) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Benchmarking platform in Docker CI | |
| path: | | |
| benchmarks/linear-elastic-plate-with-hole/metadata4ing_provenance/ | |
| benchmarks/linear-elastic-plate-with-hole/element_size_vs_stress.pdf |