Skip to content

Commit

Permalink
- add logging
Browse files Browse the repository at this point in the history
- add publish preset optimized for release
- add tests
- fix static builds and add mingw support
- remove cmake_modules
- update CMakeLists.txt
- update CMakePresets.json
- update DGEngine.core
- update gamefiles
- update stlastar
- use LazyImageContainer from DGEngine.core
  • Loading branch information
dgcor committed Dec 22, 2023
1 parent d46bca6 commit 001401e
Show file tree
Hide file tree
Showing 535 changed files with 34,418 additions and 4,679 deletions.
9 changes: 7 additions & 2 deletions .editorconfig
@@ -1,13 +1,18 @@
root = true

[{.github/**.yml,*.md}]
charset = utf-8
end_of_line = lf
insert_final_newline = true

[CMakeLists.txt]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true

[{*.json,.vscode/**.json,gamefiles**.json}]
[{*,.vscode/**,gamefiles**}.json]
charset = utf-8
end_of_line = lf
indent_size = 2
Expand All @@ -30,7 +35,7 @@ indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[src/Game/{fsa,stlastar}.h]
[src/Game/Level/{fsa,stlastar}.h]
indent_size = unset
indent_style = unset
insert_final_newline = unset
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
@@ -1,4 +1,4 @@
* text=auto
* text=auto eol=lf
*.bin binary
*.bmp binary
*.c text
Expand Down
56 changes: 22 additions & 34 deletions .github/workflows/deploy_linux.yml
Expand Up @@ -3,6 +3,9 @@ name: Deploy_Linux
on:
workflow_dispatch:

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

jobs:
deploy_linux:
name: linux deploy
Expand All @@ -11,41 +14,28 @@ jobs:
- name: Checkout DGEngine
uses: actions/checkout@v3

- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install GCC 11
uses: egor-tensin/setup-gcc@v1
with:
version: 11

- name: Restore cached dependencies
id: cache-linux-x64
uses: actions/cache@v3
- name: Install Ubuntu dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
path: /home/runner/work/sfml
key: cache-linux-x64
packages: fuse libx11-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswscale-dev
version: 1.0
execute_install_scripts: true

- name: Install dependencies
run: |
sudo apt install -yq --no-install-suggests --no-install-recommends fuse > /dev/null
sudo apt install -yq --no-install-suggests --no-install-recommends libphysfs-dev > /dev/null
sudo apt install -yq --no-install-suggests --no-install-recommends libalut-dev libflac-dev libgl1-mesa-dev libudev-dev libvorbis-dev libxcursor-dev libxrandr-dev > /dev/null
sudo apt install -yq --no-install-suggests --no-install-recommends libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswscale-dev > /dev/null
- name: CMake build and install SFML
if: steps.cache-linux-x64.outputs.cache-hit != 'true'
run: |
git clone -q --depth=1 --branch=feature/scancode https://github.com/dgcor/SFML.git /home/runner/work/sfml > /dev/null
git -C /home/runner/work/sfml pull > /dev/null
cd /home/runner/work/sfml
export CC=/usr/bin/gcc-11
export CXX=/usr/bin/g++-11
cmake /home/runner/work/sfml/CMakeLists.txt
sudo cmake --build . --config Release --target install
- name: Install SFML
if: steps.cache-linux-x64.outputs.cache-hit == 'true'
run: |
cd /home/runner/work/sfml
sudo make install
vcpkg install physfs sfml --triplet=x64-linux
- name: Setup Ninja Build
uses: turtlesec-no/get-ninja@main
Expand All @@ -54,8 +44,8 @@ jobs:
run: |
export CC=/usr/bin/gcc-11
export CXX=/usr/bin/g++-11
cmake CMakeLists.txt -G "Ninja"
cmake --build . --config Release
cmake --preset linux-x64-release-publish -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build --preset linux-x64-release-publish
- name: Install LinuxDeploy
run: |
Expand All @@ -65,20 +55,19 @@ jobs:
- name: Create AppImage
run: |
./linuxdeploy-x86_64.AppImage \
--executable=DGEngine \
--executable=out/build/linux-x64-release-publish/DGEngine \
--appdir out/appdir \
--desktop-file=pkg/linux/dgengine.desktop \
--icon-file=pkg/linux/icon.png \
--output=appimage
mv DGEngine-*-x86_64.AppImage DGEngine-x86_64.AppImage
- name: Create DGEngine zip
run: 7z a DGEngine-linux-x86_64.AppImage.zip DGEngine-x86_64.AppImage LICENSE.* README.* main.json gamefiles*

- name: Create AppImage with movie support
run: |
./linuxdeploy-x86_64.AppImage \
--executable=DGEngine \
--executable=out/build/linux-x64-release-publish/DGEngine \
--library=/lib/x86_64-linux-gnu/libavcodec.so.58 \
--library=/lib/x86_64-linux-gnu/libavformat.so.58 \
--library=/lib/x86_64-linux-gnu/libavutil.so.56 \
Expand All @@ -88,19 +77,18 @@ jobs:
--desktop-file=pkg/linux/dgengine.desktop \
--icon-file=pkg/linux/icon.png \
--output=appimage
mv -f DGEngine-*-x86_64.AppImage DGEngine-x86_64.AppImage
- name: Create DGEngine zip with movie support
run: 7z a DGEngine-linux-ffmpeg-x86_64.AppImage.zip DGEngine-x86_64.AppImage LICENSE.* README.* main.json gamefiles*

- name: Create DGEngine zip artifact
uses: actions/upload-artifact@v3
with:
name: artifact-DGEngine-linux-x86_64
name: artifact-DGEngine-linux-x86_64.AppImage
path: DGEngine-linux-x86_64.AppImage.zip

- name: Create DGEngine zip artifact with movie support
uses: actions/upload-artifact@v3
with:
name: artifact-DGEngine-linux-ffmpeg-x86_64
name: artifact-DGEngine-linux-ffmpeg-x86_64.AppImage
path: DGEngine-linux-ffmpeg-x86_64.AppImage.zip
65 changes: 35 additions & 30 deletions .github/workflows/deploy_windows.yml
Expand Up @@ -3,27 +3,31 @@ name: Deploy_Windows
on:
workflow_dispatch:

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

jobs:
deploy_windows_x86:
name: windows deploy x86
runs-on: windows-2022
runs-on: windows-latest
steps:
- name: Checkout DGEngine
uses: actions/checkout@v3

- name: Restore cached dependencies
id: cache-windows-x86
uses: actions/cache@v3
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
path: C:/vcpkg/installed
key: cache-windows-x86
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install dependencies
if: steps.cache-windows-x86.outputs.cache-hit != 'true'
run: vcpkg install physfs sfml `
--overlay-ports=DGEngine.core/vcpkg/ports `
--overlay-triplets=DGEngine.core/vcpkg/triplets `
--triplet=x86-windows
run: vcpkg install physfs sfml --triplet=x86-windows-static

- name: Install UPX
uses: crazy-max/ghaction-upx@v3
with:
install-only: true

- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v2
Expand All @@ -35,13 +39,13 @@ jobs:

- name: CMake build DGEngine
run: |
cmake --preset windows-x86-release -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --build --preset windows-x86-release
cmake --preset windows-x86-release-publish -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --build --preset windows-x86-release-publish
- name: Create DGEngine zip
run: 7z a DGEngine-windows-x86.zip `
./out/build/windows-x86-release/*.exe `
./out/build/windows-x86-release/*.dll `
./out/build/windows-x86-release-publish/*.exe `
./out/build/windows-x86-release-publish/*.dll `
LICENSE.* README.* main.json gamefiles*

- name: Create DGEngine zip artifact
Expand All @@ -52,24 +56,25 @@ jobs:

deploy_windows_x64:
name: windows deploy x64
runs-on: windows-2022
runs-on: windows-latest
steps:
- name: Checkout DGEngine
uses: actions/checkout@v3

- name: Restore cached dependencies
id: cache-windows-x64
uses: actions/cache@v3
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
path: C:/vcpkg/installed
key: cache-windows-x64
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install dependencies
if: steps.cache-windows-x64.outputs.cache-hit != 'true'
run: vcpkg install physfs sfml `
--overlay-ports=DGEngine.core/vcpkg/ports `
--overlay-triplets=DGEngine.core/vcpkg/triplets `
--triplet=x64-windows
run: vcpkg install physfs sfml --triplet=x64-windows-static

- name: Install UPX
uses: crazy-max/ghaction-upx@v3
with:
install-only: true

- name: Setup MSVC
uses: TheMrMilchmann/setup-msvc-dev@v2
Expand All @@ -81,13 +86,13 @@ jobs:

- name: CMake build DGEngine
run: |
cmake --preset windows-x64-release -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --build --preset windows-x64-release
cmake --preset windows-x64-release-publish -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake --build --preset windows-x64-release-publish
- name: Create DGEngine zip
run: 7z a DGEngine-windows-x64.zip `
./out/build/windows-x64-release/*.exe `
./out/build/windows-x64-release/*.dll `
./out/build/windows-x64-release-publish/*.exe `
./out/build/windows-x64-release-publish/*.dll `
LICENSE.* README.* main.json gamefiles*

- name: Create DGEngine zip artifact
Expand Down

0 comments on commit 001401e

Please sign in to comment.