Skip to content

Commit 5b1a9d2

Browse files
[CI] Don't skip E2E tests if only check-* steps in build fail (#9912)
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.
1 parent 199f12a commit 5b1a9d2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ jobs:
7777
container:
7878
image: ${{ inputs.build_image }}
7979
options: -u 1001:1001
80+
outputs:
81+
build_conclusion: ${{ steps.build.conclusion }}
8082
steps:
8183
# GHA requires relative paths for actions. Copy actions from container root
8284
# to CWD.
@@ -146,6 +148,7 @@ jobs:
146148
run: |
147149
cmake --build $GITHUB_WORKSPACE/build --target check-libdevice
148150
- name: Install
151+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
149152
# TODO replace utility installation with a single CMake target
150153
run: |
151154
cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain
@@ -159,7 +162,7 @@ jobs:
159162
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-profdata
160163
cmake --build $GITHUB_WORKSPACE/build --target install-compiler-rt
161164
- name: Additional Install for "--shared-libs" build
162-
if: ${{ contains(inputs.build_configure_extra_args, '--shared-libs') }}
165+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && contains(inputs.build_configure_extra_args, '--shared-libs') }}
163166
run: |
164167
cmake --build $GITHUB_WORKSPACE/build --target install-clang-libraries
165168
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-libraries
@@ -172,8 +175,10 @@ jobs:
172175
cmake --build $GITHUB_WORKSPACE/build --target install-clang-tidy
173176
174177
- name: Pack toolchain
178+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
175179
run: tar -I 'zstd -9' -cf llvm_sycl.tar.zst -C $GITHUB_WORKSPACE/build/install .
176180
- name: Upload toolchain
181+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
177182
uses: actions/upload-artifact@v3
178183
with:
179184
name: sycl_linux_${{ inputs.build_artifact_suffix }}
@@ -182,7 +187,7 @@ jobs:
182187
aws-start:
183188
name: Start AWS
184189
needs: build
185-
if: ${{ inputs.lts_aws_matrix != '[]' }}
190+
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' && inputs.lts_aws_matrix != '[]' }}
186191
uses: ./.github/workflows/aws.yml
187192
secrets: inherit
188193
with:
@@ -193,7 +198,7 @@ jobs:
193198
needs: [build, aws-start]
194199
# Continue if build was successful. If aws-start is not successful all
195200
# AWS tasks will fail, but all non-AWS tasks should continue.
196-
if: ${{ always() && needs.build.result == 'success' && inputs.lts_matrix != '[]' }}
201+
if: ${{ always() && needs.build.outputs.build_conclusion == 'success' && inputs.lts_matrix != '[]' }}
197202
strategy:
198203
fail-fast: false
199204
matrix:

0 commit comments

Comments
 (0)