Build base compilers docker images #334
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 | |
| 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: false | |
| arm64: | |
| type: boolean | |
| default: false | |
| nvidia: | |
| type: boolean | |
| default: false | |
| amd: | |
| type: boolean | |
| default: false | |
| intel: | |
| type: boolean | |
| default: false | |
| tags: | |
| description: "Build compiler bases" | |
| schedule: | |
| # Run once a month | |
| - cron: "0 0 1 * *" | |
| jobs: | |
| ####################################################### | |
| ############## GCC x86_64 Base ######################## | |
| ####################################################### | |
| deploy-gcc-amd64-bases: | |
| if: inputs.cpu | |
| name: "gcc-base-amd64" | |
| runs-on: ubuntu-24.04 | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| strategy: | |
| matrix: | |
| gcc: ["", "14"] | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v5 | |
| - name: Check event name | |
| run: echo ${{ github.event_name }} | |
| - 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: Build and push x86_64 GCC image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.cpu" | |
| push: true | |
| platforms: linux/amd64 | |
| build-args: "gcc=${{ matrix.gcc }}" | |
| tags: "devitocodes/bases:cpu-gcc${{ matrix.gcc }}" | |
| ####################################################### | |
| ############## GCC ARM64 Base ######################### | |
| ####################################################### | |
| deploy-gcc-arm64-bases: | |
| if: inputs.arm64 | |
| name: "gcc-base-arm64" | |
| runs-on: ubuntu-24.04-arm | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| strategy: | |
| matrix: | |
| gcc: ["", "14"] | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v5 | |
| - name: Check event name | |
| run: echo ${{ github.event_name }} | |
| - 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: Build and push ARM64 GCC image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.cpu" | |
| push: true | |
| platforms: linux/arm64 | |
| build-args: "gcc=${{ matrix.gcc }}" | |
| tags: "devitocodes/bases:arm64-gcc${{ matrix.gcc }}" | |
| ####################################################### | |
| ############## Intel OneApi CPU ####################### | |
| ####################################################### | |
| deploy-oneapi-bases: | |
| if: inputs.intel | |
| name: "oneapi-base" | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v5 | |
| - 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: inputs.nvidia | |
| name: "nvidia-bases" | |
| runs-on: ["self-hosted", "nvidiagpu"] | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v5 | |
| - 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" | |
| build-args: "arch=nvc" | |
| # Label (not tag) with runner name for traceability without changing image tags | |
| labels: builder-runner=${{ runner.name }} | |
| tags: "devitocodes/bases:nvidia-nvc" | |
| - name: NVCC image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.nvidia" | |
| push: true | |
| target: "nvcc" | |
| build-args: "arch=nvcc" | |
| labels: builder-runner=${{ runner.name }} | |
| tags: "devitocodes/bases:nvidia-nvcc" | |
| - name: NVC host image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: "./docker/Dockerfile.nvidia" | |
| push: true | |
| target: "nvc-host" | |
| build-args: "arch=nvc-host" | |
| labels: builder-runner=${{ runner.name }} | |
| tags: "devitocodes/bases:cpu-nvc" | |
| ####################################################### | |
| ##################### AMD ############################# | |
| ####################################################### | |
| deploy-amd-bases: | |
| if: inputs.amd | |
| name: "amd-base" | |
| runs-on: ["self-hosted", "amdgpu"] | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v5 | |
| - 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=6.3.4 | |
| tags: devitocodes/bases:amd-hip |