-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (50 loc) · 1.79 KB
/
c-cpp.yml
File metadata and controls
70 lines (50 loc) · 1.79 KB
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: C/C++ CI
on:
push:
branches:
- main
- dev
jobs:
build-debug:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt update
sudo apt install gcc-10 g++-10 git cmake python3-pip libsdl2-dev libglm-dev
- name: Setup OpenGL
run: |
sudo apt install mesa-utils linux-generic xserver-xorg-core xserver-xorg xserver-xorg-video-all xserver-xorg-input-all libwayland-egl1-mesa
- name: CMake Configure
run: |
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/test_install -DBUILD_GLIDER_TESTS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-10
- name: Build
run: cmake --build build --verbose
- name: Run Tests
run: |
/sbin/start-stop-daemon --start --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 800x600x24 -ac +extension GLX
export SDL_VIDEODRIVER=x11
export DISPLAY=:99.0
ctest --test-dir build -C Debug --output-on-failure
# build-relese:
# runs-on: ubuntu-latest
# needs: build-debug
# steps:
# - name: Reconfigure CMake
# run: |
# rm -rf *
# rm -rf .*
# cmake ..
# - name: Build
# run: cmake --build . --verbose
# - name: Install
# run: |
# cmake --install . --prefix "$HOME/GLider/usr"
# cp -r ../debian/. ~/GLider/DEBIAN/
# - name: Create Debian Package
# run: |
# cd ~
# dpkg-deb --build GLider