-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebcf0c2
commit 79f3b24
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build and Test Umgebung | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Dependencies via APT | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get upgrade -y | ||
sudo apt-get install git clang mesa-utils xvfb pulseaudio \ | ||
cmake pkg-config libsdl2-dev libftgl-dev libglew-dev ffmpeg \ | ||
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev \ | ||
libavdevice-dev librtmidi-dev -y | ||
- name: Start Xvfb | ||
run: | | ||
Xvfb :99 -screen 0 1024x768x24 & # Start virtual framebuffer | ||
export DISPLAY=:99 # Set display to the virtual framebuffer | ||
- name: Configure Dummy Audio for SDL2 | ||
run: | | ||
export SDL_AUDIODRIVER=dummy # Set SDL2 audio driver to dummy to avoid real hardware issues | ||
- name: Configure CMake | ||
run: cmake -B build -DBUILD_TESTING=ON -DSET_COMPILER_FLAGS=ON | ||
|
||
- name: Build Project | ||
run: cmake --build build | ||
|
||
- name: Run Tests with Xvfb | ||
run: | | ||
export DISPLAY=:99 # Ensure tests run with virtual framebuffer | ||
export SDL_AUDIODRIVER=dummy # Use dummy audio for SDL2 | ||
ctest --test-dir build --rerun-failed --output-on-failure # Run tests and display failure logs |