Skip to content

Commit 54e7c94

Browse files
authored
1.19 prep (#741)
* Fixes to concept tree * Crystal 1.19 prep * Use new git checkout * Add support for testing parallism * Update to use the latest windows version for testing * Fix to use the correct version in readme
1 parent 52708f5 commit 54e7c94

4 files changed

Lines changed: 24 additions & 13 deletions

File tree

.github/workflows/doc-generator.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install Crystal
1515
uses: crystal-lang/install-crystal@56684e85b94c6340f5035965d57dcfdedd1ab0de
1616
with:
17-
crystal: "1.15.1"
17+
crystal: "1.19.1"
1818
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1919
- name: Run generator tests
2020
run: crystal spec ./document-generator/spec/*
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install Crystal
2727
uses: crystal-lang/install-crystal@56684e85b94c6340f5035965d57dcfdedd1ab0de
2828
with:
29-
crystal: "1.15.1"
29+
crystal: "1.19.1"
3030
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
3131
- name: Run generator tests
3232
run: crystal document-generator/scripts/check_docs.cr

.github/workflows/tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Test Generator
1414
runs-on: ubuntu-24.04
1515
container:
16-
image: crystallang/crystal:1.17
16+
image: crystallang/crystal:1.19.1
1717
steps:
1818
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
1919
- name: Run generator tests
@@ -22,7 +22,7 @@ jobs:
2222
name: Check Generator Templates
2323
runs-on: ubuntu-24.04
2424
container:
25-
image: crystallang/crystal:1.17
25+
image: crystallang/crystal:1.19.1
2626
steps:
2727
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
2828
- name: Check generator templates tests
@@ -31,7 +31,7 @@ jobs:
3131
name: Check file formatting
3232
runs-on: ubuntu-24.04
3333
container:
34-
image: crystallang/crystal:1.17
34+
image: crystallang/crystal:1.19.1
3535
steps:
3636
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
3737
- name: Run file formatting
@@ -42,7 +42,7 @@ jobs:
4242
strategy:
4343
# Allows running the job multiple times with different configurations
4444
matrix:
45-
crystal: ["1.11", "1.12", "1.13", "1.14", "1.15.1"]
45+
crystal: ["1.15", "1.16", "1.17", "1.18", "1.19.1"]
4646
container:
4747
image: crystallang/crystal:${{ matrix.crystal }}
4848
steps:
@@ -53,12 +53,12 @@ jobs:
5353
run: ./bin/test-exercises.sh
5454
exercises-windows:
5555
name: Check exercises Crystal on Windows
56-
runs-on: windows-2022
56+
runs-on: windows-2025
5757
steps:
5858
- name: Install Crystal
5959
uses: crystal-lang/install-crystal@56684e85b94c6340f5035965d57dcfdedd1ab0de
6060
with:
61-
crystal: "1.15.1"
61+
crystal: "1.19.1"
6262
- name: 'Setup jq'
6363
run: choco install jq
6464
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<p vertical-align="middle"><h1>Exercism Crystal Track</h1></p>
55

66
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[![Discourse topics](https://img.shields.io/discourse/topics?color=8A08E6&label=Connect%20&labelColor=FFDF58&logo=Discourse&logoColor=8A08E6&server=https%3A%2F%2Fforum.exercism.org&style=social)](https://forum.exercism.org)
7-
&nbsp;[![Exercism_II](https://img.shields.io/badge/Exercism--Built-9101FF?logo=crystal&logoColor=000000&labelColor=E5E5E5&label=Crystal%201.15.1%20Powered)](https://exercism.org)
7+
&nbsp;[![Exercism_II](https://img.shields.io/badge/Exercism--Built-9101FF?logo=crystal&logoColor=000000&labelColor=E5E5E5&label=Crystal%201.19.1%20Powered)](https://exercism.org)
88
&nbsp;[![Exercism_III](https://img.shields.io/badge/Open-11b30e?labelColor=3D454D&label=Contributions)](https://exercism.org/blog/freeing-our-maintainers) &nbsp;[![Build Status](https://github.com/exercism/crystal/workflows/Tests/badge.svg)](https://github.com/exercism/crystal/actions/workflows/tests.yml)
99

1010
<br>
@@ -16,7 +16,7 @@ Hi. &nbsp;👋🏽 &nbsp;👋 &nbsp;**We are happy you are here.**&nbsp; 🎉&nb
1616
**`exercism/Crystal`** is one of many programming language tracks on [exercism(dot)org][exercism-website].
1717
This repo holds all the instructions, tests, code, & support files for Crystal _exercises_ currently under development or implemented & available for students.
1818

19-
🌟 &nbsp;&nbsp;Track tooling (_test-runner, representer, analyzer, and Continuous Integration_) runs on Crystal `1.15.1`. <br>
19+
🌟 &nbsp;&nbsp;Track tooling (_test-runner, representer, analyzer, and Continuous Integration_) runs on Crystal `1.19.1`. <br>
2020
🌟 &nbsp;&nbsp;Most exercises are solvable with Crystal `1.0.0` or higher.
2121

2222
This track is made up of **Practice Exercises**. Practice exercises are open-ended, and can be used to practice concepts learned, try out new techniques, and play.
@@ -64,7 +64,7 @@ Please keep in mind [Chesterton's Fence][chestertons-fence].
6464

6565
## Crystal Software and Documentation
6666

67-
**Copyright © 2012-2024 Manas Technology Solutions. All rights reserved.**
67+
**Copyright © 2012-2026 Manas Technology Solutions. All rights reserved.**
6868

6969
Crystal software and documentation are licensed under the [Apache License v2.0][crystal-license].
7070

bin/test-exercises.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,22 @@ test_run() {
1010
spec_file="$1/$(jq -r '.files.test[0]' $1/.meta/config.json)"
1111
cat "${spec_file}" > "${dic}/spec/spec.cr"
1212
sed -i -e 's/pending/it/g' ${dic}/spec/spec.cr
13-
crystal spec ${dic}/spec/spec.cr || exit 1
13+
crystal spec ${dic}/spec/spec.cr $3 || exit 1
14+
}
15+
16+
crystal_version_at_least() {
17+
required_version="$1"
18+
current_version="$(crystal -v | head -n1 | awk '{print $2}' | sed 's/[^0-9.].*$//')"
19+
20+
[ "$(printf '%s\n%s\n' "${required_version}" "${current_version}" | sort -V | head -n1)" = "${required_version}" ]
1421
}
1522

1623
for exercise in ./exercises/practice/*; do
17-
test_run ${exercise} "example"
24+
if [ "$(basename "${exercise}")" != "parallel-letter-frequency" ]; then
25+
test_run ${exercise} "example"
26+
elif crystal_version_at_least "1.19.0"; then
27+
test_run ${exercise} "example" "-D preview_mt"
28+
fi
1829
done
1930

2031
if [ -d "./exercises/concept" ]; then

0 commit comments

Comments
 (0)