From 87f56370b9ef86d1498e77a4cd3f1cc45e9f41c3 Mon Sep 17 00:00:00 2001 From: dennisppaul Date: Wed, 25 Sep 2024 14:33:53 +0200 Subject: [PATCH] updated workflow --- .github/workflows/build-and-test-umgebung.yml | 20 ++++++-- .github/workflows/cmake-single-platform.yml | 48 ------------------- 2 files changed, 16 insertions(+), 52 deletions(-) delete mode 100644 .github/workflows/cmake-single-platform.yml diff --git a/.github/workflows/build-and-test-umgebung.yml b/.github/workflows/build-and-test-umgebung.yml index 4fa2a38..f0fe0d1 100644 --- a/.github/workflows/build-and-test-umgebung.yml +++ b/.github/workflows/build-and-test-umgebung.yml @@ -21,16 +21,28 @@ jobs: run: | sudo apt-get update -y sudo apt-get upgrade -y - sudo apt-get install git clang mesa-utils -y # Optional - sudo apt-get install cmake pkg-config libsdl2-dev libftgl-dev libglew-dev ffmpeg \ + 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 - run: ctest --test-dir 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 diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml deleted file mode 100644 index f0fe0d1..0000000 --- a/.github/workflows/cmake-single-platform.yml +++ /dev/null @@ -1,48 +0,0 @@ -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