Merge pull request #2855 from devitocodes/pad-safe #3
Workflow file for this run
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: Build base compilers docker images | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| paths: | |
| - "/docker/Dockerfile.nvidia" | |
| - "/docker/Dockerfile.cpu" | |
| - "/docker/Dockerfile.amd" | |
| - "/docker/Dockerfile.intel" | |
| workflow_dispatch: | |
| inputs: | |
| cpu: | |
| type: boolean | |
| default: true | |
| nvidia: | |
| type: boolean | |
| default: true | |
| amd: | |
| type: boolean | |
| default: true | |
| intel: | |
| type: boolean | |
| default: true | |
| tags: | |
| description: "Build compiler bases" | |
| schedule: | |
| # Run once a month | |
| - cron: "0 0 1 * *" | |
| jobs: | |
| ####################################################### | |
| ############## Basic gcc CPU ########################## | |
| ####################################################### | |
| deploy-cpu-bases: | |
| if: ${{ github.event_name != 'workflow_dispatch' || inputs.cpu }} | |
| name: "cpu-base-${{ matrix.arch }}-gcc${{ matrix.gcc }}" | |
| runs-on: ${{ matrix.runner }} | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| strategy: | |
| matrix: | |
| gcc: ["", "14"] | |
| arch: [amd64, arm64] | |
| include: | |
| - arch: amd64 | |
| platform: linux/amd64 | |
| runner: ubuntu-latest | |
| - arch: arm64 | |
| platform: linux/arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v6 | |
| - name: Check event name | |
| run: echo ${{ github.event_name }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: GCC image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.cpu" | |
| push: true | |
| platforms: ${{ matrix.platform }} | |
| build-args: "gcc=${{ matrix.gcc }}" | |
| tags: "devitocodes/bases:cpu-gcc${{ matrix.gcc }}-${{ matrix.arch }}" | |
| deploy-cpu-bases-manifest: | |
| if: ${{ github.event_name != 'workflow_dispatch' || inputs.cpu }} | |
| name: "cpu-base-manifest" | |
| runs-on: ubuntu-latest | |
| needs: deploy-cpu-bases | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| strategy: | |
| matrix: | |
| gcc: ["", "14"] | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Create multi-arch manifest | |
| env: | |
| TAG_BASE: ${{ format('cpu-gcc{0}', matrix.gcc) }} | |
| run: | | |
| docker buildx imagetools create \ | |
| --tag "devitocodes/bases:${TAG_BASE}" \ | |
| "devitocodes/bases:${TAG_BASE}-amd64" \ | |
| "devitocodes/bases:${TAG_BASE}-arm64" | |
| docker buildx imagetools inspect "devitocodes/bases:${TAG_BASE}" | |
| ####################################################### | |
| ############## Intel OneApi CPU ####################### | |
| ####################################################### | |
| deploy-oneapi-bases: | |
| if: ${{ github.event_name != 'workflow_dispatch' || inputs.intel }} | |
| name: "oneapi-base" | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v6 | |
| - name: Check event name | |
| run: echo ${{ github.event_name }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: ICX image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.intel" | |
| push: true | |
| target: "icx" | |
| build-args: "arch=icx" | |
| tags: "devitocodes/bases:cpu-icx" | |
| - name: SYCL CPU image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.intel" | |
| push: true | |
| target: "cpu-sycl" | |
| build-args: "arch=cpu-sycl" | |
| tags: "devitocodes/bases:cpu-sycl" | |
| - name: SYCL GPU image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.intel" | |
| push: true | |
| target: "gpu-sycl" | |
| build-args: "arch=gpu-sycl" | |
| tags: "devitocodes/bases:gpu-sycl" | |
| ####################################################### | |
| ################### Nvidia nvhpc ###################### | |
| ####################################################### | |
| deploy-nvidia-bases: | |
| if: ${{ github.event_name != 'workflow_dispatch' || inputs.nvidia }} | |
| name: "nvidia-bases-${{ matrix.arch }}" | |
| runs-on: ${{ matrix.runner }} | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| strategy: | |
| matrix: | |
| arch: [amd64, arm64] | |
| cuda: ['12', '13'] | |
| include: | |
| - arch: amd64 | |
| platform: linux/amd64 | |
| runner: | |
| - self-hosted | |
| - nvidiagpu | |
| - arch: arm64 | |
| platform: linux/arm64 | |
| runner: ubuntu-24.04-arm | |
| - cuda: '12' | |
| nvhpc_version: 'nvhpc-25-7' | |
| extra_tag: '12' | |
| - cuda: '13' | |
| nvhpc_version: 'nvhpc' | |
| extra_tag: '' | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v6 | |
| - name: Check event name | |
| run: echo ${{ github.event_name }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: NVC image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.nvidia" | |
| push: true | |
| target: "nvc" | |
| platforms: ${{ matrix.platform }} | |
| build-args: | | |
| arch=nvc | |
| ver=${{ matrix.nvhpc_version }} | |
| # Label (not tag) with runner name for traceability without changing image tags | |
| labels: builder-runner=${{ runner.name }} | |
| tags: "devitocodes/bases:nvidia-nvc${{ matrix.extra_tag }}-${{ matrix.arch }}" | |
| - name: NVCC image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.nvidia" | |
| push: true | |
| target: "nvcc" | |
| platforms: ${{ matrix.platform }} | |
| build-args: | | |
| arch=nvcc | |
| ver=${{ matrix.nvhpc_version }} | |
| labels: builder-runner=${{ runner.name }} | |
| tags: "devitocodes/bases:nvidia-nvcc${{ matrix.extra_tag }}-${{ matrix.arch }}" | |
| - name: NVC host image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.nvidia" | |
| push: true | |
| target: "nvc-host" | |
| platforms: ${{ matrix.platform }} | |
| build-args: | | |
| arch=nvc-host | |
| ver=${{ matrix.nvhpc_version }} | |
| labels: builder-runner=${{ runner.name }} | |
| tags: "devitocodes/bases:cpu-nvc${{ matrix.extra_tag }}-${{ matrix.arch }}" | |
| deploy-nvidia-bases-manifest: | |
| if: ${{ github.event_name != 'workflow_dispatch' || inputs.nvidia }} | |
| name: "nvidia-base-manifest" | |
| runs-on: ubuntu-latest | |
| needs: deploy-nvidia-bases | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| strategy: | |
| matrix: | |
| final_tag: [nvidia-nvc, nvidia-nvcc, cpu-nvc, nvidia-nvc12, nvidia-nvcc12, cpu-nvc12] | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Create multi-arch manifest | |
| env: | |
| FINAL_TAG: ${{ matrix.final_tag }} | |
| run: | | |
| docker buildx imagetools create \ | |
| --tag "devitocodes/bases:${FINAL_TAG}" \ | |
| "devitocodes/bases:${FINAL_TAG}-amd64" \ | |
| "devitocodes/bases:${FINAL_TAG}-arm64" | |
| docker buildx imagetools inspect "devitocodes/bases:${FINAL_TAG}" | |
| ####################################################### | |
| ##################### AMD ############################# | |
| ####################################################### | |
| deploy-amd-bases: | |
| if: ${{ github.event_name != 'workflow_dispatch' || inputs.amd }} | |
| name: "amd-base" | |
| runs-on: ["self-hosted", "amdgpu"] | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v6 | |
| - name: Check event name | |
| run: echo ${{ github.event_name }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: AMD image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.amd" | |
| push: true | |
| target: "amdclang" | |
| build-args: | | |
| ROCM_VERSION=5.5.1 | |
| UCX_BRANCH=v1.13.1 | |
| OMPI_BRANCH=v4.1.4 | |
| tags: devitocodes/bases:amd | |
| - name: AMD HIP image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.amd" | |
| push: true | |
| target: "hip" | |
| build-args: | | |
| ROCM_VERSION=7.0.2 | |
| tags: devitocodes/bases:amd-hip |