0.0.6dev (#31) #72
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
name: Run GTest Linux | |
env: | |
SDL_VIDEODRIVER: "dummy" | |
SDL_AUDIODRIVER: "dummy" | |
on: | |
push: | |
branches: [ "main", "**dev" ] | |
pull_request: | |
jobs: | |
linux-gtest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
fail-fast: false | |
# Set up a matrix to run the following 2 configurations: | |
# 1. <Linux, latest GCC compiler toolchain on the default runner image, default generator> | |
# 2. <Linux, latest Clang compiler toolchain on the default runner image, default generator> | |
# | |
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. | |
matrix: | |
os: [ubuntu-latest] | |
c_compiler: [gcc, clang] | |
include: | |
- os: ubuntu-latest | |
c_compiler: gcc | |
cpp_compiler: g++ | |
- os: ubuntu-latest | |
c_compiler: clang | |
cpp_compiler: clang++ | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set reusable strings | |
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Update packages | |
run: sudo apt-get update && sudo apt-get upgrade -y | |
- name: Install SDL2 dependency | |
run: sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libgtest-dev -y | |
- uses: actions/setup-python@v5 | |
- name: Install meson | |
run: python3 -m pip install meson ninja | |
- name: Configure meson | |
run: meson setup build -Dbuild_tests=true | |
- name: Build test executable | |
run: cd build && meson compile -j$(nproc) | |
- name: Run Tests | |
run: cd build && ./krakentests --gtest_shuffle --gtest_color=true |