Add CI using GitHub Actions (#1) -- Thanks oprypin!

* Crystal 0.36 compatibility

* Add CI using GitHub Actions

Co-authored-by: Matthew Berry <me@mattrb.com>
This commit is contained in:
Oleh Prypin 2021-01-28 04:43:23 +01:00 committed by GitHub
parent 81711e2d20
commit 5245abcbf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 7 deletions

47
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,47 @@
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

View file

@ -1,6 +0,0 @@
language: crystal
# Uncomment the following if you'd like Travis to run specs and check code formatting
# script:
# - crystal spec
# - crystal tool format --check

View file

@ -15,7 +15,7 @@ dependencies:
github: mattrberry/bitfield
version: 0.1.3
sdl:
git: git@github.com:ysbaddaden/sdl.cr.git
github: ysbaddaden/sdl.cr
lib_gl:
github: nulldotpro/LibGL