-
Notifications
You must be signed in to change notification settings - Fork 22
184 lines (158 loc) · 5.58 KB
/
ci.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: CI
on:
push:
pull_request:
jobs:
build-on-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.24.x'
- name: Test cmake version
run: cmake --version
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
freeglut3-dev \
g++ \
libcurl4-openssl-dev \
libfontconfig-dev \
libgl1-mesa-dev \
libgtk2.0-dev \
mesa-common-dev \
unzip
- name: Set relative paths
run: |
WXMSW3=$GITHUB_WORKSPACE/wx-3.2.3
echo "WXMSW3=$WXMSW3" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
- name: Install wxWidgets
run: |
curl -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxWidgets-3.2.3.tar.bz2 -o wxWidgets-3.2.3.tar.bz2
tar jxf wxWidgets-3.2.3.tar.bz2
cd wxWidgets-3.2.3
./configure --prefix=$GITHUB_WORKSPACE/wx-3.2.3 --enable-shared=no --enable-debug=no --with-gtk=2 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --without-libjbig --without-liblzma --without-gtkprint --with-libnotify=no --with-libmspack=no --with-gnomevfs=no --with-opengl=yes --with-sdl=no --with-cxx=11
make -j4
make install
sudo ln -s $GITHUB_WORKSPACE/wx-3.2.3/bin/wx-config /usr/local/bin/wx-config-3
wx-config-3 --cflags
echo ${GITHUB_WORKSPACE}/wx-3.2.3/bin >> $GITHUB_PATH
- name: Save wxWidgets build
uses: actions/upload-artifact@v4
with:
name: wxWidgets-linux
path: |
wx-3.2.3
- name: Build LK
run: |
cmake -Bbuild_linux -DCMAKE_BUILD_TYPE=Debug
cmake --build build_linux -- -j4
- name: Save static lib & lksandbox
uses: actions/upload-artifact@v4
with:
name: LK-linux
path: |
build_linux/lk_sandbox*
build_linux/lk*.a
build-on-windows:
runs-on: windows-latest
steps:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Set relative paths
shell: bash
run: |
WXMSW3=$GITHUB_WORKSPACE/wxWidgets-3.2.3
echo "WXMSW3=$WXMSW3" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
- name: Download wxWidgets
shell: bash
run: |
curl -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxWidgets-3.2.3.tar.bz2 -o wxWidgets-3.2.3.tar.bz2
ls
tar jxf wxWidgets-3.2.3.tar.bz2
- name: Install wxWidgets
run: |
cd wxWidgets-3.2.3
msbuild build/msw/wx_vc17.sln /t:Build /p:Configuration=Release /p:Platform=x64
- name: Make wxWidgets archive
shell: bash
run: |
mkdir wx-3.2.3
mkdir -p wx-3.2.3/build/msw
cp -r wxWidgets-3.2.3/build/msw/vc_* wx-3.2.3/build/msw
cp -r wxWidgets-3.2.3/include wx-3.2.3
cp -r wxWidgets-3.2.3/lib wx-3.2.3
- name: Save wxWidgets build
uses: actions/upload-artifact@v4
with:
name: wxWidgets-windows
path: |
wx-3.2.3
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.24.x'
- name: Build LK
run: |
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_SYSTEM_VERSION=10.0 ..
MSBuild.exe .\lk.sln /t:Build /p:Configuration=Release
- name: Save static lib & lksandbox
uses: actions/upload-artifact@v4
with:
name: LK-windows
path: |
build/Release/lk_sandbox*
build/Release/lk*.a
build-on-mac:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14-large, macos-latest]
steps:
- name: Set relative paths
run: |
WXMSW3=$GITHUB_WORKSPACE/wx-3.2.3
echo "WXMSW3=$WXMSW3" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
- name: Install wxWidgets
run: |
curl -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxWidgets-3.2.3.tar.bz2 -o wxWidgets-3.2.3.tar.bz2
tar jxf wxWidgets-3.2.3.tar.bz2
cd wxWidgets-3.2.3
./configure --prefix=$GITHUB_WORKSPACE/wx-3.2.3 --enable-stl=yes --enable-shared=no --disable-debug_flag --with-cocoa --enable-universal_binary=x86_64,arm64 --enable-unicode --enable-webview --disable-mediactrl --with-cxx=11 --with-macosx-version-min=10.15 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin
make -j3
make install
sudo ln -s $GITHUB_WORKSPACE/wx-3.2.3/bin/wx-config /usr/local/bin/wx-config-3
wx-config-3 --cflags
echo ${GITHUB_WORKSPACE}/wx-3.2.3/bin >> $GITHUB_PATH
- name: Save wxWidgets build
uses: actions/upload-artifact@v4
with:
name: wxWidgets-${{ matrix.os }}
path: |
wx-3.2.3
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.24.x'
- name: Build LK
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build -- -j3
- name: Save static lib & lksandbox
uses: actions/upload-artifact@v4
with:
name: LK-${{ matrix.os }}
path: |
build/lk_sandbox*
build/lk*.a