Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to '.github/workflows/ci.yaml')
-rw-r--r--.github/workflows/ci.yaml43
1 files changed, 20 insertions, 23 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 6d3e488bb0..d82e46016d 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -1,14 +1,10 @@
-# Please make sure that the `needs` fields for both `end-success` and `end-failure`
+# Please make sure that the `needs` field for the `conclusion` job
# are updated when adding new jobs!
name: CI
on:
pull_request:
- push:
- branches:
- - auto
- - try
- - automation/bors/try
+ merge_group:
env:
CARGO_INCREMENTAL: 0
@@ -104,11 +100,11 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats .
- - name: Run analysis-stats on rust std library
+ - name: Run analysis-stats on the rust standard libraries
if: matrix.os == 'ubuntu-latest'
env:
- RUSTC_BOOTSTRAP: 1
- run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std
+ RUSTC_BOOTSTRAP: 1
+ run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps --no-sysroot --no-test $(rustc --print sysroot)/lib/rustlib/src/rust/library/
- name: clippy
if: matrix.os == 'windows-latest'
@@ -237,20 +233,21 @@ jobs:
- name: check for typos
run: typos
- end-success:
- name: bors build finished
- if: github.event.pusher.name == 'bors' && success()
- runs-on: ubuntu-latest
+ conclusion:
needs: [rust, rust-cross, typescript, typo-check]
- steps:
- - name: Mark the job as successful
- run: exit 0
-
- end-failure:
- name: bors build finished
- if: github.event.pusher.name == 'bors' && !success()
+ # We need to ensure this job does *not* get skipped if its dependencies fail,
+ # because a skipped job is considered a success by GitHub. So we have to
+ # overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
+ # when the workflow is canceled manually.
+ #
+ # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
+ if: ${{ !cancelled() }}
runs-on: ubuntu-latest
- needs: [rust, rust-cross, typescript, typo-check]
steps:
- - name: Mark the job as a failure
- run: exit 1
+ # Manually check the status of all dependencies. `if: failure()` does not work.
+ - name: Conclusion
+ run: |
+ # Print the dependent jobs to see them in the CI log
+ jq -C <<< '${{ toJson(needs) }}'
+ # Check if all jobs that we depend on (in the needs array) were successful.
+ jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'