From a75a6cae20ecbeb0874108fb10a34c80a6fcabd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Fri, 11 Oct 2024 15:37:44 +0200 Subject: [PATCH] Switch from using Bors to merge queue in CI --- .github/workflows/rust.yml | 39 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e30f34c97..1992f3db8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,11 +1,8 @@ name: Rust on: - push: - branches-ignore: - - trying.tmp - - staging.tmp pull_request: + merge_group: jobs: miri: @@ -78,28 +75,16 @@ jobs: target: x86_64-unknown-linux-gnu channel: stable - # These jobs doesn't actually test anything, but they're only used to tell - # bors the build completed, as there is no practical way to detect when a - # workflow is successful listening to webhooks only. - # - # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB! - - end-success: - name: bors build finished - if: github.event.pusher.name == 'bors' && success() - runs-on: ubuntu-latest - needs: [miri, rustfmt_clippy, test] - - steps: - - name: Mark the job as successful - run: exit 0 - - end-failure: - name: bors build finished - if: github.event.pusher.name == 'bors' && (failure() || cancelled()) + conclusion: + # https://github.com/rust-lang/rustup/blob/a9c4362a1b256ce56ef6a567b0ce46a474b8cd28/.github/workflows/ci.yaml + if: always() + needs: [test] runs-on: ubuntu-latest - needs: [miri, rustfmt_clippy, test] - steps: - - name: Mark the job as a failure - run: exit 1 + - name: Conclusion + run: | + jq -C <<< "${needs}" + # Check if all needs were successful or skipped. + "$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")" + env: + needs: ${{ toJson(needs) }}