-
Notifications
You must be signed in to change notification settings - Fork 13
54 lines (41 loc) · 1.75 KB
/
build-and-test.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
46
47
48
49
50
51
52
53
name: Build and Test chiventure
on: [push]
jobs:
build-and-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt update
sudo apt install pkg-config cmake libjson-c4 libjson-c-dev libzip5 libzip-dev libncurses-dev liblua5.3-0 liblua5.3-dev libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-gfx-dev
- uses: actions/cache@v2
id: cache
with:
path: |
criterion-dev_2.3.2-6-ubuntu1~bionic1_amd64.deb
criterion_2.3.2-6-ubuntu1~bionic1_amd64.deb
raylib-3.0.0-Linux-amd64.tar.gz
key: ${{ runner.os }}-chiventure-dependencies
- name: Download Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
wget https://launchpad.net/~snaipewastaken/+archive/ubuntu/ppa/+files/criterion-dev_2.3.2-6-ubuntu1~bionic1_amd64.deb
wget https://launchpad.net/~snaipewastaken/+archive/ubuntu/ppa/+files/criterion_2.3.2-6-ubuntu1~bionic1_amd64.deb
wget https://github.com/raysan5/raylib/releases/download/3.0.0/raylib-3.0.0-Linux-amd64.tar.gz
- name: Install Criterion
run: |
sudo dpkg -i criterion_2.3.2-6-ubuntu1~bionic1_amd64.deb criterion-dev_2.3.2-6-ubuntu1~bionic1_amd64.deb
- name: Install raylib
run: |
sudo tar xvzf raylib-3.0.0-Linux-amd64.tar.gz --strip-components=1 -C /usr/local/
- name: Build chiventure
run: |
cmake -B build/
make -C build/
- name: Build examples
working-directory: build/
run: make examples
- name: Run tests
working-directory: build/
run: ctest --extra-verbose