Skip to content

Commit 1264529

Browse files
committed
Switch to GHA / GHCR Docker images (georust#198)
1 parent 7c49536 commit 1264529

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

.github/workflows/test.yml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: proj ci
2+
13
on:
24
push:
35
branches:
@@ -7,8 +9,25 @@ on:
79
pull_request:
810
merge_group:
911

10-
name: proj ci
12+
env:
13+
LIBPROJ_VERSION: 9.4.0
14+
RUST_MSRV: "1.70"
15+
RUST_LATEST: "1.77"
16+
1117
jobs:
18+
# work around GHA env strictness
19+
compute:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
RUST_MSRV: ${{ env.RUST_MSRV }}
23+
RUST_LATEST: ${{ env.RUST_LATEST }}
24+
LIBPROJ_VERSION: ${{ env.LIBPROJ_VERSION }}
25+
steps:
26+
- name: Compute outputs
27+
run: |
28+
echo "RUST_MSRV=${{ env.RUST_MSRV }}" >> $GITHUB_OUTPUT
29+
echo "RUST_LATEST=${{ env.RUST_LATEST }}" >> $GITHUB_OUTPUT
30+
echo "LIBPROJ_VERSION=${{ env.LIBPROJ_VERSION }}" >> $GITHUB_OUTPUT
1231
# The `ci-result` job doesn't actually test anything - it just aggregates the
1332
# overall build status, otherwise the merge queue would need an entry
1433
# for each individual job produced by the job-matrix.
@@ -46,14 +65,15 @@ jobs:
4665
name: proj ubuntu
4766
if: "!contains(github.event.head_commit.message, '[skip ci]')"
4867
runs-on: ubuntu-latest
68+
needs: compute
4969
strategy:
5070
fail-fast: false
5171
matrix:
5272
container_image:
5373
# Minimum supported rust (MSRV)
54-
- "georust/proj-ci:proj-9.4.0-rust-1.70"
74+
- ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_MSRV }}
5575
# Latest stable rust
56-
- "georust/proj-ci:proj-9.4.0-rust-1.75"
76+
- ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_LATEST }}
5777
features:
5878
- ""
5979
- "--features network"
@@ -89,6 +109,7 @@ jobs:
89109
name: proj-sys ubuntu
90110
if: "!contains(github.event.head_commit.message, '[skip ci]')"
91111
runs-on: ubuntu-latest
112+
needs: compute
92113
defaults:
93114
run:
94115
working-directory: proj-sys
@@ -98,34 +119,34 @@ jobs:
98119
include:
99120
# Minimum supported rust (MSRV)
100121
- container:
101-
image: georust/proj-ci:proj-9.4.0-rust-1.70
122+
image: ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_MSRV }}
102123
env:
103124
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 0
104125
features: ""
105126
- container:
106-
image: georust/proj-ci:proj-9.4.0-rust-1.70
127+
image: ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_MSRV }}
107128
env:
108129
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
109130
features: "--features bundled_proj"
110131
- container:
111-
image: georust/proj-ci-without-system-proj:proj-9.4.0-rust-1.70
132+
image: ghcr.io/georust/proj-ci-without-system-proj:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_MSRV }}
112133
env:
113134
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
114135
features: ""
115136

116137
# Latest stable rust
117138
- container:
118-
image: georust/proj-ci:proj-9.4.0-rust-1.75
139+
image: ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_LATEST }}
119140
env:
120141
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 0
121142
features: ""
122143
- container:
123-
image: georust/proj-ci:proj-9.4.0-rust-1.75
144+
image: ghcr.io/georust/proj-ci:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_LATEST }}
124145
env:
125146
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
126147
features: "--features bundled_proj"
127148
- container:
128-
image: georust/proj-ci-without-system-proj:proj-9.4.0-rust-1.75
149+
image: ghcr.io/georust/proj-ci-without-system-proj:proj-${{ needs.compute.outputs.LIBPROJ_VERSION }}-rust-${{ needs.compute.outputs.RUST_LATEST }}
129150
env:
130151
_PROJ_SYS_TEST_EXPECT_BUILD_FROM_SRC: 1
131152
features: ""

0 commit comments

Comments
 (0)