Skip to content

Commit ae6dcab

Browse files
committed
- fix build and CI
1 parent f2f85c2 commit ae6dcab

File tree

507 files changed

+822
-326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

507 files changed

+822
-326
lines changed

.editorconfig

100755100644
File mode changed.

.gitattributes

100755100644
File mode changed.

.github/workflows/deploy.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Deploy
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
deploy:
7+
name: ${{ matrix.name }} deploy
8+
runs-on: ${{ matrix.os }}
9+
env:
10+
APP_NAME: DGEngine
11+
APP_NAME_LOWERCASE: dgengine
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- name: Linux
17+
os: ubuntu-latest
18+
preset: linux-x64-release-publish
19+
triplet: x64-linux
20+
zip-name-suffix: linux-x86_64.AppImage
21+
- name: Windows x86
22+
arch: x86
23+
os: windows-latest
24+
preset: windows-x86-release-publish
25+
triplet: x86-windows-static
26+
zip-name-suffix: windows-x86
27+
- name: Windows x64
28+
arch: x64
29+
os: windows-latest
30+
preset: windows-x64-release-publish
31+
triplet: x64-windows-static
32+
zip-name-suffix: windows-x64
33+
34+
steps:
35+
- name: Checkout ${{ env.APP_NAME }}
36+
uses: actions/checkout@v4
37+
38+
- name: Install Ubuntu dependencies (Linux)
39+
if: runner.os == 'Linux'
40+
uses: awalsh128/cache-apt-pkgs-action@latest
41+
with:
42+
packages: fuse libx11-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev
43+
version: 1.0
44+
execute_install_scripts: true
45+
46+
- name: Install dependencies
47+
uses: johnwason/vcpkg-action@v7
48+
id: vcpkg
49+
with:
50+
pkgs: physfs sfml[audio,graphics,window]
51+
triplet: ${{ matrix.triplet }}
52+
extra-args: --overlay-ports=../vcpkg/ports
53+
cache-key: vcpkg-${{ matrix.triplet }}-deploy
54+
token: ${{ secrets.GITHUB_TOKEN }}
55+
vcpkg-subdir: 'vcpkg-bin'
56+
revision: 'b2cb0da531c2f1f740045bfe7c4dac59f0b2b69c' # 2024.11.16
57+
58+
- name: Install UPX (Windows)
59+
if: runner.os == 'Windows'
60+
uses: crazy-max/ghaction-upx@v3
61+
with:
62+
install-only: true
63+
64+
- name: Setup MSVC (Windows)
65+
if: runner.os == 'Windows'
66+
uses: TheMrMilchmann/setup-msvc-dev@v3
67+
with:
68+
arch: ${{ matrix.arch }}
69+
70+
- name: Setup Ninja Build
71+
uses: turtlesec-no/get-ninja@main
72+
73+
- name: CMake build ${{ env.APP_NAME }}
74+
run: |
75+
cmake --preset ${{ matrix.preset }} -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg-bin/scripts/buildsystems/vcpkg.cmake
76+
cmake --build --preset ${{ matrix.preset }}
77+
78+
- name: Install LinuxDeploy (Linux)
79+
if: runner.os == 'Linux'
80+
run: |
81+
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -N
82+
chmod +x linuxdeploy-x86_64.AppImage
83+
84+
- name: Create AppImage (Linux)
85+
if: runner.os == 'Linux'
86+
run: |
87+
./linuxdeploy-x86_64.AppImage \
88+
--executable=out/build/${{ matrix.preset }}/${{ env.APP_NAME }} \
89+
--appdir out/appdir \
90+
--desktop-file=pkg/linux/${{ env.APP_NAME_LOWERCASE }}.desktop \
91+
--icon-file=pkg/linux/icon.png \
92+
--output=appimage
93+
94+
- name: Create ${{ env.APP_NAME }} zip (Linux)
95+
if: runner.os == 'Linux'
96+
run: 7z a ${{ env.APP_NAME }}-${{ matrix.zip-name-suffix }}.zip ${{ env.APP_NAME }}*.AppImage LICENSE.* README.* main.json gamefiles*
97+
98+
- name: Create ${{ env.APP_NAME }} zip (Windows)
99+
if: runner.os == 'Windows'
100+
run: 7z a ${{ env.APP_NAME }}-${{ matrix.zip-name-suffix }}.zip `
101+
./out/build/${{ matrix.preset }}/*.exe `
102+
./out/build/${{ matrix.preset }}/*.dll `
103+
LICENSE.* README.* main.json gamefiles*
104+
105+
- name: Create ${{ env.APP_NAME }} zip artifact
106+
uses: actions/upload-artifact@v4
107+
with:
108+
name: artifact-${{ env.APP_NAME }}-${{ matrix.zip-name-suffix }}
109+
path: ${{ env.APP_NAME }}-${{ matrix.zip-name-suffix }}.zip

.github/workflows/deploy_linux.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

.github/workflows/deploy_windows.yml

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)