feat: add game mode state #60
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - 'src/**' | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - 'src/**' | |
| jobs: | |
| test: | |
| name: test | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install SDL3 | |
| uses: libsdl-org/setup-sdl@main | |
| with: | |
| install-linux-dependencies: true | |
| version: 3-latest | |
| version-sdl-image: 3-latest | |
| - name: Install Google Test | |
| run: sudo apt-get install -y libgtest-dev | |
| - name: Build and run tests | |
| run: | | |
| SRCS=$(find src -name "*.cpp" -not -name "client.cpp" -not -name "server.cpp" | tr '\n' ' ') | |
| SDL3_INCLUDES="-isystem $(pkg-config --variable=includedir sdl3)" | |
| SDL3_IMAGE_INCLUDES="-isystem $(pkg-config --variable=includedir sdl3-image)" | |
| SDL3_LIBS="$(pkg-config --libs sdl3) $(pkg-config --libs sdl3-image)" | |
| CXXFLAGS="-std=c++23 -Isrc $SDL3_INCLUDES $SDL3_IMAGE_INCLUDES \ | |
| -Wall -Weffc++ -Wextra -Wconversion \ | |
| -Wsign-conversion -Wimplicit-fallthrough" | |
| g++ $CXXFLAGS $SRCS -o test_runner $SDL3_LIBS -lgtest -lgtest_main -pthread | |
| ./test_runner |