Skip to content

[CI] Refactor sycl-containers to use matrix #13292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 25 additions & 78 deletions .github/workflows/sycl-containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,31 @@ on:
permissions: read-all

jobs:
base_image_ubuntu2204:
build_and_push_images:
if: github.repository == 'intel/llvm'
name: Base Ubuntu 22.04 Docker image
name: Build and Push Docker Images
runs-on: ubuntu-22.04
permissions:
packages: write
strategy:
matrix:
include:
- name: Base Ubuntu 22.04 Docker image
file: ubuntu2204_base
tags: ubuntu2204_base
build_args: ""
- name: Build Ubuntu Docker image
file: ubuntu2204_build
tags: ubuntu2204_build
build_args: ""
- name: Intel Drivers Ubuntu 22.04 Docker image
file: ubuntu2204_intel_drivers
tags: ubuntu2204_intel_drivers
build_args: "use_latest=false"
- name: Intel Drivers (unstable) Ubuntu 22.04 Docker image
file: ubuntu2204_intel_drivers
tags: ubuntu2204_intel_drivers_unstable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this patch changes tags we used for uploading docker images.
@jsji, could you update the documentation https://github.com/intel/llvm/blob/sycl/sycl/doc/developer/DockerBKMs.md#sycl-containers-overview if it's needed, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the tag for unstable is changed, but we never mentioned/use it anywhere in source tree/docs. So I don't think any updated needed. Let me know if there is some usage that I don't know.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update the doc to describe how to test with dev igc later when the whole workflow is enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#13307 for the image update first.

build_args: "use_latest=true"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -39,83 +58,11 @@ jobs:
uses: ./devops/actions/build_container
with:
push: ${{ github.event_name != 'pull_request' }}
file: ubuntu2204_base
file: ${{ matrix.file }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
tags: |
ghcr.io/${{ github.repository }}/ubuntu2204_base:${{ github.sha }}
ghcr.io/${{ github.repository }}/ubuntu2204_base:latest
build_image_ubuntu2204:
if: github.repository == 'intel/llvm'
name: Build Ubuntu Docker image
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Build and Push Container
uses: ./devops/actions/build_container
with:
push: ${{ github.event_name != 'pull_request' }}
file: ubuntu2204_build
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
tags: |
ghcr.io/${{ github.repository }}/ubuntu2204_build:${{ github.sha }}
ghcr.io/${{ github.repository }}/ubuntu2204_build:latest
ghcr.io/${{ github.repository }}/${{ matrix.tags }}-${{ github.sha }}
ghcr.io/${{ github.repository }}/${{ matrix.tags }}:latest
build-args: ${{ matrix.build_args }}

# This job produces a Docker container with the latest versions of Intel
# drivers, that can be found on GitHub.
drivers_image_ubuntu2204:
if: github.repository == 'intel/llvm'
name: Intel Drivers Ubuntu 22.04 Docker image
runs-on: ubuntu-22.04
permissions:
packages: write
needs: base_image_ubuntu2204
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Build and Push Container
uses: ./devops/actions/build_container
with:
push: ${{ github.event_name != 'pull_request' }}
file: ubuntu2204_intel_drivers
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
tags: |
ghcr.io/${{ github.repository }}/ubuntu2204_intel_drivers:latest-${{ github.sha }}
ghcr.io/${{ github.repository }}/ubuntu2204_intel_drivers:latest
build-args: |
use_latest=false
# This job produces a Docker container with the latest versions of Intel
# drivers, that can be found on GitHub.
drivers_image_ubuntu2204_unstable:
if: github.repository == 'intel/llvm'
name: Intel Drivers (unstable) Ubuntu 22.04 Docker image
runs-on: ubuntu-22.04
permissions:
packages: write
needs: base_image_ubuntu2204
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Build and Push Container
uses: ./devops/actions/build_container
with:
push: ${{ github.event_name != 'pull_request' }}
file: ubuntu2204_intel_drivers
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
tags: |
ghcr.io/${{ github.repository }}/ubuntu2204_intel_drivers:unstable-${{ github.sha }}
ghcr.io/${{ github.repository }}/ubuntu2204_intel_drivers:unstable
build-args: |
use_latest=true