Skip to content

Build Firedrake Docker container with (Par)Mmg (main) #21

Build Firedrake Docker container with (Par)Mmg (main)

Build Firedrake Docker container with (Par)Mmg (main) #21

name: Build Firedrake Docker container with (Par)Mmg (main)
on:
# Check that Docker build succeeds when these files get changed in an open PR
pull_request:
paths:
- '.github/workflows/reusable_docker_build.yml'
- '.github/workflows/docker_firedrake-parmmg_main.yml'
- 'docker/Dockerfile.firedrake-parmmg'
- 'docker/Dockerfile.firedrake-um2n'
# Build and push the Docker container when these files get changed on the main branch
push:
branches:
- main
paths:
- '.github/workflows/reusable_docker_build.yml'
- '.github/workflows/docker_firedrake-parmmg_main.yml'
- 'docker/Dockerfile.firedrake-parmmg'
- 'docker/Dockerfile.firedrake-um2n'
# Build and push the Docker containers every Saturday at 12AM
schedule:
- cron: '0 0 * * 6'
# Manually trigger the workflow
workflow_dispatch:
permissions: {}
# Stop the workflow if a new run is requested
concurrency:
group: $${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docker_base:
permissions:
packages: write
uses: ./.github/workflows/reusable_docker_build.yml
with:
# use Dockerfile.vanilla from Firedrake to build firedrake-parmmg-base image
# which contains a build of PETSc+Firedrake with (Par)Mmg libraries included
dockerfile-repo: 'firedrakeproject/firedrake'
dockerfile-path: 'docker/Dockerfile.vanilla'
dockerfile-branch: 'main'
firedrake-branch: 'main'
docker-image-tag: 'ghcr.io/mesh-adaptation/firedrake-parmmg-base:latest'
save-docker-image-artifact: 'firedrake-parmmg-base'
docker_parmmg:
permissions:
packages: write
uses: ./.github/workflows/reusable_docker_build.yml
needs: docker_base
with:
# starting from firedrake-parmmg-base, build firedrake-parmmg image
# which includes Animate, Movement, Goalie, and Thetis packages
dockerfile-path: 'docker/Dockerfile.firedrake-parmmg'
firedrake-branch: 'main'
docker-image-tag: 'ghcr.io/mesh-adaptation/firedrake-parmmg:latest'
load-docker-image-artifact: 'firedrake-parmmg-base'
save-docker-image-artifact: 'firedrake-parmmg'
docker_um2n:
permissions:
packages: write
uses: ./.github/workflows/reusable_docker_build.yml
needs: docker_parmmg
with:
# starting from firedrake-parmmg build firedrake-um2n image
# which adds UM2N and it dependencies including PyTorch(CPU)
dockerfile-path: 'docker/Dockerfile.firedrake-um2n'
docker-image-tag: 'ghcr.io/mesh-adaptation/firedrake-um2n:latest'
load-docker-image-artifact: 'firedrake-parmmg'