Skip to content

Commit

Permalink
[CI] Refactor workflow files (#5134)
Browse files Browse the repository at this point in the history
Use "build" label to dispatch compiler build jobs to build machines.
Use `build_container` action in Nightly workflow for unification with other container jobs.
  • Loading branch information
Alexander Batashev authored Dec 14, 2021
1 parent a95c12a commit 9f01830
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/sycl_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
pull_request:
paths:
- 'devops/containers/ubuntu2004_preinstalled.Dockerfile'
- '.github/workflows/sycl_nightly.yml'

jobs:
ubuntu2004_build_test:
if: github.repository == 'intel/llvm'
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
with:
build_runs_on: sycl-precommit-linux
build_runs_on: build
build_github_cache: true
build_cache_root: "/__w/"
build_artifact_suffix: default
Expand All @@ -24,33 +28,30 @@ jobs:
with:
name: sycl_linux_default
path: devops/
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
- name: Build and Push Container (with drivers)
uses: ./devops/actions/build_container
with:
registry: ghcr.io
push: ${{ github.event_name != 'pull_request' }}
file: ubuntu2004_preinstalled
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Container (with drivers)
uses: docker/build-push-action@v2
with:
push: true
build-args: |
base_image=ghcr.io/intel/llvm/ubuntu2004_intel_drivers
base_tag=latest
tags: |
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:${{ github.sha }}
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:latest
context: ${{ github.workspace }}/devops
file: ${{ github.workspace }}/devops/containers/ubuntu2004_preinstalled.Dockerfile
- name: Build and Push Container (no drivers)
uses: docker/build-push-action@v2
uses: ./devops/actions/build_container
with:
push: true
push: ${{ github.event_name != 'pull_request' }}
file: ubuntu2004_preinstalled
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
build-args: |
base_image=ghcr.io/intel/llvm/ubuntu2004_base
base_tag=latest
tags: |
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:no-drivers-${{ github.sha }}
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:no-drivers
context: ${{ github.workspace }}/devops
file: ${{ github.workspace }}/devops/containers/ubuntu2004_preinstalled.Dockerfile
2 changes: 1 addition & 1 deletion .github/workflows/sycl_post_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
build_cache_root: "/__w/llvm"
build_github_cache: true
build_artifact_suffix: default
build_artifact_suffix: build
linux_no_assert:
name: Linux (no assert)
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sycl_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
if: always() && (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl
with:
build_runs_on: "sycl-precommit-linux"
build_runs_on: "build"
build_cache_root: "/__w/"
build_cache_size: "8G"
build_artifact_suffix: "default"
Expand Down

0 comments on commit 9f01830

Please sign in to comment.