Skip to content

Update CI as a precursor to enabling merge queues #199

Update CI as a precursor to enabling merge queues

Update CI as a precursor to enabling merge queues #199

Workflow file for this run

on:
push:
branches:
- main
- staging
- trying
- release/**
pull_request:
merge_group:
name: Run tests
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
if: "!contains(github.event.head_commit.message, '[skip ci]')"
defaults:
run:
working-directory: rstar
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:proj-9.2.1-rust-1.65"
# 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"
container:
image: ${{ matrix.container_image }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- run: cargo install --version 1.6.0 cargo-all-features
- run: cargo build-all-features
- run: cargo test-all-features
- run: cargo build -p rstar-benches
check:
name: rstar Rustfmt and Clippy check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Check formatting using Rustfmt
run: cargo fmt --check
- name: Lint using Clippy
run: cargo clippy --tests
no_std:
name: rstar no_std test
runs-on: ubuntu-latest
env:
NO_STD_TARGET: aarch64-unknown-none
steps:
- name: Checkout repository
uses: actions/checkout@v3
- 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}}