Skip to content

Commit 9f01830

Browse files
author
Alexander Batashev
authored
[CI] Refactor workflow files (#5134)
Use "build" label to dispatch compiler build jobs to build machines. Use `build_container` action in Nightly workflow for unification with other container jobs.
1 parent a95c12a commit 9f01830

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

.github/workflows/sycl_nightly.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ on:
44
workflow_dispatch:
55
schedule:
66
- cron: '0 3 * * *'
7+
pull_request:
8+
paths:
9+
- 'devops/containers/ubuntu2004_preinstalled.Dockerfile'
10+
- '.github/workflows/sycl_nightly.yml'
711

812
jobs:
913
ubuntu2004_build_test:
1014
if: github.repository == 'intel/llvm'
1115
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
1216
with:
13-
build_runs_on: sycl-precommit-linux
17+
build_runs_on: build
1418
build_github_cache: true
1519
build_cache_root: "/__w/"
1620
build_artifact_suffix: default
@@ -24,33 +28,30 @@ jobs:
2428
with:
2529
name: sycl_linux_default
2630
path: devops/
27-
- name: Login to GitHub Container Registry
28-
uses: docker/login-action@v1
31+
- name: Build and Push Container (with drivers)
32+
uses: ./devops/actions/build_container
2933
with:
30-
registry: ghcr.io
34+
push: ${{ github.event_name != 'pull_request' }}
35+
file: ubuntu2004_preinstalled
3136
username: ${{ github.repository_owner }}
3237
password: ${{ secrets.GITHUB_TOKEN }}
33-
- name: Build and Push Container (with drivers)
34-
uses: docker/build-push-action@v2
35-
with:
36-
push: true
3738
build-args: |
3839
base_image=ghcr.io/intel/llvm/ubuntu2004_intel_drivers
3940
base_tag=latest
4041
tags: |
4142
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:${{ github.sha }}
4243
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:latest
43-
context: ${{ github.workspace }}/devops
44-
file: ${{ github.workspace }}/devops/containers/ubuntu2004_preinstalled.Dockerfile
4544
- name: Build and Push Container (no drivers)
46-
uses: docker/build-push-action@v2
45+
uses: ./devops/actions/build_container
4746
with:
48-
push: true
47+
push: ${{ github.event_name != 'pull_request' }}
48+
file: ubuntu2004_preinstalled
49+
username: ${{ github.repository_owner }}
50+
password: ${{ secrets.GITHUB_TOKEN }}
4951
build-args: |
5052
base_image=ghcr.io/intel/llvm/ubuntu2004_base
5153
base_tag=latest
5254
tags: |
5355
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:no-drivers-${{ github.sha }}
5456
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:no-drivers
55-
context: ${{ github.workspace }}/devops
56-
file: ${{ github.workspace }}/devops/containers/ubuntu2004_preinstalled.Dockerfile
57+

.github/workflows/sycl_post_commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
with:
1212
build_cache_root: "/__w/llvm"
1313
build_github_cache: true
14-
build_artifact_suffix: default
14+
build_artifact_suffix: build
1515
linux_no_assert:
1616
name: Linux (no assert)
1717
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl

.github/workflows/sycl_precommit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
if: always() && (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
2626
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
2727
with:
28-
build_runs_on: "sycl-precommit-linux"
28+
build_runs_on: "build"
2929
build_cache_root: "/__w/"
3030
build_cache_size: "8G"
3131
build_artifact_suffix: "default"

0 commit comments

Comments
 (0)