forked from EasyRPG/Player
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 1.95 KB
/
stable-compilation.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Stable Compilation
on:
push:
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
docker:
name: ${{ matrix.image }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
image:
- ubuntu:18.04 # CMake 3.10.2 - g++ 7.4.0 - LTS
- debian:10 # CMake 3.13.4 - g++ 8.3.0 - old
- ubuntu:20.04 # CMake 3.16.3 - g++ 9.3.0 - LTS
- ubuntu:21.04 # CMake 3.18.4 - g++ 10.3.0 - stable
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.8.0
- name: Checkout
uses: actions/checkout@v2
- name: Install ppa for new libfmt
if: matrix.image == 'ubuntu:18.04'
run: |
apt-get update
apt-get install -yqq software-properties-common
add-apt-repository ppa:team-xbmc/ppa
- name: Install dependencies
run: |
export DEBIAN_FRONTEND="noninteractive"
apt-get update
apt-get install -yqq --no-install-recommends --no-install-suggests \
ca-certificates build-essential cmake ninja-build git \
libicu-dev libexpat1-dev libsdl2-dev libpng-dev libpixman-1-dev \
libfmt-dev libfreetype6-dev libharfbuzz-dev libmpg123-dev \
libsndfile-dev libvorbis-dev libopusfile-dev libspeexdsp-dev \
libdrm-dev libgbm-dev # only needed for sdl2 on ubuntu 21.04
- name: Compile
run: |
mkdir build
cd build
# cmake < 3.13 does not support '-B'
cmake -G Ninja .. \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
-DPLAYER_BUILD_LIBLCF=ON
cmake --build .
- name: Install
run: |
# cmake < 3.16 does not support '--install'
cmake --build build --target install
- name: Test
run: cmake --build build --target check