mirror of
https://github.com/mattrberry/crab.git
synced 2024-12-28 09:58:49 +01:00
5245abcbf8
* Crystal 0.36 compatibility * Add CI using GitHub Actions Co-authored-by: Matthew Berry <me@mattrb.com>
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
# - windows-latest
|
|
runs-on: ${{matrix.os}}
|
|
env:
|
|
SHARDS_OPTS: --ignore-crystal-version
|
|
steps:
|
|
- name: Download source
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Crystal
|
|
uses: oprypin/install-crystal@v1
|
|
|
|
- name: Install SDL2
|
|
if: runner.os == 'Linux'
|
|
run: 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
|