-
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (42 loc) · 1.31 KB
/
ci.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
name: test
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.os }} Crystal ${{ matrix.crystal }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ 'ubuntu', 'macos' ]
crystal: [ '1.2', '1.3' ]
steps:
- name: Download source
uses: actions/checkout@v3
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Install Ubuntu packages (ubuntu)
if: ${{ matrix.os == 'ubuntu' }}
run: |
: # Required before installing GR (2022-02-12)
sudo apt update -y
sudo apt upgrade -y
wget https://download.opensuse.org/repositories/science:/gr-framework/xUbuntu_20.04/amd64/gr_0.64.0-1_amd64.deb
sudo apt-get install -y ./gr_0.64.0-1_amd64.deb
- name: Set up Homebrew (macos)
if: ${{ matrix.os == 'macos' }}
run: |
brew update
brew install libgr
- run: shards install
- name: Run tests (ubuntu)
if: ${{ matrix.os == 'ubuntu' }}
env:
QT_QPA_PLATFORM: offscreen
GRDIR: /usr/gr
run: crystal spec
- name: Run tests (macos)
if: ${{ matrix.os == 'macos' }}
env:
QT_QPA_PLATFORM: offscreen
run: crystal spec