Skip to content

Commit 6d60a52

Browse files
added glad as dependency, compiling sdl3 in ci/cd
1 parent aff4c87 commit 6d60a52

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

.github/workflows/c-cpp.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ jobs:
2020
- name: install dependencies
2121
run: |
2222
sudo apt update
23-
sudo apt install gcc-10 g++-10 git cmake python3-pip libsdl2-dev libglm-dev
23+
sudo apt install cmake xorg-dev
24+
git clone https://github.com/libsdl-org/SDL
25+
cd SDL
26+
mkdir build && cd build
27+
cmake .. -DCMAKE_BUILD_TYPE=Release
28+
cmake --build .
29+
sudo cmake --install .
30+
sudo apt install python3-glad libglm-dev
2431
2532
- name: Setup OpenGL
2633
run: |
@@ -36,9 +43,9 @@ jobs:
3643

3744
- name: Run Tests
3845
run: |
39-
/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
46+
/sbin/start-stop-daemon --start --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 1 800x600x24 -ac +extension GLX
4047
export SDL_VIDEODRIVER=x11
41-
export DISPLAY=:99.0
48+
export DISPLAY=:99.1
4249
ctest --test-dir build -C Debug --output-on-failure
4350
4451
# build-relese:

cmake/PKGBUILD-Archlinux.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pkgrel=1
66
pkgdesc="@PROJECT_DESCRIPTION@"
77
arch=('x86_64' 'i686')
88
license=('MIT')
9-
depends=()
9+
depends=("glad")
1010
makedepends=("cmake")
1111
source=()
1212
md5sums=()

cmake/PKGBUILD-MSYS2.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ pkgrel=1
88
pkgdesc="@PROJECT_DESCRIPTION@"
99
arch=('x86_64' 'i686')
1010
license=('MIT')
11-
depends=()
11+
depends=(
12+
"${MINGW_PACKAGE_PREFIX}-python-glad"
13+
)
1214
makedepends=(
1315
"${MINGW_PACKAGE_PREFIX}-cmake"
1416
)

test/triangle.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include "GLider/GLider.hpp"
77
#include "util.hpp"
88

9+
#include <SDL3/SDL_main.h>
10+
911
//! [Shader Sources]
1012

1113
const char* vertexShader = R"CODE(

test/util.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class SDL{
5555
};
5656

5757
class OpenGLWindow : Window{
58-
protected:
58+
protected:
5959
Renderer renderer;
6060
OpenGLContext glContext;
6161
public:

0 commit comments

Comments
 (0)