-
Notifications
You must be signed in to change notification settings - Fork 15
44 lines (39 loc) · 1.71 KB
/
build_windows.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
name: Build - Windows
on: [push, pull_request, workflow_dispatch]
jobs:
mingw:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- name: Install repo dependencies
run: |
sudo apt-get update && sudo apt-get install -y g++-mingw-w64 gettext
sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
- name: Install prebuilt dependencies
run: curl -L 'https://github.com/mmatyas/openblok/releases/download/v0.6.0/windep.tar.xz' | sudo tar xJf - -C /opt/
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Configure
run: cmake
-DCMAKE_BUILD_TYPE=Release
-DINSTALL_PORTABLE=ON
-DCMAKE_INSTALL_PREFIX=/
-DCMAKE_CXX_FLAGS=-I/opt/sdl2/include
-DCMAKE_TOOLCHAIN_FILE=/opt/toolchain.cmake
-DCMAKE_EXE_LINKER_FLAGS='-static-libgcc -static-libstdc++'
- name: Build
run: make VERBOSE=1
- name: Deploy
run: |
make install DESTDIR=$PWD/install
i686-w64-mingw32-objdump -p install/openblok.exe | grep 'DLL Name' | sort
cp -av ./*.md /opt/sdl2/bin/*.dll /usr/i686-w64-mingw32/lib/libwinpthread-1.dll install/
(cd install && rm libFLAC* libmod* libopus* libtiff* libwebp*)
mv install openblok && zip -r openblok.zip openblok
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows
path: openblok.zip