From 6ce418e0ecf2eca5f35ce1a1f9a7bd65a3d1b784 Mon Sep 17 00:00:00 2001 From: Zachary Hall Date: Sun, 20 Oct 2024 13:29:32 -0700 Subject: [PATCH] Add Windows build to workflows --- .forgejo/workflows/compile.yaml | 20 ++++++++++++++++++++ build-protoc.sh | 6 ++++++ 2 files changed, 26 insertions(+) create mode 100755 build-protoc.sh diff --git a/.forgejo/workflows/compile.yaml b/.forgejo/workflows/compile.yaml index a46ae0e..c639a70 100644 --- a/.forgejo/workflows/compile.yaml +++ b/.forgejo/workflows/compile.yaml @@ -68,3 +68,23 @@ jobs: with: name: debug-artifacts path: ${{ steps.debugApk.outputs.apkFile }} + build-windows: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + with: + submodules: recursive + ref: main + fetch-depth: 0 + - name: Build protoc + run: ./build-protoc.sh + - name: Install MinGW compiler + run: apt-get install gcc-mingw-w64 g++-mingw-w64 -y + - name: Build with CMake + run: mkdir -p build-windows && cd build-windows && cmake .. -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-gcc -G Ninja -DDISABLE_GTK_UI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_LIBFMT=ON -DUSE_PORTALS=OFF -DENABLE_DBUS=OFF -DBUILD_STATIC=ON -DDOWNLOAD_AUDIO_CODECS_DEPENDENCY=ON -DSDL_MIXER_X_SHARED=OFF -DSDL_MIXER_X_STATIC=ON -DUSE_OGG_VORBIS_STB=ON -DUSE_OPUS=OFF -DUSE_MODPLUG=OFF -DUSE_GME=OFF -DUSE_WAVPACK=OFF -DUSE_XMP=OFF -DUSE_MIDI_EDMIDI=OFF -DUSE_SYSTEM_SDL2=OFF -DBUILD_PROTOC=OFF -DBUILD_SDL=ON -DBUILD_SDL_IMAGE=ON -DBUILD_JSONCPP=ON -DBUILD_SOUNDTOUCH=ON -DBUILD_PROTOBUF=ON -DDISABLE_IMGUI_UI=OFF && ninja && cd .. + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: windows-artifacts + path: build-windows/looper.exe diff --git a/build-protoc.sh b/build-protoc.sh new file mode 100755 index 0000000..7dfbd37 --- /dev/null +++ b/build-protoc.sh @@ -0,0 +1,6 @@ +#!/bin/bash +pushd subprojects/protobuf +./configure +make +make install +make distclean