-
Notifications
You must be signed in to change notification settings - Fork 4
142 lines (114 loc) · 4.05 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Build Binaries
on:
workflow_dispatch:
push:
branches:
- '**'
jobs:
build-gcc:
strategy:
fail-fast: false
matrix:
config:
- name: x86
compiler: https://geometrydash.eu/_other/TDM-GCC-32.zip
additional: -DLINK_UNICOWS=1
- name: x64
compiler: https://geometrydash.eu/_other/TDM-GCC-64.zip
name: Build ${{ matrix.config.name }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install TDM GCC 5.1.0
run: |
curl ${{ matrix.config.compiler }} -o compiler.zip -L
7z x compiler.zip -o"C:/TDM-GCC-5.1.0"
- name: Install Ninja
run: |
choco install ninja
- name: Configure & Build
run: |
$env:PATH = "C:/TDM-GCC-5.1.0/bin;" + $env:PATH
cmake ${{ matrix.config.additional }} -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER=C:/TDM-GCC-5.1.0/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/TDM-GCC-5.1.0/bin/g++.exe -G Ninja -B build -S .
cmake --build build --config Release
- name: Move build to release folder
run: |
mkdir release
mv build/CppShot.exe release/cppshot.exe
- name: Grab Windows 98/2000 compatibility DLL
if: matrix.config.name == 'x86'
run: |
curl https://github.com/Cvolton/CppShot/releases/download/v0.4/gdiplus.dll -o release/gdiplus.dll -L
curl https://geometrydash.eu/_other/unicows.dll -o release/unicows.dll -L
- name: Copy used licenses
run: |
cp C:/TDM-GCC-5.1.0/COPYING.winpthreads.txt ./release/
- name: Upload release build
uses: actions/upload-artifact@v4
with:
name: cppshot-${{ matrix.config.name }}
path: ./release/
build-clang:
strategy:
fail-fast: false
matrix:
config:
- name: arm32
compiler: https://github.com/mstorsjo/llvm-mingw/releases/download/20241001/llvm-mingw-20241001-ucrt-x86_64.zip
name: Build ${{ matrix.config.name }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install llvm-mingw
run: |
curl ${{ matrix.config.compiler }} -o compiler.zip -L
7z x compiler.zip -o"C:/llvm"
- name: Install Ninja
run: |
choco install ninja
- name: Configure & Build
run: |
$env:PATH = "C:/llvm/llvm-mingw-20241001-ucrt-x86_64/bin;" + $env:PATH
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER="C:\llvm\llvm-mingw-20241001-ucrt-x86_64\bin\armv7-w64-mingw32-gcc.exe" -DCMAKE_CXX_COMPILER="C:\llvm\llvm-mingw-20241001-ucrt-x86_64\bin\armv7-w64-mingw32-g++.exe" -DCMAKE_LINKER="C:\llvm\llvm-mingw-20241001-ucrt-x86_64\bin\armv7-w64-mingw32-ld.exe" -DCMAKE_RC_COMPILER="C:\\llvm\\llvm-mingw-20241001-ucrt-x86_64\\bin\\llvm-rc.exe" -G Ninja -B build -S .
cmake --build build --config Release
- name: Move build to release folder
run: |
mkdir release
mv build/CppShot.exe release/cppshot.exe
- name: Copy used redistributables
run: |
cp "C:\Program Files (x86)\windows kits\10\Redist\10.0.19041.0\ucrt\DLLs\arm\*" ./release/
- name: Upload release build
uses: actions/upload-artifact@v4
with:
name: cppshot-${{ matrix.config.name }}
path: ./release/
build-msvc:
strategy:
fail-fast: false
matrix:
config:
- name: arm64
platform: arm64
name: Build ${{ matrix.config.name }}
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure & Build
run: |
cmake -G "Visual Studio 16 2019" -B build -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.config.platform }} -S .
cmake --build build --config Release
- name: Upload release build
uses: actions/upload-artifact@v4
with:
name: cppshot-${{ matrix.config.name }}
path: ./build/Release/