Skip to content

Commit f44b165

Browse files
CI: Refactor matrix configuration in Linux workflow (#16331)
1 parent 7339fe8 commit f44b165

File tree

3 files changed

+28
-17
lines changed

3 files changed

+28
-17
lines changed

.github/workflows/forward-compatibility.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,35 @@ jobs:
2929
env:
3030
ARCH: x86_64
3131
ARCH_CMD: linux64
32-
DOCKER_TEST_PREFIX: crystallang/crystal:${{ matrix.crystal_bootstrap_version }}
32+
CRYSTAL_BOOTSTRAP_VERSION: ${{ matrix.crystal_bootstrap_version }}
3333
runs-on: ubuntu-latest
3434
strategy:
3535
fail-fast: false
3636
matrix:
3737
crystal_bootstrap_version: [1.7.3, 1.8.2, 1.9.2, 1.10.1, 1.11.2, 1.12.2, 1.13.3, 1.14.1, 1.15.1, 1.16.3, 1.17.1]
38-
flags: [""]
38+
env: [{}]
3939
include:
4040
# libffi is only available starting from the 1.2.2 build images
41+
# pcre2 is only available starting from the 1.7.0 build images
4142
- crystal_bootstrap_version: 1.1.1
42-
flags: "FLAGS=-Dwithout_ffi USE_PCRE1=true"
43+
env:
44+
FLAGS: -Dwithout_ffi
45+
USE_PCRE1: true
4346
- crystal_bootstrap_version: 1.2.2
44-
flags: "USE_PCRE1=true"
47+
env:
48+
USE_PCRE1: true
4549
- crystal_bootstrap_version: 1.3.2
46-
flags: "USE_PCRE1=true"
50+
env:
51+
USE_PCRE1: true
4752
- crystal_bootstrap_version: 1.4.1
48-
flags: "USE_PCRE1=true"
53+
env:
54+
USE_PCRE1: true
4955
- crystal_bootstrap_version: 1.5.1
50-
flags: "USE_PCRE1=true"
56+
env:
57+
USE_PCRE1: true
5158
- crystal_bootstrap_version: 1.6.2
52-
flags: "USE_PCRE1=true"
59+
env:
60+
USE_PCRE1: true
5361
steps:
5462
- name: Download Crystal source
5563
uses: actions/checkout@v5
@@ -63,4 +71,5 @@ jobs:
6371
run: bin/ci prepare_build
6472

6573
- name: Test
66-
run: ${{ matrix.flags }} bin/ci build
74+
run: bin/ci build
75+
env: ${{ matrix.env }}

.github/workflows/linux.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,18 @@ jobs:
2121
env:
2222
ARCH: x86_64
2323
ARCH_CMD: linux64
24-
DOCKER_TEST_PREFIX: crystallang/crystal:${{ matrix.crystal_bootstrap_version }}
2524
runs-on: ubuntu-latest
2625
strategy:
2726
fail-fast: false
2827
matrix:
29-
flags: [""]
28+
env: [{}]
3029
include:
31-
# libffi is only available starting from the 1.2.2 build images
32-
- crystal_bootstrap_version: 1.0.0
33-
flags: "FLAGS=-Dwithout_ffi USE_PCRE1=true"
34-
- crystal_bootstrap_version: 1.18.2 # LATEST RELEASE
30+
- env:
31+
CRYSTAL_BOOTSTRAP_VERSION: 1.0.0
32+
# libffi is only available starting from the 1.2.2 build images
33+
FLAGS: "-Dwithout_ffi"
34+
# pcre2 is only available starting from the 1.7.0 build images
35+
USE_PCRE1: true
3536
steps:
3637
- name: Download Crystal source
3738
uses: actions/checkout@v5
@@ -45,7 +46,8 @@ jobs:
4546
run: bin/ci prepare_build
4647

4748
- name: Test
48-
run: ${{ matrix.flags }} bin/ci build
49+
run: bin/ci build
50+
env: ${{ matrix.env }}
4951

5052
x86_64-musl-test:
5153
env:

bin/ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ with_build_env() {
189189

190190
on_linux verify_linux_environment
191191

192-
export DOCKER_TEST_PREFIX="${DOCKER_TEST_PREFIX:=crystallang/crystal:1.18.2}"
192+
export DOCKER_TEST_PREFIX="${DOCKER_TEST_PREFIX:="crystallang/crystal:${CRYSTAL_BOOTSTRAP_VERSION:-1.18.2}"}"
193193

194194
case $ARCH in
195195
x86_64)

0 commit comments

Comments
 (0)