-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (48 loc) · 1.27 KB
/
ci.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
name: CI
on:
push:
pull_request:
branches: [master]
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-22.04
- ubuntu-20.04
- macos-latest
- macos-12
- macos-11
# - windows-latest
runs-on: ${{matrix.os}}
env:
SHARDS_OPTS: --ignore-crystal-version
steps:
- name: Download source
uses: actions/checkout@v4
- name: Install Crystal
uses: oprypin/install-crystal@v1
- name: Install SDL2
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt-get -y install libsdl2-dev
- name: Install SDL2
if: runner.os == 'macOS'
run: brew install sdl2
- name: Install SDL2
if: runner.os == 'Windows'
run: |
iwr https://www.libsdl.org/release/SDL2-devel-2.0.10-VC.zip -OutFile sdl2.zip
7z x sdl2.zip
mv SDL2-* sdl2
echo "INCLUDE=$(pwd)\sdl2\include:${env:INCLUDE}" >>${env:GITHUB_ENV}
echo "LIB=$(pwd)\sdl2\lib\x64:${env:LIB}" >>${env:GITHUB_ENV}
- name: Install shards
run: shards install
- name: Build
run: shards build
# - name: Run tests
# run: crystal spec