Skip to content

Commit c1af220

Browse files
committed
simplify GHA required build settings
by adding a single `build-results` job which depends on all other jobs we can simplify the setting of required builds in the repository. currently, all builds - including all variations of the build matrix! - need to be manually specified. once this has been merged the settings can be changed to require only this one job (which will fail if any of the other jobs failed). this way it's also easier to add/remove jobs or change the build matrix as it no longer requires changing the settings on the repository. this is inspired by [this discussion on GH][discussion]. [discussion]: https://github.com/orgs/community/discussions/26822
1 parent b7034fb commit c1af220

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/CI.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,14 @@ jobs:
6363
name: vcpkg-buildtree-logs-${{ matrix.os }}
6464
path: |
6565
vcpkg/buildtrees/**/*.log
66+
67+
# simplify GH settings: have one single build to be required
68+
build-results:
69+
name: Final Results
70+
if: ${{ always() }}
71+
runs-on: ubuntu-latest
72+
needs: [build]
73+
steps:
74+
- name: check for failed builds
75+
if: ${{ needs.build.result != 'success' }}
76+
run: exit 1

0 commit comments

Comments
 (0)