From 9f01830a7aa3baac071e73583d2310cb782d232f Mon Sep 17 00:00:00 2001 From: Alexander Batashev Date: Tue, 14 Dec 2021 20:41:11 +0300 Subject: [PATCH] [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. --- .github/workflows/sycl_nightly.yml | 29 +++++++++++++------------- .github/workflows/sycl_post_commit.yml | 2 +- .github/workflows/sycl_precommit.yml | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/sycl_nightly.yml b/.github/workflows/sycl_nightly.yml index c3e1918b9a106..ab7d18eb8543d 100644 --- a/.github/workflows/sycl_nightly.yml +++ b/.github/workflows/sycl_nightly.yml @@ -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 @@ -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 + diff --git a/.github/workflows/sycl_post_commit.yml b/.github/workflows/sycl_post_commit.yml index c105ee34665a5..b81113f47c9c8 100644 --- a/.github/workflows/sycl_post_commit.yml +++ b/.github/workflows/sycl_post_commit.yml @@ -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 diff --git a/.github/workflows/sycl_precommit.yml b/.github/workflows/sycl_precommit.yml index 20f3199c2f766..346ffd8670d35 100644 --- a/.github/workflows/sycl_precommit.yml +++ b/.github/workflows/sycl_precommit.yml @@ -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"