Skip to content

Commit 2e4dbd9

Browse files
committed
🔨 Another CMake github actions attempt
1 parent 5d0448c commit 2e4dbd9

File tree

2 files changed

+14
-51
lines changed

2 files changed

+14
-51
lines changed

.github/workflows/cmake-multi-platform.yml

+13-51
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ jobs:
1616
include:
1717
- os: windows-latest
1818
cpp_compiler: cl
19-
separator: '\\'
2019
- os: ubuntu-latest
2120
cpp_compiler: g++
22-
separator: "/"
2321

2422
steps:
2523
- uses: actions/checkout@v4
@@ -58,70 +56,34 @@ jobs:
5856
shell: bash
5957
run: |
6058
conan profile detect --force
61-
echo "[conf]" >> ~/.conan2/profiles/default
62-
echo "tools.system.package_manager:mode=install" >> ~/.conan2/profiles/default
63-
echo "tools.system.package_manager:sudo=True" >> ~/.conan2/profiles/default
6459
65-
- name: Cache Conan packages
66-
uses: actions/cache@v3
67-
with:
68-
path: ~/.conan2
69-
key: ${{ runner.os }}-conan-${{ hashFiles('**/conanfile.txt') }}
70-
restore-keys: |
71-
${{ runner.os }}-conan-
72-
73-
- name: Install Conan Dependencies (Linux)
74-
if: runner.os == 'Linux'
60+
- name: Install Conan Dependencies
7561
run: |
7662
conan install . --build=missing -s build_type=${{ matrix.build_type }}
7763
78-
- name: Install Conan Dependencies (Windows)
79-
if: runner.os == 'Windows'
80-
shell: pwsh
64+
- name: Configure CMake
8165
run: |
82-
conan install . --build=missing -s build_type=${{ matrix.build_type }} '-c tools.cmake.cmake_layout:build_folder_vars=["generators"]' -c tools.cmake.cmaketoolchain:generator=Ninja
66+
cmake --preset conan-${{ matrix.build_type }}
8367
84-
- name: Set Build Directory
85-
id: strings
86-
shell: bash
87-
run: |
88-
if [ "${{ runner.os }}" == "Windows" ]; then
89-
echo "build-output-dir=${{ github.workspace }}\\build\\${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"
90-
echo "game-path=src\\game\\stabby.exe" >> "$GITHUB_OUTPUT"
91-
echo "preset=conan-default" >> "$GITHUB_OUTPUT"
92-
else
93-
echo "build-output-dir=${{ github.workspace }}/build/${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"
94-
echo "game-path=src/game/stabby" >> "$GITHUB_OUTPUT"
95-
echo "preset=conan-release" >> "$GITHUB_OUTPUT"
96-
fi
68+
- name: Build
69+
run: cmake --build --preset conan-${{ matrix.build_type }}
9770

98-
- name: Configure CMake
71+
- name: Test
72+
run: ctest --preset conan-${{ matrix.build_type }}
73+
74+
- name: Set Artifact Path
75+
id: artifact
9976
shell: bash
10077
run: |
10178
if [ "${{ runner.os }}" == "Windows" ]; then
102-
build_dir="${{ github.workspace }}\\build\\${{ matrix.build_type }}"
103-
toolchain_path="${{ github.workspace }}\\build\\${{ matrix.build_type }}\\generators\\conan_toolchain.cmake"
79+
echo "game-path=build/${{ matrix.build_type }}/src/game/stabby.exe" >> "$GITHUB_OUTPUT"
10480
else
105-
build_dir="${{ github.workspace }}/build/${{ matrix.build_type }}"
106-
toolchain_path="${{ github.workspace }}/build/${{ matrix.build_type }}/generators/conan_toolchain.cmake"
81+
echo "game-path=build/${{ matrix.build_type }}/src/game/stabby" >> "$GITHUB_OUTPUT"
10782
fi
10883
109-
cmake -S . \
110-
-B "$build_dir" \
111-
-G Ninja \
112-
-DCMAKE_TOOLCHAIN_FILE="$toolchain_path" \
113-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
114-
115-
- name: Build
116-
run: cmake --build ${{ steps.strings.outputs.build-output-dir }}
117-
118-
- name: Test
119-
working-directory: ${{ steps.strings.outputs.build-output-dir }}
120-
run: ctest --build-config ${{ matrix.build_type }}
121-
12284
- name: Upload Build Artifacts
12385
uses: actions/upload-artifact@v3
12486
with:
12587
name: ${{ runner.os }}-${{ matrix.build_type }}-build
126-
path: ${{ steps.strings.outputs.build-output-dir }}/${{ steps.strings.outputs.game-path }}
88+
path: ${{ steps.artifact.outputs.game-path }}
12789
if-no-files-found: ignore

src/engine/world/ecs.h

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <bitset>
55
#include <concepts>
66
#include <functional>
7+
#include <limits>
78
#include <memory>
89
#include <string>
910
#include <type_traits>

0 commit comments

Comments
 (0)