Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisppaul committed Sep 25, 2024
1 parent ebcf0c2 commit 79f3b24
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/cmake-single-platform.yml
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

0 comments on commit 79f3b24

Please sign in to comment.