Skip to content

Commit 09ebb01

Browse files
[CI] Test compiler backwards compatibility
1 parent 20f97ec commit 09ebb01

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

.github/workflows/forward-compatibility.yml

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Forward Compatibility
1+
name: Compiler Compatibility
22

33
on:
44
push:
@@ -62,3 +62,59 @@ jobs:
6262

6363
- name: Test
6464
run: ${{ matrix.flags }} bin/ci build
65+
66+
# Test against *each* supported Crystal version for backward compatibility.
67+
#
68+
# This workflow runs on a nightly schedule on `master`.
69+
# It can also be dispatched manually when necessary.
70+
#
71+
# We run a basic version of this test on every commit which covers only the earliest and latest supported versions in `linux.yml#x86_64-gnu-test`.
72+
x86_64-gnu-test-backward_compatibility:
73+
env:
74+
ARCH: x86_64
75+
ARCH_CMD: linux64
76+
runs-on: ubuntu-latest
77+
strategy:
78+
fail-fast: false
79+
matrix:
80+
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.2]
81+
flags: [""]
82+
include:
83+
# libffi is only available starting from the 1.2.2 build images
84+
- crystal_bootstrap_version: 1.1.1
85+
flags: "FLAGS=-Dwithout_ffi USE_PCRE1=true"
86+
- crystal_bootstrap_version: 1.2.2
87+
flags: "USE_PCRE1=true"
88+
- crystal_bootstrap_version: 1.3.2
89+
flags: "USE_PCRE1=true"
90+
- crystal_bootstrap_version: 1.4.1
91+
flags: "USE_PCRE1=true"
92+
- crystal_bootstrap_version: 1.5.1
93+
flags: "USE_PCRE1=true"
94+
- crystal_bootstrap_version: 1.6.2
95+
flags: "USE_PCRE1=true"
96+
steps:
97+
- name: Download Crystal source
98+
uses: actions/checkout@v4
99+
100+
- name: Prepare System
101+
run: bin/ci prepare_system
102+
103+
- name: Prepare Build
104+
run: bin/ci prepare_build
105+
106+
- name: Build current compiler
107+
run: ${{ matrix.flags }} bin/ci with_build_env 'make crystal'
108+
env:
109+
DOCKER_TEST_PREFIX: crystallang/crystal:1.16.2
110+
111+
- name: Checkout Crystal stdlib ${{ matrix.crystal_bootstrap_version }}
112+
uses: actions/[email protected]
113+
with:
114+
ref: "${{ matrix.crystal_bootstrap_version }}"
115+
116+
- name: Run specs
117+
run: bin/ci with_build_env 'make std_spec compiler_spec samples'
118+
119+
- name: Build compiler
120+
run: bin/ci with_build_env 'make crystal'

0 commit comments

Comments
 (0)