-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (68 loc) · 2.61 KB
/
run-tests.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
70
71
72
73
74
75
76
77
78
79
80
81
82
name: jGL run tests
on:
pull_request:
workflow_dispatch:
jobs:
linuxRunTest:
runs-on: ubuntu-22.04
strategy:
matrix:
example: [Particles, Sprite, Shape]
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential xorg-dev mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev libxinerama-dev libxcursor-dev xvfb x11-apps vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools
- name: linux-linux
run: |
./build.sh -t -r -e
- name: run ${{ matrix.example }}
run: |
cd build/Examples/${{ matrix.example }}
chmod +x ${{ matrix.example }}
export DISPLAY=:99
sudo Xvfb :99 -screen 0 800x600x24 &
sleep 5
MESA_GL_VERSION_OVERRIDE=3.3 ./${{ matrix.example }} &
export PID=$!
sleep 10
xwd -root -silent | convert xwd:- png:screenshot.png
sleep 5 && kill $PID
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.example }}.png
path: build/Examples/${{ matrix.example }}/screenshot.png
wineRunTest:
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-22.04
strategy:
matrix:
example: [Particles, Sprite, Shape]
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev xvfb x11-apps vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools wine64
- name: linux-windows
run: |
./build.sh -t -r -w -e
- name: run ${{ matrix.example }}
run: |
cd build/Examples/${{ matrix.example }}
chmod +x ${{ matrix.example }}.exe
export DISPLAY=:99
sudo Xvfb :99 -screen 0 800x600x24 &
sleep 5
MESA_GL_VERSION_OVERRIDE=3.3 wine64 ${{ matrix.example }}.exe &
export PID=$!
sleep 10
xwd -root -silent | convert xwd:- png:screenshot.png
sleep 5 && kill $PID
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.example }}-wine.png
path: build/Examples/${{ matrix.example }}/screenshot.png