Skip to content

Commit c7d34eb

Browse files
committed
- add logging
- add publish preset optimized for release - don't remove jewels outside visible area - fix magic jewel placement - fix static builds and add mingw support - remove cmake_modules - update CMakeLists.txt - update CMakePresets.json - update DGEngine.core - update level drawing to hide non visible cells - Update level logic to add extra height for column height - update LevelScoreManager
1 parent b1ef135 commit c7d34eb

358 files changed

Lines changed: 33585 additions & 4053 deletions

File tree

Some content is hidden

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

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* text=auto
1+
* text=auto eol=lf
22
*.bin binary
33
*.bmp binary
44
*.c text

.github/workflows/deploy_linux.yml

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Deploy_Linux
33
on:
44
workflow_dispatch:
55

6+
env:
7+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
8+
69
jobs:
710
deploy_linux:
811
name: linux deploy
@@ -11,41 +14,28 @@ jobs:
1114
- name: Checkout Columns
1215
uses: actions/checkout@v3
1316

17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v6
19+
with:
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
23+
1424
- name: Install GCC 11
1525
uses: egor-tensin/setup-gcc@v1
1626
with:
1727
version: 11
1828

19-
- name: Restore cached dependencies
20-
id: cache-linux-x64
21-
uses: actions/cache@v3
29+
- name: Install Ubuntu dependencies
30+
uses: awalsh128/cache-apt-pkgs-action@latest
2231
with:
23-
path: /home/runner/work/sfml
24-
key: cache-linux-x64
32+
packages: fuse libx11-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev
33+
version: 1.0
34+
execute_install_scripts: true
2535

2636
- name: Install dependencies
2737
run: |
28-
sudo apt install -yq --no-install-suggests --no-install-recommends fuse > /dev/null
29-
sudo apt install -yq --no-install-suggests --no-install-recommends libphysfs-dev > /dev/null
30-
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
31-
sudo apt install -yq --no-install-suggests --no-install-recommends libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswscale-dev > /dev/null
32-
33-
- name: CMake build and install SFML
34-
if: steps.cache-linux-x64.outputs.cache-hit != 'true'
35-
run: |
36-
git clone -q --depth=1 --branch=feature/scancode https://github.com/dgcor/SFML.git /home/runner/work/sfml > /dev/null
37-
git -C /home/runner/work/sfml pull > /dev/null
38-
cd /home/runner/work/sfml
39-
export CC=/usr/bin/gcc-11
40-
export CXX=/usr/bin/g++-11
41-
cmake /home/runner/work/sfml/CMakeLists.txt
42-
sudo cmake --build . --config Release --target install
43-
44-
- name: Install SFML
45-
if: steps.cache-linux-x64.outputs.cache-hit == 'true'
46-
run: |
47-
cd /home/runner/work/sfml
48-
sudo make install
38+
vcpkg install physfs sfml --triplet=x64-linux
4939
5040
- name: Setup Ninja Build
5141
uses: turtlesec-no/get-ninja@main
@@ -54,8 +44,8 @@ jobs:
5444
run: |
5545
export CC=/usr/bin/gcc-11
5646
export CXX=/usr/bin/g++-11
57-
cmake CMakeLists.txt -G "Ninja"
58-
cmake --build . --config Release
47+
cmake --preset linux-x64-release-publish -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake
48+
cmake --build --preset linux-x64-release-publish
5949
6050
- name: Install LinuxDeploy
6151
run: |
@@ -65,12 +55,11 @@ jobs:
6555
- name: Create AppImage
6656
run: |
6757
./linuxdeploy-x86_64.AppImage \
68-
--executable=Columns \
58+
--executable=out/build/linux-x64-release-publish/Columns \
6959
--appdir out/appdir \
7060
--desktop-file=pkg/linux/columns.desktop \
7161
--icon-file=pkg/linux/icon.png \
7262
--output=appimage
73-
mv Columns-*-x86_64.AppImage Columns-x86_64.AppImage
7463
7564
- name: Create Columns zip
7665
run: 7z a Columns-linux-x86_64.AppImage.zip Columns-x86_64.AppImage LICENSE.* README.* main.json gamefiles*

.github/workflows/deploy_windows.yml

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,31 @@ name: Deploy_Windows
33
on:
44
workflow_dispatch:
55

6+
env:
7+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
8+
69
jobs:
710
deploy_windows_x86:
811
name: windows deploy x86
9-
runs-on: windows-2022
12+
runs-on: windows-latest
1013
steps:
1114
- name: Checkout Columns
1215
uses: actions/checkout@v3
1316

14-
- name: Restore cached dependencies
15-
id: cache-windows-x86
16-
uses: actions/cache@v3
17+
- name: Export GitHub Actions cache environment variables
18+
uses: actions/github-script@v6
1719
with:
18-
path: C:/vcpkg/installed
19-
key: cache-windows-x86
20+
script: |
21+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
22+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
2023
2124
- name: Install dependencies
22-
if: steps.cache-windows-x86.outputs.cache-hit != 'true'
23-
run: vcpkg install physfs sfml `
24-
--overlay-ports=DGEngine.core/vcpkg/ports `
25-
--overlay-triplets=DGEngine.core/vcpkg/triplets `
26-
--triplet=x86-windows
25+
run: vcpkg install physfs sfml --triplet=x86-windows-static
26+
27+
- name: Install UPX
28+
uses: crazy-max/ghaction-upx@v3
29+
with:
30+
install-only: true
2731

2832
- name: Setup MSVC
2933
uses: TheMrMilchmann/setup-msvc-dev@v2
@@ -35,13 +39,13 @@ jobs:
3539

3640
- name: CMake build Columns
3741
run: |
38-
cmake --preset windows-x86-release -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
39-
cmake --build --preset windows-x86-release
42+
cmake --preset windows-x86-release-publish -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
43+
cmake --build --preset windows-x86-release-publish
4044
4145
- name: Create Columns zip
4246
run: 7z a Columns-windows-x86.zip `
43-
./out/build/windows-x86-release/*.exe `
44-
./out/build/windows-x86-release/*.dll `
47+
./out/build/windows-x86-release-publish/*.exe `
48+
./out/build/windows-x86-release-publish/*.dll `
4549
LICENSE.* README.* main.json gamefiles*
4650

4751
- name: Create Columns zip artifact
@@ -52,24 +56,25 @@ jobs:
5256

5357
deploy_windows_x64:
5458
name: windows deploy x64
55-
runs-on: windows-2022
59+
runs-on: windows-latest
5660
steps:
5761
- name: Checkout Columns
5862
uses: actions/checkout@v3
5963

60-
- name: Restore cached dependencies
61-
id: cache-windows-x64
62-
uses: actions/cache@v3
64+
- name: Export GitHub Actions cache environment variables
65+
uses: actions/github-script@v6
6366
with:
64-
path: C:/vcpkg/installed
65-
key: cache-windows-x64
67+
script: |
68+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
69+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
6670
6771
- name: Install dependencies
68-
if: steps.cache-windows-x64.outputs.cache-hit != 'true'
69-
run: vcpkg install physfs sfml `
70-
--overlay-ports=DGEngine.core/vcpkg/ports `
71-
--overlay-triplets=DGEngine.core/vcpkg/triplets `
72-
--triplet=x64-windows
72+
run: vcpkg install physfs sfml --triplet=x64-windows-static
73+
74+
- name: Install UPX
75+
uses: crazy-max/ghaction-upx@v3
76+
with:
77+
install-only: true
7378

7479
- name: Setup MSVC
7580
uses: TheMrMilchmann/setup-msvc-dev@v2
@@ -81,13 +86,13 @@ jobs:
8186

8287
- name: CMake build Columns
8388
run: |
84-
cmake --preset windows-x64-release -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
85-
cmake --build --preset windows-x64-release
89+
cmake --preset windows-x64-release-publish -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
90+
cmake --build --preset windows-x64-release-publish
8691
8792
- name: Create Columns zip
8893
run: 7z a Columns-windows-x64.zip `
89-
./out/build/windows-x64-release/*.exe `
90-
./out/build/windows-x64-release/*.dll `
94+
./out/build/windows-x64-release-publish/*.exe `
95+
./out/build/windows-x64-release-publish/*.dll `
9196
LICENSE.* README.* main.json gamefiles*
9297

9398
- name: Create Columns zip artifact

.github/workflows/main.yml

Lines changed: 36 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,49 @@ name: CI
33
on:
44
push:
55
paths:
6-
- 'src/**'
6+
- '.github/workflows/**'
77
- 'CMakeLists.txt'
8-
- 'DGEngine.core/src/**'
8+
- 'DGEngine.core/**'
99
- 'DGEngine.core/CMakeLists.txt'
10+
- 'src/**'
11+
- 'test/**'
1012
pull_request:
1113
paths:
12-
- 'src/**'
14+
- '.github/workflows/**'
1315
- 'CMakeLists.txt'
14-
- 'DGEngine.core/src/**'
16+
- 'DGEngine.core/**'
1517
- 'DGEngine.core/CMakeLists.txt'
18+
- 'src/**'
19+
- 'test/**'
20+
21+
env:
22+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
1623

1724
jobs:
1825
build_linux:
1926
name: linux build
20-
runs-on: ubuntu-22.04
27+
runs-on: ubuntu-latest
2128
steps:
2229
- name: Checkout Columns
23-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
2431

25-
- name: Restore cached dependencies
26-
id: cache-linux-x64
27-
uses: actions/cache@v3
32+
- name: Export GitHub Actions cache environment variables
33+
uses: actions/github-script@v6
2834
with:
29-
path: /home/runner/work/sfml
30-
key: cache-linux-x64
35+
script: |
36+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
37+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
3138
32-
- name: Install dependencies
33-
run: |
34-
sudo apt install -yq --no-install-suggests --no-install-recommends libphysfs-dev > /dev/null
35-
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
36-
sudo apt install -yq --no-install-suggests --no-install-recommends libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswscale-dev > /dev/null
37-
38-
- name: CMake build and install SFML
39-
if: steps.cache-linux-x64.outputs.cache-hit != 'true'
40-
run: |
41-
git clone -q --depth=1 --branch=feature/scancode https://github.com/dgcor/SFML.git /home/runner/work/sfml > /dev/null
42-
git -C /home/runner/work/sfml pull > /dev/null
43-
cd /home/runner/work/sfml
44-
export CC=/usr/bin/gcc-11
45-
export CXX=/usr/bin/g++-11
46-
cmake /home/runner/work/sfml/CMakeLists.txt
47-
sudo cmake --build . --config Release --target install
39+
- name: Install Ubuntu dependencies
40+
uses: awalsh128/cache-apt-pkgs-action@latest
41+
with:
42+
packages: libx11-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev
43+
version: 1.0
44+
execute_install_scripts: true
4845

49-
- name: Install SFML
50-
if: steps.cache-linux-x64.outputs.cache-hit == 'true'
46+
- name: Install dependencies
5147
run: |
52-
cd /home/runner/work/sfml
53-
sudo make install
48+
vcpkg install physfs sfml --triplet=x64-linux
5449
5550
- name: Setup Ninja Build
5651
uses: turtlesec-no/get-ninja@main
@@ -59,29 +54,25 @@ jobs:
5954
run: |
6055
export CC=/usr/bin/gcc-11
6156
export CXX=/usr/bin/g++-11
62-
cmake CMakeLists.txt -G "Ninja"
63-
cmake --build .
57+
cmake --preset linux-x64-debug-vcpkg -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake
58+
cmake --build --preset linux-x64-debug-vcpkg
6459
6560
build_windows:
6661
name: windows build
67-
runs-on: windows-2022
62+
runs-on: windows-latest
6863
steps:
6964
- name: Checkout Columns
70-
uses: actions/checkout@v3
65+
uses: actions/checkout@v4
7166

72-
- name: Restore cached dependencies
73-
id: cache-windows-x64
74-
uses: actions/cache@v3
67+
- name: Export GitHub Actions cache environment variables
68+
uses: actions/github-script@v6
7569
with:
76-
path: C:/vcpkg/installed
77-
key: cache-windows-x64
70+
script: |
71+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
72+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
7873
7974
- name: Install dependencies
80-
if: steps.cache-windows-x64.outputs.cache-hit != 'true'
81-
run: vcpkg install physfs sfml `
82-
--overlay-ports=DGEngine.core/vcpkg/ports `
83-
--overlay-triplets=DGEngine.core/vcpkg/triplets `
84-
--triplet=x64-windows
75+
run: vcpkg install physfs sfml --triplet=x64-windows
8576

8677
- name: Setup MSVC
8778
uses: TheMrMilchmann/setup-msvc-dev@v2

0 commit comments

Comments
 (0)