From 3fb2c7113a10375feecf033869ef491fff1e4a42 Mon Sep 17 00:00:00 2001 From: "T.J. Telan" Date: Tue, 7 Nov 2023 23:00:13 -0800 Subject: [PATCH] Enable merge_group event in CI Replace Bors with GH merge queue --- .github/workflows/ci.yml | 25 ++++++++++--------------- .github/workflows/ci_mac.yaml | 4 ++-- bors.toml | 6 ------ 3 files changed, 12 insertions(+), 23 deletions(-) delete mode 100644 bors.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 950da9f953..8653a70cf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,18 +2,13 @@ name: CI permissions: read-all -#permissions: -# contents: read concurrency: group: ci-${{ github.ref }} cancel-in-progress: true on: - push: - branches: - - staging - - trying + merge_group: pull_request: branches: [master] paths: @@ -57,7 +52,7 @@ jobs: - id: check run: echo "::set-output name=check::${{ env.ENABLE_CHECK }}" #- name: Set Staging runs - ## if: github.event_name == 'push' && github.ref == 'refs/heads/staging' + ## if: github.event_name == 'merge_group' # run: echo "TEST_RUNS='[r1,r2,r3,r4,r5]'" | tee -a $GITHUB_ENV # build binaries for linux x86_64/aarch64 musl which is primary OS for testing clusters @@ -142,7 +137,7 @@ jobs: # build other binaries which doesn't need test build_binaries: name: Build ${{ matrix.binary }} for ${{ matrix.rust-target }} on (${{ matrix.os }}) - if: github.event_name == 'push' && github.ref == 'refs/heads/staging' + if: github.event_name == 'merge_group' runs-on: ${{ matrix.os }} strategy: # fail-fast: false @@ -252,10 +247,10 @@ jobs: steps: - uses: actions/checkout@v4 - # If this job is being run by Bors (it was pushed to staging), + # If this job is being run by merge_group, # then build and run in release mode - name: Set RELEASE mode - if: github.event_name == 'push' && github.ref == 'refs/heads/staging' + if: github.event_name == 'merge_group' shell: bash run: | echo "RELEASE=true" | tee -a $GITHUB_ENV @@ -1244,7 +1239,7 @@ jobs: # After this, we are committed for release docker_push: name: Publish Docker Image - if: github.event_name == 'push' && github.ref == 'refs/heads/staging' + if: github.event_name == 'merge_group' needs: - check - check_wasm @@ -1295,7 +1290,7 @@ jobs: # When all required jobs pass, bump the `dev` GH prerelease to this commit bump_github_release: name: Bump dev tag - if: github.event_name == 'push' && github.ref == 'refs/heads/staging' + if: github.event_name == 'merge_group' needs: - docker_push runs-on: ubuntu-latest @@ -1316,7 +1311,7 @@ jobs: # Upload the build artifacts to the `dev` GH release, overwriting old artifacts publish_github_helm_pkg: name: Publish helm chart to GitHub Releases dev - if: github.event_name == 'push' && github.ref == 'refs/heads/staging' + if: github.event_name == 'merge_group' needs: bump_github_release runs-on: ubuntu-latest permissions: write-all @@ -1333,7 +1328,7 @@ jobs: publish_github_binaries: name: Publish to GitHub Releases dev (${{ matrix.artifact }}-${{ matrix.rust-target }}) - if: github.event_name == 'push' && github.ref == 'refs/heads/staging' + if: github.event_name == 'merge_group' needs: - bump_github_release runs-on: ubuntu-latest @@ -1398,7 +1393,7 @@ jobs: # Used by Bors to detect that all required jobs have completed successfully done: name: Done - if: github.event_name == 'push' && github.ref == 'refs/heads/staging' + if: github.event_name == 'merge_group' needs: [publish_github_binaries, publish_github_helm_pkg] runs-on: ubuntu-latest steps: diff --git a/.github/workflows/ci_mac.yaml b/.github/workflows/ci_mac.yaml index 7803653569..9cacea9ea4 100644 --- a/.github/workflows/ci_mac.yaml +++ b/.github/workflows/ci_mac.yaml @@ -74,10 +74,10 @@ jobs: steps: - uses: actions/checkout@v4 - # If this job is being run by Bors (it was pushed to staging), + # If this job is being run by merge_group, # then build and run in release mode - name: Set RELEASE mode - if: github.event_name == 'push' && github.ref == 'refs/heads/staging' + if: github.event_name == 'merge_group' shell: bash run: | echo "RELEASE=true" | tee -a $GITHUB_ENV diff --git a/bors.toml b/bors.toml deleted file mode 100644 index 7c9afa295c..0000000000 --- a/bors.toml +++ /dev/null @@ -1,6 +0,0 @@ -status = [ - "Done", -] -use_squash_merge = true -delete_merged_branches = true -timeout_sec = 3600 # 45 mins