mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-26 16:36:38 -04:00
Refactor cmake (#721)
* some start of refactor * Update SetFlags.cmake * Update SetCmakeVar.cmake * Update SetFlags.cmake * Fix error int-convertion * more refactor * clean up include and source file * fix link of lib * fix a warning * fix include in src/actors * fix include in src/debug * fix include in src/ending * fix include in src/engine/actors * fix include in src/engine/cameras * fix include in src/engine/editor * fix include in src/engine/objects * fix include in src/engine/tracks * fix include in src/port/ui * fix include in src/racing * fix include in src/engine/vehicles * fix include in subfolder of src/engine * fix include in src/engine * fix include in src/enhancements * fix include in src * fix switch * invert common and findlib * Update SetFlags.cmake * clean up some workflow * some splification * Update build.sh * Update Game.h * add header back * Delete test_check.cmake * continue * Update common.cmake
This commit is contained in:
@@ -94,14 +94,9 @@ jobs:
|
||||
-v "${{ github.workspace }}:/project" \
|
||||
spaghettikart-builder:latest \
|
||||
bash -c "
|
||||
cp vcpkg.json /tmp/vcpkg.json && \
|
||||
cd /tmp && \
|
||||
\${VCPKG_ROOT}/vcpkg install --triplet x64-linux && \
|
||||
cd /project && \
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DVCPKG_TARGET_TRIPLET=x64-linux && \
|
||||
-DENABLE_VCPKG=ON && \
|
||||
cmake --build build --parallel && \
|
||||
make -C torch type=release -j\$(nproc) && \
|
||||
torch/cmake-build-release/torch pack assets build/spaghetti.o2r o2r
|
||||
|
||||
@@ -18,13 +18,9 @@ jobs:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: brew install ninja cmake
|
||||
- name: Install vcpkg
|
||||
uses: lukka/run-vcpkg@v11.5
|
||||
with:
|
||||
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DENABLE_VCPKG=ON
|
||||
cmake --build build-cmake -j --config ${{ matrix.config }}
|
||||
- name: Create Package
|
||||
run: |
|
||||
|
||||
@@ -96,13 +96,9 @@ jobs:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: brew install ninja cmake
|
||||
- name: Install vcpkg
|
||||
uses: lukka/run-vcpkg@v11.5
|
||||
with:
|
||||
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DENABLE_VCPKG=ON
|
||||
cmake --build build-cmake --config ${{ matrix.config }} -j3
|
||||
- name: Download spaghetti.o2r
|
||||
uses: actions/download-artifact@v4
|
||||
@@ -139,13 +135,9 @@ jobs:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: brew install ninja cmake
|
||||
- name: Install vcpkg
|
||||
uses: lukka/run-vcpkg@v11.5
|
||||
with:
|
||||
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DENABLE_VCPKG=ON
|
||||
cmake --build build-cmake --config ${{ matrix.config }} -j3
|
||||
- name: Download spaghetti.o2r
|
||||
uses: actions/download-artifact@v4
|
||||
@@ -413,14 +405,9 @@ jobs:
|
||||
-v "${{ github.workspace }}:/project" \
|
||||
spaghettikart-builder:latest \
|
||||
bash -c "
|
||||
cp vcpkg.json /tmp/vcpkg.json && \
|
||||
cd /tmp && \
|
||||
\${VCPKG_ROOT}/vcpkg install --triplet x64-linux && \
|
||||
cd /project && \
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
|
||||
-DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake \
|
||||
-DVCPKG_TARGET_TRIPLET=x64-linux && \
|
||||
-DENABLE_VCPKG=ON && \
|
||||
cmake --build build --parallel
|
||||
"
|
||||
|
||||
@@ -525,7 +512,7 @@ jobs:
|
||||
spaghettikart-x86:latest \
|
||||
bash -c "
|
||||
cd /project/build-x86 && \
|
||||
cpack -G External || true
|
||||
cpack -G External
|
||||
"
|
||||
|
||||
- name: Create Package
|
||||
@@ -533,7 +520,7 @@ jobs:
|
||||
mkdir -p spaghetti-x86-${{ matrix.config }}
|
||||
wget -O gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt
|
||||
mv gamecontrollerdb.txt spaghetti-x86-${{ matrix.config }}/
|
||||
cp build-x86/*.appimage spaghetti-x86-${{ matrix.config }}/spaghetti.appimage 2>/dev/null || true
|
||||
cp build-x86/*.appimage spaghetti-x86-${{ matrix.config }}/spaghetti.appimage
|
||||
|
||||
- name: Publish packaged artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user