[CI] First build Base and Build images, then Intel Drivers #1318
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: CI Containers | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Every 1st and 15th day of month | |
| - cron: '0 0 1,15 * *' | |
| push: | |
| branches: | |
| - sycl | |
| paths: | |
| - 'devops/actions/build_container/**' | |
| - 'devops/containers/**' | |
| - 'devops/dependencies.json' | |
| - 'devops/scripts/install_drivers.sh' | |
| - 'devops/scripts/install_build_tools.sh' | |
| - '.github/workflows/sycl-containers.yaml' | |
| pull_request: | |
| paths: | |
| - 'devops/actions/build_container/**' | |
| - 'devops/containers/**' | |
| - 'devops/dependencies.json' | |
| - 'devops/scripts/install_drivers.sh' | |
| - 'devops/scripts/install_build_tools.sh' | |
| - '.github/workflows/sycl-containers.yaml' | |
| permissions: read-all | |
| jobs: | |
| # First build "Base" and "Build" images | |
| build_and_push_non_intel_images: | |
| if: github.repository == 'intel/llvm' | |
| name: "Containers" | |
| runs-on: docker-builder | |
| permissions: | |
| packages: write | |
| strategy: | |
| matrix: | |
| include: | |
| # - name: Base Ubuntu 22.04 Docker image | |
| # file: ubuntu2204_base | |
| # tag: latest | |
| # build_args: "" | |
| # - name: Base Ubuntu 24.04 Docker image | |
| # file: ubuntu2404_base | |
| # tag: latest | |
| # build_args: "" | |
| # - name: Build Ubuntu 22.04 Docker image | |
| # file: ubuntu2204_build | |
| # tag: latest | |
| # build_args: "" | |
| - name: Build Ubuntu 24.04 Docker image | |
| file: ubuntu2404_build | |
| tag: abcdef | |
| build_args: "" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 2 | |
| - name: Print dockers | |
| run: | | |
| docker image list | |
| - name: Build and Push Container | |
| uses: ./devops/actions/build_container | |
| with: | |
| push: ${{ github.event_name != 'pull_request' }} | |
| load: ${{ github.event_name == 'pull_request' }} | |
| file: ${{ matrix.file }} | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| tags: ghcr.io/intel/llvm/test1:${{ matrix.tag }} | |
| build-args: ${{ matrix.build_args }} | |
| - name: Print dockers 2 | |
| run: | | |
| docker image list | |
| - name: Print dockers 2204base | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2204_base:latest || true | |
| - name: Print dockers 2404base | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2404_base:latest || true | |
| - name: Print dockers 2204build | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2204_build:latest || true | |
| - name: Print dockers 2404build | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2404_build:latest || true | |
| - name: Print dockers 2204_intel_latest | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest || true | |
| - name: Print dockers 2404_intel_latest | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest || true | |
| - name: Print dockers 2204_intel_alldeps | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2204_intel_drivers:alldeps || true | |
| - name: Print dockers 2404_intel_alldeps | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps || true | |
| # Then build "Intel Drivers" images that depend on previous images. | |
| # | |
| # XXX: on self-hosted runner the below issue may be gone (as images are now built on a single machine | |
| # and the actually latest image will be available for "intel drivers" images to use). | |
| # | |
| # Note: Building these images on PR means using old "Base" and "Build" images, | |
| # as the ones above were not yet pushed. | |
| build_and_push_intel_images: | |
| needs: build_and_push_non_intel_images | |
| name: "Containers" | |
| runs-on: docker-builder | |
| permissions: | |
| packages: write | |
| strategy: | |
| matrix: | |
| include: | |
| # - name: Intel Drivers Ubuntu 22.04 Docker image | |
| # file: ubuntu2204_intel_drivers | |
| # tag: latest | |
| # build_args: "" | |
| # - name: Intel Drivers Ubuntu 24.04 Docker image | |
| # file: ubuntu2404_intel_drivers | |
| # tag: latest | |
| # build_args: "" | |
| # - name: Build + Intel Drivers Ubuntu 22.04 Docker image | |
| # file: ubuntu2204_intel_drivers | |
| # tag: alldeps | |
| # build_args: | | |
| # base_image=ghcr.io/intel/llvm/ubuntu2204_build | |
| # base_tag=latest | |
| - name: Build + Intel Drivers Ubuntu 24.04 Docker image | |
| file: ubuntu2404_intel_drivers | |
| tag: alldeps | |
| build_args: | | |
| base_image=ghcr.io/intel/llvm/test1 | |
| base_tag=abcdef | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 2 | |
| - name: Build and Push Container | |
| uses: ./devops/actions/build_container | |
| with: | |
| push: ${{ github.event_name != 'pull_request' }} | |
| load: ${{ github.event_name == 'pull_request' }} | |
| file: ${{ matrix.file }} | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| tags: | | |
| ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }}-${{ github.sha }} | |
| ghcr.io/${{ github.repository }}/${{ matrix.file }}:${{ matrix.tag }} | |
| build-args: ${{ matrix.build_args }} | |
| - name: Print dockers | |
| run: | | |
| docker image list | |
| - name: Print dockers 2204base | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2204_base:latest || true | |
| - name: Print dockers 2404base | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2404_base:latest || true | |
| - name: Print dockers 2204build | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2204_build:latest || true | |
| - name: Print dockers 2404build | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2404_build:latest || true | |
| - name: Print dockers 2204_intel_latest | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest || true | |
| - name: Print dockers 2404_intel_latest | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest || true | |
| - name: Print dockers 2204_intel_alldeps | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2204_intel_drivers:alldeps || true | |
| - name: Print dockers 2404_intel_alldeps | |
| run: | | |
| docker image inspect ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps || true |