-
Notifications
You must be signed in to change notification settings - Fork 8
80 lines (72 loc) · 2.37 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI (release)
on:
push:
branches: [v1]
schedule:
- cron: '0 6 * * *'
jobs:
try:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest # arm64
- macos-13 # x64
- windows-latest
config:
- {}
- {shards: false}
- {shards: true}
- {shards: '0.14', crystal: '1.3'}
- {shards: latest, crystal: latest}
- {shards: nightly, crystal: nightly}
- {crystal: 'branch:master'}
name: crystal ${{ matrix.config.crystal }} + shards ${{ matrix.config.shards }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: crystal-lang/install-crystal@v1
with: ${{ matrix.config }}
id: install
- run: |
echo 'crystal "${{ steps.install.outputs.crystal }}" | shards "${{ steps.install.outputs.shards }}"'
- run: |
crystal eval 'puts "test" + "ing"' | grep 'testing'
- run: |
'${{ steps.install.outputs.path }}/bin/crystal' --version
if: ${{ runner.os != 'Windows' }}
- run: |
ls '${{ steps.install.outputs.path }}/src/prelude.cr'
- run: |
v='${{ steps.install.outputs.crystal }}'
crystal --version | grep "${v:0:9}\\b"
if: ${{ runner.os != 'Windows' }}
- run: |
v='${{ matrix.config.crystal }}'
crystal --version | grep -E "${v}\\b"
if: ${{ contains(matrix.config.crystal, '.') && !contains(matrix.config.crystal, 'branch:') }}
- run: |
crystal spec .github/test/crystal-libs_spec.cr
- run: |
shards --version
if: ${{ !contains('false', matrix.config.shards) }}
- run: |
v='${{ steps.install.outputs.shards }}'
v="${v#v}"
shards --version | grep -E "${v:0:9}\\b"
if: ${{ !contains('true|false|nightly', matrix.config.shards) }}
- run: |
v='${{ matrix.config.shards }}'
shards --version | grep -E "${v}\\b"
if: ${{ contains(matrix.config.shards, '.') }}
- run: |
! shards --version
if: ${{ contains(matrix.config.shards, 'false') }}
- run: |
shards build
working-directory: test-project
if: ${{ !contains('false', matrix.config.shards) }}