Skip to content

Commit

Permalink
Fixing github workflow builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Chukobyte authored Apr 6, 2024
2 parents fd1d17c + 85e4010 commit 5604b53
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 99 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/macosx-clang-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,16 @@ jobs:
cmakeVersion: "3.27.0"

- name: run build
uses: lukka/[email protected]
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DIS_CI_BUILD=true']"
buildPreset: 'ninja-multi-vcpkg'
run: |
cd ${{ github.workspace }}
mkdir -p builds
cmake -S . -B builds -DIS_CI_BUILD="true"
cmake --build builds
- name: run unit tests
run: |
echo "Running crescent engine tests!"
${{ github.workspace }}/builds/Debug/crescent_engine_test
${{ github.workspace }}/builds/crescent_engine_test
echo ""
echo "Running crescent engine editor tests!"
${{ github.workspace }}/builds/Debug/crescent_engine_editor_test
${{ github.workspace }}/builds/crescent_engine_editor_test
83 changes: 54 additions & 29 deletions .github/workflows/package-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ jobs:
cmakeVersion: "3.27.0"

- name: run build
uses: lukka/[email protected]
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DIS_CI_BUILD=true']"
buildPreset: 'ninja-multi-vcpkg'
buildPresetAdditionalArgs: "['--config Release']"
run: |
cd ${{ github.workspace }}
mkdir -p builds
cmake -S . -B builds -DCMAKE_BUILD_TYPE=Release -DIS_CI_BUILD="true"
cmake --build builds --config Release
- name: rename binaries
run: |
Expand All @@ -41,6 +39,19 @@ jobs:
echo "Running crescent engine editor tests!"
${{ github.workspace }}\builds\Release\crescent_engine_editor_test.exe
- name: package dlls (and python zip)
run: |
cd ${{ github.workspace }}
mkdir -p windows_run_dependencies
# Get all dll files
$dllFiles = Get-ChildItem -Path . -Filter *.dll -Recurse
# Copy dlls
foreach ($file in $dllFiles) {
$destPath = Join-Path -Path windows_run_dependencies\ -ChildPath $file.Name
Copy-Item -Path $file.FullName -Destination $destPath
}
Compress-Archive -Path windows_run_dependencies -DestinationPath ${{ github.workspace }}\windows_run_dependencies.zip
- name: store engine binary
uses: actions/upload-artifact@v3
with:
Expand All @@ -55,6 +66,13 @@ jobs:
path: crescent_engine_editor_windows.exe
if-no-files-found: error

- name: store windows deps
uses: actions/upload-artifact@v3
with:
name: windows_run_dependencies.zip
path: windows_run_dependencies.zip
if-no-files-found: error

# LINUX BUILD
linux-build:
runs-on: ubuntu-latest
Expand All @@ -76,29 +94,27 @@ jobs:
cmakeVersion: "3.27.0"

- name: run build
uses: lukka/[email protected]
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DIS_CI_BUILD=true']"
buildPreset: 'ninja-multi-vcpkg'
buildPresetAdditionalArgs: "['--config Release']"
run: |
cd ${{ github.workspace }}
mkdir -p builds
cmake -S . -B builds -DCMAKE_BUILD_TYPE=Release -DIS_CI_BUILD="true"
cmake --build builds --config Release
- name: rename binaries
run: |
cd ${{ github.workspace }}
mv builds/Release/crescent_engine crescent_engine_linux
mv builds/Release/crescent_engine_editor crescent_engine_editor_linux
mv builds/crescent_engine crescent_engine_linux
mv builds/crescent_engine_editor crescent_engine_editor_linux
chmod +x crescent_engine_linux
chmod +x crescent_engine_editor_linux
- name: run unit tests
run: |
echo "Running crescent engine tests!"
${{ github.workspace }}/builds/Release/crescent_engine_test
${{ github.workspace }}/builds/crescent_engine_test
echo ""
echo "Running crescent engine editor tests!"
${{ github.workspace }}/builds/Release/crescent_engine_editor_test
${{ github.workspace }}/builds/crescent_engine_editor_test
- name: store engine binary
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -133,30 +149,28 @@ jobs:
cmakeVersion: "3.27.0"

- name: run build
uses: lukka/[email protected]
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DIS_CI_BUILD=true']"
buildPreset: 'ninja-multi-vcpkg'
buildPresetAdditionalArgs: "['--config Release']"
run: |
cd ${{ github.workspace }}
mkdir -p builds
cmake -S . -B builds -DCMAKE_BUILD_TYPE=Release -DIS_CI_BUILD="true"
cmake --build builds --config Release
- name: rename binaries
run: |
cd ${{ github.workspace }}
mv builds/Release/crescent_engine crescent_engine_macosx
mv builds/Release/crescent_engine_editor crescent_engine_editor_macosx
mv builds/crescent_engine crescent_engine_macosx
mv builds/crescent_engine_editor crescent_engine_editor_macosx
chmod +x crescent_engine_macosx
chmod +x crescent_engine_editor_macosx
- name: run unit tests
run: |
cd ${{ github.workspace }}
echo "Running crescent engine tests!"
builds/Release/crescent_engine_test
builds/crescent_engine_test
echo ""
echo "Running crescent engine editor tests!"
builds/Release/crescent_engine_editor_test
builds/crescent_engine_editor_test
# - name: decode private key and cert
# run: |
Expand Down Expand Up @@ -248,6 +262,11 @@ jobs:
with:
name: crescent_engine_editor_windows.exe

- name: download windows deps
uses: actions/download-artifact@v3
with:
name: windows_run_dependencies.zip

- name: download linux engine binary
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -283,6 +302,10 @@ jobs:
# Move editor
mv crescent_engine_editor_windows.exe crescent_windows/crescent.exe
# Copy windows runtime deps
# Copy windows runtime deps
unzip windows_run_dependencies.zip
cp windows_run_dependencies/* crescent_windows/
cp windows_run_dependencies/* crescent_windows/bin/windows/
chmod -R 755 crescent_windows
zip -r crescent_windows.zip crescent_windows/
Expand All @@ -301,6 +324,7 @@ jobs:
# Move editor
mv crescent_engine_editor_linux crescent_linux/crescent
# Copy runtime deps
cp windows_run_dependencies/* crescent_linux/bin/windows/
chmod -R 755 crescent_linux
zip -r crescent_linux.zip crescent_linux/
tar -czvf crescent_linux.tar.gz crescent_linux/
Expand Down Expand Up @@ -328,6 +352,7 @@ jobs:
# Move editor
mv crescent_engine_editor_macosx crescent.app/Contents/MacOS/crescent
# Copy runtime deps
cp windows_run_dependencies/* crescent.app/Contents/MacOS/bin/windows/
chmod -R 755 crescent.app
zip -r crescent_macosx.zip crescent.app/
tar -czvf crescent_macosx.tar.gz crescent.app/
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/pvs-studio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ jobs:
cmakeVersion: "3.27.0"

- name: run build
uses: lukka/[email protected]
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DIS_CI_BUILD=true', '-DCMAKE_EXPORT_COMPILE_COMMANDS=On']"
buildPreset: 'ninja-multi-vcpkg'
run: |
cd ${{ github.workspace }}
mkdir -p builds
cmake -S . -B builds -DIS_CI_BUILD="true" -DCMAKE_EXPORT_COMPILE_COMMANDS=On
cmake --build builds
- name: run pvs studio
run: |
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/ubuntu-gcc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,16 @@ jobs:
cmakeVersion: "3.27.0"

- name: run build
uses: lukka/[email protected]
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DIS_CI_BUILD=true']"
buildPreset: 'ninja-multi-vcpkg'
run: |
cd ${{ github.workspace }}
mkdir -p builds
cmake -S . -B builds -DIS_CI_BUILD="true"
cmake --build builds
- name: run unit tests
run: |
echo "Running crescent engine tests!"
${{ github.workspace }}/builds/Debug/crescent_engine_test
${{ github.workspace }}/builds/crescent_engine_test
echo ""
echo "Running crescent engine editor tests!"
${{ github.workspace }}/builds/Debug/crescent_engine_editor_test
${{ github.workspace }}/builds/crescent_engine_editor_test
15 changes: 7 additions & 8 deletions .github/workflows/windows-mingw-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ jobs:
cmakeVersion: "3.27.0"

- name: run build
uses: lukka/[email protected]
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DIS_CI_BUILD=true']"
buildPreset: 'ninja-multi-vcpkg'
run: |
cd ${{ github.workspace }}
mkdir -p builds
cmake -S . -G "MinGW Makefiles" -B builds -DIS_CI_BUILD="true"
cmake --build builds
- name: run unit tests
run: |
echo "Running crescent engine tests!"
${{ github.workspace }}/builds/Debug/crescent_engine_test.exe
${{ github.workspace }}/builds/crescent_engine_test.exe
echo ""
echo "Running crescent engine editor tests!"
${{ github.workspace }}/builds/Debug/crescent_engine_editor_test.exe
${{ github.workspace }}/builds/crescent_engine_editor_test.exe
15 changes: 7 additions & 8 deletions .github/workflows/windows-msvc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ jobs:
cmakeVersion: "3.27.0"

- name: run build
uses: lukka/[email protected]
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DIS_CI_BUILD=true']"
buildPreset: 'ninja-multi-vcpkg'
run: |
cd ${{ github.workspace }}
mkdir -p builds
cmake -S . -B builds -DIS_CI_BUILD="true"
cmake --build builds
- name: run unit tests
run: |
echo "Running crescent engine tests!"
${{ github.workspace }}\builds\Debug\crescent_engine_test.exe
${{ github.workspace }}/builds/Debug/crescent_engine_test.exe
echo ""
echo "Running crescent engine editor tests!"
${{ github.workspace }}\builds\Debug\crescent_engine_editor_test.exe
${{ github.workspace }}/builds/Debug/crescent_engine_editor_test.exe
32 changes: 0 additions & 32 deletions CMakePresets.json

This file was deleted.

2 changes: 2 additions & 0 deletions Dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
if (NOT TARGET seika)
set(SEIKA_STATIC_LIB OFF)

# Setting to 10,000 as the default 200,000 is too much for our needs now
set(SKA_MAX_ENTITIES 10000 CACHE STRING "Maximum number of entities")
add_definitions(-DSKA_MAX_ENTITIES=${SKA_MAX_ENTITIES})
Expand Down

0 comments on commit 5604b53

Please sign in to comment.