-
Notifications
You must be signed in to change notification settings - Fork 174
45 lines (35 loc) · 1.28 KB
/
ruby.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
name: Ruby
on:
push:
branches: [master]
pull_request:
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
ruby-version: ['2.6', '3.0']
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies (Ubuntu)
if: matrix.platform == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev libgl1-mesa-dev libopenal-dev libgmp-dev libfontconfig1-dev xvfb
- name: Install dependencies (macOS)
if: matrix.platform == 'macos-latest'
run: brew install sdl2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: false # runs 'bundle install' and caches installed gems automatically
- name: Install dependencies
run: gem install rake-compiler minitest --no-doc
- name: Install Ruby/Gosu
run: GOSU_RELEASE_VERSION=9.9.9 rake gem && gem install pkg/gosu-9.9.9.gem --no-doc
- name: Run tests (Linux)
if: matrix.platform == 'ubuntu-latest'
run: xvfb-run --auto-servernum rake -rgosu test
- name: Run tests (macOS)
if: matrix.platform == 'macos-latest'
run: rake -rgosu test