From b1e98d78030bd66e2b4e8c068c1f5c1d0e1b7813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:08:35 +0000 Subject: [PATCH 01/11] Update CI as a precursor to enabling merge queues See #142 --- .github/workflows/test.yml | 41 ++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95b1ff9..00778d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,29 +1,44 @@ -on: push +on: + push: + branches: + - main + - staging + - trying + - release/** + pull_request: + merge_group: + 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 + # The `ci-success` job doesn't actually test anything - it just aggregates the + # overall build status, otherwise the merge queue 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: + # ALL THE SUBSEQUENT JOBS NEED THEIR `name` ADDED TO THE `needs` SECTION OF both "ci result" JOBS! + ci-success: name: ci result runs-on: ubuntu-latest needs: - rstar - check - no_std + if: success() steps: - name: Mark the job as a success - if: success() run: exit 0 + ci-failure: + name: ci result + runs-on: ubuntu-latest + needs: + - rstar + - check + - no_std + if: failure() + steps: - name: Mark the job as a failure - if: "!success()" run: exit 1 - rstar: + rstar: name: rstar runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[skip ci]')" @@ -34,10 +49,10 @@ jobs: matrix: container_image: # 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" + # Two most recent releases - we omit older ones for expedient CI + - "georust/geo-ci:rust-1.71" + - "georust/geo-ci:rust-1.72" container: image: ${{ matrix.container_image }} steps: From 6b16d39a33110d2766248fff85c7ae8b561dd916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:10:49 +0000 Subject: [PATCH 02/11] Try to fix CI config --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 00778d3..0dc6fd8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: - name: Mark the job as a failure run: exit 1 - rstar: + rstar: name: rstar runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[skip ci]')" From ceaed5f4fdf2239c7772a1a5dc6858079521d6fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:14:22 +0000 Subject: [PATCH 03/11] Update CI images in use --- .github/workflows/test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0dc6fd8..1e48e7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,11 +48,14 @@ 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.65" + - "georust/geo-ci:proj-9.2.1-rust-1.65" # Two most recent releases - we omit older ones for expedient CI - - "georust/geo-ci:rust-1.71" - - "georust/geo-ci:rust-1.72" + - "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: From 337fcc43c15df23af7954010ed9e35c304a7ec1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:16:21 +0000 Subject: [PATCH 04/11] Remove bors config --- bors.toml | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 bors.toml 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", -] From a4ebb83720695ff81dc2ac3b57b0321e5d2c3644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:28:56 +0000 Subject: [PATCH 05/11] Update rstar changelog --- rstar/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/rstar/CHANGELOG.md b/rstar/CHANGELOG.md index 47bd9b4..1f148ef 100644 --- a/rstar/CHANGELOG.md +++ b/rstar/CHANGELOG.md @@ -7,6 +7,7 @@ ## Changed - Fixed a stack overflow error in `DrainIterator::next` - Clarified that the distance measure in `distance_2` is not restricted to euclidean distance +- Updated CI to be compatible with the merge queue and to run for new PRs # 0.11.0 From a04199662255dfc20ca68341b97488854a54fd0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:35:09 +0000 Subject: [PATCH 06/11] More CI fiddling --- .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e48e7c..652453d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,3 +1,5 @@ +name: Run tests + on: push: branches: @@ -8,7 +10,13 @@ on: pull_request: merge_group: -name: Run tests +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + jobs: # The `ci-success` job doesn't actually test anything - it just aggregates the # overall build status, otherwise the merge queue would need an entry @@ -60,7 +68,7 @@ jobs: 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 @@ -71,7 +79,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: @@ -88,10 +96,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) }} From eac5c3e1670a086f5da849ea19d9abff61556ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:36:36 +0000 Subject: [PATCH 07/11] Remove changelog mod for now --- rstar/CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/rstar/CHANGELOG.md b/rstar/CHANGELOG.md index 1f148ef..47bd9b4 100644 --- a/rstar/CHANGELOG.md +++ b/rstar/CHANGELOG.md @@ -7,7 +7,6 @@ ## Changed - Fixed a stack overflow error in `DrainIterator::next` - Clarified that the distance measure in `distance_2` is not restricted to euclidean distance -- Updated CI to be compatible with the merge queue and to run for new PRs # 0.11.0 From dcf6bdb7c996351a82cefe2c8613e19f55c0ccc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:39:50 +0000 Subject: [PATCH 08/11] Ensure we run on correct branches --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 652453d..4886f14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,7 @@ name: Run tests on: push: branches: + - master - main - staging - trying From 30e9854884a9d0c4cd0044d7381167aa9821e3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:41:31 +0000 Subject: [PATCH 09/11] Use PyO3-inspired CI job setup --- .github/workflows/test.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4886f14..70e0c3c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,34 +19,6 @@ env: CARGO_TERM_COLOR: always jobs: - # The `ci-success` job doesn't actually test anything - it just aggregates the - # overall build status, otherwise the merge queue would need an entry - # for each individual job produced by the job-matrix. - # - # ALL THE SUBSEQUENT JOBS NEED THEIR `name` ADDED TO THE `needs` SECTION OF both "ci result" JOBS! - ci-success: - name: ci result - runs-on: ubuntu-latest - needs: - - rstar - - check - - no_std - if: success() - steps: - - name: Mark the job as a success - run: exit 0 - ci-failure: - name: ci result - runs-on: ubuntu-latest - needs: - - rstar - - check - - no_std - if: failure() - steps: - - name: Mark the job as a failure - run: exit 1 - rstar: name: rstar runs-on: ubuntu-latest From 8c7abcc7635d639d5826b8de1948d95bc9ef85f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:47:05 +0000 Subject: [PATCH 10/11] Update changelog --- rstar/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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 From 05ff36f38832d89beedad581b4c85de8cd15fe21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Wed, 20 Dec 2023 13:50:06 +0000 Subject: [PATCH 11/11] Ensure that we test against crate MSRV --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70e0c3c..5bea668 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: # giving us about 6 months of coverage. # # Minimum supported rust version (MSRV) - - "georust/geo-ci:proj-9.2.1-rust-1.65" + - "georust/geo-ci:rust-1.63" # Two most recent releases - we omit older ones for expedient CI - "georust/geo-ci:proj-9.2.1-rust-1.71" - "georust/geo-ci:proj-9.2.1-rust-1.72"