Skip to content

Commit

Permalink
Switch to GHA / GHCR Docker images (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
urschrei committed Apr 4, 2024
1 parent 54e973c commit 341fbdd
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: proj ci

on:
push:
branches:
Expand All @@ -7,8 +9,25 @@ on:
pull_request:
merge_group:

name: proj ci
env:
LIBPROJ_VERSION: 9.4.0
RUST_MSRV: "1.70"
RUST_LATEST: "1.77"

jobs:
# work around GHA env strictness
compute:
runs-on: ubuntu-latest
outputs:
RUST_MSRV: ${{ env.RUST_MSRV }}
RUST_LATEST: ${{ env.RUST_LATEST }}
LIBPROJ_VERSION: ${{ env.LIBPROJ_VERSION }}
steps:
- name: Compute outputs
run: |
echo "RUST_MSRV=${{ env.RUST_MSRV }}" >> $GITHUB_OUTPUT
echo "RUST_LATEST=${{ env.RUST_LATEST }}" >> $GITHUB_OUTPUT
echo "LIBPROJ_VERSION=${{ env.LIBPROJ_VERSION }}" >> $GITHUB_OUTPUT
# The `ci-result` 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.
Expand Down Expand Up @@ -46,14 +65,15 @@ jobs:
name: proj ubuntu
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
needs: compute
strategy:
fail-fast: false
matrix:
container_image:
# Minimum supported rust (MSRV)
- "georust/proj-ci:proj-9.4.0-rust-1.70"
- ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_MSRV }}
# Latest stable rust
- "georust/proj-ci:proj-9.4.0-rust-1.75"
- ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_LATEST }}
features:
- ""
- "--features network"
Expand Down Expand Up @@ -89,6 +109,7 @@ jobs:
name: proj-sys ubuntu
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
needs: compute
defaults:
run:
working-directory: proj-sys
Expand All @@ -98,34 +119,34 @@ jobs:
include:
# Minimum supported rust (MSRV)
- container:
image: georust/proj-ci:proj-9.4.0-rust-1.70
image: ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_MSRV }}
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 0
features: ""
- container:
image: georust/proj-ci:proj-9.4.0-rust-1.70
image: ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_MSRV }}
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
features: "--features bundled_proj"
- container:
image: georust/proj-ci-without-system-proj:proj-9.4.0-rust-1.70
image: ghcr.io/georust/proj-ci-without-system-proj:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_MSRV }}
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
features: ""

# Latest stable rust
- container:
image: georust/proj-ci:proj-9.4.0-rust-1.75
image: ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_LATEST }}
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 0
features: ""
- container:
image: georust/proj-ci:proj-9.4.0-rust-1.75
image: ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_LATEST }}
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
features: "--features bundled_proj"
- container:
image: georust/proj-ci-without-system-proj:proj-9.4.0-rust-1.75
image: ghcr.io/georust/proj-ci-without-system-proj:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_LATEST }}
env:
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
features: ""
Expand Down

0 comments on commit 341fbdd

Please sign in to comment.