Skip to content

Commit eedc8ef

Browse files
SiegeLordExSiegeLord
authored andcommitted
Add github CI action.
1 parent 2fd7bec commit eedc8ef

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Tests
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
name: Ubuntu tests
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v1
11+
with:
12+
fetch-depth: 1
13+
- name: Setup
14+
run: |
15+
sudo apt-get update
16+
sudo apt-get install -y xvfb libvorbis-dev libtheora-dev libwebp-dev libphysfs-dev libopusfile-dev libdumb1-dev libflac-dev libpulse-dev libgtk2.0-dev pandoc libcurl4-nss-dev libenet-dev pulseaudio libasound2-dev libopenal-dev libgl1-mesa-dev libglu-dev;
17+
mkdir build
18+
cd build
19+
. ../tests/grab_bitmap_suites.sh
20+
- name: Configure
21+
run: |
22+
cd build
23+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DWANT_SHADERS_GL=on -DWANT_CURL_EXAMPLE=on
24+
- name: Build
25+
run: |
26+
cd build
27+
make -j2
28+
- name: Run test_driver
29+
run: |
30+
cd build
31+
find ../tests -name '*.ini' | grep -v 'compressed' | xargs xvfb-run tests/test_driver --save_on_failure --xvfb | tee /tmp/test_out || true
32+
mkdir -p test_outputs
33+
mv *.png test_outputs
34+
grep -q 'failed tests: 0' /tmp/test_out
35+
- name: Upload artifacts
36+
if: failure()
37+
uses: actions/upload-artifact@v1
38+
with:
39+
name: bitmaps
40+
path: build/test_outputs
41+
- name: Run install_test
42+
run: |
43+
cd build
44+
sudo make install
45+
sudo ldconfig
46+
gcc ../misc/install_test.c -o install_test $(pkg-config --cflags --libs allegro_image-debug-5 allegro_ttf-debug-5 allegro_acodec-debug-5 allegro_dialog-debug-5 allegro_primitives-debug-5 allegro_video-debug-5)
47+
pulseaudio -D
48+
xvfb-run ./install_test

0 commit comments

Comments
 (0)