From 54e7eb070af79a3bfbb3d1b1523b63d64b33f642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:51:12 +0000 Subject: [PATCH] Update CI as a precursor to enabling merge queues (#143) * Update CI as a precursor to enabling merge queues See #142 * Try to fix CI config * Update CI images in use * Remove bors config * Update rstar changelog * More CI fiddling * Remove changelog mod for now * Ensure we run on correct branches * Use PyO3-inspired CI job setup * Update changelog * Ensure that we test against crate MSRV --- .github/workflows/test.yml | 71 +++++++++++++++++++++++--------------- bors.toml | 3 -- rstar/CHANGELOG.md | 1 + 3 files changed, 44 insertions(+), 31 deletions(-) delete mode 100644 bors.toml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95b1ff9..5bea668 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,28 +1,24 @@ -on: push name: Run tests -jobs: - # The `ci-result` job doesn't actually test anything - it just aggregates the - # overall build status for bors, otherwise our bors.toml would need an entry - # for each individual job produced by the job-matrix. - # - # Ref: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149 - # - # ALL THE SUBSEQUENT JOBS NEED THEIR `name` ADDED TO THE `needs` SECTION OF THIS JOB! - ci-result: - name: ci result - runs-on: ubuntu-latest - needs: - - rstar - - check - - no_std - steps: - - name: Mark the job as a success - if: success() - run: exit 0 - - name: Mark the job as a failure - if: "!success()" - run: exit 1 +on: + push: + branches: + - master + - main + - staging + - trying + - release/** + pull_request: + merge_group: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + +jobs: rstar: name: rstar runs-on: ubuntu-latest @@ -33,16 +29,19 @@ jobs: strategy: matrix: container_image: + # We aim to support rust-stable plus (at least) the prior 3 releases, + # giving us about 6 months of coverage. + # # Minimum supported rust version (MSRV) - "georust/geo-ci:rust-1.63" # Two most recent releases - we omit older ones for expedient CI - - "georust/geo-ci:rust-1.65" - - "georust/geo-ci:rust-1.66" + - "georust/geo-ci:proj-9.2.1-rust-1.71" + - "georust/geo-ci:proj-9.2.1-rust-1.72" container: image: ${{ matrix.container_image }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - run: cargo install --version 1.6.0 cargo-all-features - run: cargo build-all-features - run: cargo test-all-features @@ -53,7 +52,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable with: @@ -70,10 +69,26 @@ jobs: NO_STD_TARGET: aarch64-unknown-none steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable with: targets: ${{env.NO_STD_TARGET}} - name: Run cargo build for ${{env.NO_STD_TARGET}} run: cargo build --package rstar --target ${{env.NO_STD_TARGET}} + + conclusion: + needs: + - rstar + - check + - no_std + if: always() + runs-on: ubuntu-latest + steps: + - name: Result + 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) }} diff --git a/bors.toml b/bors.toml deleted file mode 100644 index bfa4661..0000000 --- a/bors.toml +++ /dev/null @@ -1,3 +0,0 @@ -status = [ - "ci result", -] diff --git a/rstar/CHANGELOG.md b/rstar/CHANGELOG.md index 9b3fa66..9d88cf7 100644 --- a/rstar/CHANGELOG.md +++ b/rstar/CHANGELOG.md @@ -8,6 +8,7 @@ - Fixed a stack overflow error in `DrainIterator::next` - Clarified that the distance measure in `distance_2` is not restricted to euclidean distance - updated to `heapless=0.8` +- Updated CI config to use merge queue ([PR](https://github.com/georust/rstar/pull/143)) # 0.11.0