Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Linux
permissions:
contents: read

on:
push:
# Always trigger CI on push
pull_request:
branches: [ $default-branch ]


jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
buildtype: [Debug, Release]
env:
BUILD_TYPE: ${{ matrix.buildtype }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
# So we can skip the `data` submodule.
#with:
#submodules: 'recursive'
# Same as above, but skip the `data` submodule.
- name: Checkout submodules
run: git -c submodule."data".update=none submodule update --init --recursive

- name: Install libraries
run: sudo apt update && sudo apt install -y build-essential freeglut3-dev

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{runner.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_LTO=FALSE

- name: Build
# Build your program with the given configuration
run: cmake --build ${{runner.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{env.BUILD_TYPE}}-linux-x64--artifact${{github.sha}}
path: bin/bin_unix

- name: Test
working-directory: ${{runner.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}

58 changes: 58 additions & 0 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: MinGW
permissions:
contents: read

on:
push:
# Always trigger CI on push
pull_request:
branches: [ $default-branch ]


jobs:
build:
runs-on: windows-latest
strategy:
matrix:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
buildtype: [Debug, Release]
env:
BUILD_TYPE: ${{ matrix.buildtype }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
# So we can skip the `data` submodule.
#with:
#submodules: 'recursive'
# Same as above, but skip the `data` submodule.
- name: Checkout submodules
run: git -c submodule."data".update=none submodule update --init --recursive

- name: Set up MinGW
uses: egor-tensin/setup-mingw@v3
with:
platform: x64

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{runner.workspace}}/build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_LTO=FALSE

- name: Build
# Build your program with the given configuration
run: cmake --build ${{runner.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{env.BUILD_TYPE}}-mingw-x64-artifact${{github.sha}}
path: |
bin/bin64
!bin/bin64/*.dll

- name: Test
working-directory: ${{runner.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}

53 changes: 53 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Windows
permissions:
contents: read

on:
push:
# Always trigger CI on push
pull_request:
branches: [ $default-branch ]


jobs:
build:
runs-on: windows-latest
strategy:
matrix:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
buildtype: [Debug, Release]
env:
BUILD_TYPE: ${{ matrix.buildtype }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
# So we can skip the `data` submodule.
#with:
#submodules: 'recursive'
# Same as above, but skip the `data` submodule.
- name: Checkout submodules
run: git -c submodule."data".update=none submodule update --init --recursive

- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{runner.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_LTO=FALSE

- name: Build
# Build your program with the given configuration
run: cmake --build ${{runner.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{env.BUILD_TYPE}}-msvc-x64-artifact${{github.sha}}
path: |
bin/bin64
!bin/bin64/*.dll

- name: Test
working-directory: ${{runner.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ source/vcpp/x86/
.vscode/
Debug*/
Release*/
.*-Debug/
.*-Release/
Profile*/
autoexec.cfg
master.cfg
Expand Down
18 changes: 18 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
[submodule "data"]
path = data
url = https://github.com/project-valhalla/data.git
[submodule "external/SDL2"]
path = external/SDL2
url = https://github.com/libsdl-org/SDL.git
branch = SDL2
[submodule "external/SDL_image"]
path = external/SDL_image
url = https://github.com/libsdl-org/SDL_image.git
branch = SDL2
[submodule "external/SDL_mixer"]
path = external/SDL_mixer
url = https://github.com/libsdl-org/SDL_mixer.git
branch = SDL2
[submodule "external/doctest"]
path = external/doctest
url = https://github.com/onqtam/doctest.git
[submodule "external/libmaxminddb"]
path = external/libmaxminddb
url = https://github.com/maxmind/libmaxminddb.git
Loading