Skip to content

CI (release)

CI (release) #931

Workflow file for this run

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) }}