Ensure python extension is build and is readily usable #247
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: Docker | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - next | |
| # Add your branch here if you want containers for it | |
| - db-WIP | |
| - docker-ci | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.config.name }} Container (${{ matrix.metric3d.name }} ; ${{matrix.mpi}}) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mpi: [mpich] | |
| metric3d: | |
| - name: "With 3D Metrics" | |
| cmake: ON | |
| base_prefix: "" | |
| tag_prefix: "3d-" | |
| - name: "With 2D Metrics" | |
| cmake: OFF | |
| base_prefix: "" | |
| tag_prefix: "" | |
| config: | |
| - name: "Debug" | |
| tag_postfix: "debug" | |
| options: "-DCHECK=4" | |
| base_postfix: "mini" | |
| - name: "Optimised" | |
| tag_postfix: "opt" | |
| options: "-DCHECK=0" | |
| base_postfix: "mini" | |
| - name: "Full" | |
| tag_postfix: "full" | |
| options: "-DCHECK=4" | |
| base_postfix: "full" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@master | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@master | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| flavor: | | |
| prefix=${{ matrix.mpi }}-${{matrix.metric3d.tag_prefix}}${{ matrix.config.tag_postfix }}- | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@master | |
| with: | |
| build-args: | | |
| BASE=${{ matrix.mpi }}-${{ matrix.metric3d.base_prefix }}${{ matrix.config.base_postfix }}-main | |
| MPI=${{ matrix.mpi }} | |
| CMAKE_OPTIONS=${{ matrix.config.options }} -DBOUT_ENABLE_METRIC_3D=${{ matrix.metric3d.cmake }} | |
| COMMIT=${{ github.sha }} | |
| URL=${{ github.server_url }}/${{ github.repository }} | |
| context: .docker/fedora/ | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} |