mirror of
https://github.com/mattrberry/crab.git
synced 2024-12-27 09:58:55 +01:00
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:
parent
81711e2d20
commit
5245abcbf8
3 changed files with 48 additions and 7 deletions
47
.github/workflows/ci.yml
vendored
Normal file
47
.github/workflows/ci.yml
vendored
Normal 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
|
|
@ -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
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue