From b362d47484d64e10c64deb6517f40e4ee5dd1a84 Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Thu, 15 Jun 2023 09:11:24 -0700 Subject: [PATCH 1/3] [CI] Don't skip E2E tests if only check-* steps in build fails We already have proper check on the `e2e-tests` job, but it depends on the `aws-start` task and that didn't have the check. That resulted in the `aws-start` being skipped whenever any of `check-*` steps failed and resulted in E2E tests not running even though we can easily run them to get better coverage. This should make our post-commit CI more useful in presence of failures on `check-*` targets during the build stage. --- .github/workflows/sycl_linux_build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sycl_linux_build_and_test.yml b/.github/workflows/sycl_linux_build_and_test.yml index 93eadd1faa533..7cfed83273a20 100644 --- a/.github/workflows/sycl_linux_build_and_test.yml +++ b/.github/workflows/sycl_linux_build_and_test.yml @@ -182,7 +182,7 @@ jobs: aws-start: name: Start AWS needs: build - if: ${{ inputs.lts_aws_matrix != '[]' }} + if: ${{ always() && needs.build.result == 'success' && inputs.lts_aws_matrix != '[]' }} runs-on: ubuntu-20.04 environment: aws steps: From 3c00c9eb8abbdc7e781c82914d642a511b90d44e Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Thu, 15 Jun 2023 10:24:31 -0700 Subject: [PATCH 2/3] Try to enable install/upload steps --- .github/workflows/sycl_linux_build_and_test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sycl_linux_build_and_test.yml b/.github/workflows/sycl_linux_build_and_test.yml index 7cfed83273a20..dd837807b1027 100644 --- a/.github/workflows/sycl_linux_build_and_test.yml +++ b/.github/workflows/sycl_linux_build_and_test.yml @@ -146,6 +146,7 @@ jobs: run: | cmake --build $GITHUB_WORKSPACE/build --target check-libdevice - name: Install + if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }} # TODO replace utility installation with a single CMake target run: | cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain @@ -159,7 +160,7 @@ jobs: cmake --build $GITHUB_WORKSPACE/build --target install-llvm-profdata cmake --build $GITHUB_WORKSPACE/build --target install-compiler-rt - name: Additional Install for "--shared-libs" build - if: ${{ contains(inputs.build_configure_extra_args, '--shared-libs') }} + if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && contains(inputs.build_configure_extra_args, '--shared-libs') }} run: | cmake --build $GITHUB_WORKSPACE/build --target install-clang-libraries cmake --build $GITHUB_WORKSPACE/build --target install-llvm-libraries @@ -172,8 +173,10 @@ jobs: cmake --build $GITHUB_WORKSPACE/build --target install-clang-tidy - name: Pack toolchain + if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }} run: tar -I 'zstd -9' -cf llvm_sycl.tar.zst -C $GITHUB_WORKSPACE/build/install . - name: Upload toolchain + if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }} uses: actions/upload-artifact@v3 with: name: sycl_linux_${{ inputs.build_artifact_suffix }} @@ -182,7 +185,7 @@ jobs: aws-start: name: Start AWS needs: build - if: ${{ always() && needs.build.result == 'success' && inputs.lts_aws_matrix != '[]' }} + if: ${{ always() && !cancelled() && needs.build.build.result == 'success' && inputs.lts_aws_matrix != '[]' }} runs-on: ubuntu-20.04 environment: aws steps: From da4e60e4e36e9275c8cadbd8b8035c37c939448e Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Thu, 15 Jun 2023 13:49:21 -0700 Subject: [PATCH 3/3] Now try to enable the jobs --- .github/workflows/sycl_linux_build_and_test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sycl_linux_build_and_test.yml b/.github/workflows/sycl_linux_build_and_test.yml index dd837807b1027..d55a5f992d06f 100644 --- a/.github/workflows/sycl_linux_build_and_test.yml +++ b/.github/workflows/sycl_linux_build_and_test.yml @@ -77,6 +77,8 @@ jobs: container: image: ${{ inputs.build_image }} options: -u 1001:1001 + outputs: + build_conclusion: ${{ steps.build.conclusion }} steps: # GHA requires relative paths for actions. Copy actions from container root # to CWD. @@ -185,7 +187,7 @@ jobs: aws-start: name: Start AWS needs: build - if: ${{ always() && !cancelled() && needs.build.build.result == 'success' && inputs.lts_aws_matrix != '[]' }} + if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' && inputs.lts_aws_matrix != '[]' }} runs-on: ubuntu-20.04 environment: aws steps: @@ -208,7 +210,7 @@ jobs: needs: [build, aws-start] # Continue if build was successful. If aws-start is not successful all # AWS tasks will fail, but all non-AWS tasks should continue. - if: ${{ always() && needs.build.result == 'success' && inputs.lts_matrix != '[]' }} + if: ${{ always() && needs.build.outputs.build_conclusion == 'success' && inputs.lts_matrix != '[]' }} strategy: fail-fast: false matrix: