mirror of
https://github.com/mattrberry/crab.git
synced 2025-01-13 20:01:38 +01:00
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
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
|