mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
- Add missing MSYS2 packages to CI: vulkan-loader, vulkan-headers, shaderc, stormlib (both x86-64 and arm64), unicorn (arm64) - Make vulkan-1.dll copy conditional via find_file (fixes MSYS2 builds) - Use find_library for wininet/bz2 in asset_extract (graceful fallback) - Add extract_assets.ps1 and extract_assets.bat for Windows users - Expand BUILD_INSTRUCTIONS.md with MSYS2, vcpkg, and macOS sections - Update README.md to reference Windows scripts and platforms
277 lines
8.3 KiB
YAML
277 lines
8.3 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build (${{ matrix.arch }})
|
|
runs-on: ${{ matrix.runner }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- arch: x86-64
|
|
runner: ubuntu-24.04
|
|
deb_arch: amd64
|
|
- arch: arm64
|
|
runner: ubuntu-24.04-arm
|
|
deb_arch: arm64
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Cache apt packages
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /var/cache/apt/archives/*.deb
|
|
key: apt-${{ matrix.arch }}-${{ hashFiles('.github/workflows/build.yml') }}
|
|
restore-keys: apt-${{ matrix.arch }}-
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
cmake \
|
|
build-essential \
|
|
pkg-config \
|
|
libsdl2-dev \
|
|
libglew-dev \
|
|
libglm-dev \
|
|
libssl-dev \
|
|
zlib1g-dev \
|
|
libavformat-dev \
|
|
libavcodec-dev \
|
|
libswscale-dev \
|
|
libavutil-dev \
|
|
libunicorn-dev \
|
|
libx11-dev
|
|
sudo apt-get install -y libstormlib-dev || true
|
|
|
|
- name: Configure
|
|
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: Build
|
|
run: cmake --build build --parallel $(nproc)
|
|
|
|
- name: Package (DEB)
|
|
run: cd build && cpack -G DEB
|
|
|
|
- name: Upload DEB
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: wowee-linux-${{ matrix.arch }}-deb
|
|
path: build/wowee-*.deb
|
|
if-no-files-found: error
|
|
|
|
build-macos:
|
|
name: Build (macOS ${{ matrix.arch }})
|
|
runs-on: ${{ matrix.runner }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- arch: arm64
|
|
runner: macos-15
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install cmake pkg-config sdl2 glew glm openssl@3 zlib ffmpeg unicorn \
|
|
stormlib dylibbundler || true
|
|
# dylibbundler may not be in all brew mirrors; install separately to not block others
|
|
brew install dylibbundler 2>/dev/null || true
|
|
|
|
- name: Configure
|
|
run: |
|
|
BREW=$(brew --prefix)
|
|
export PKG_CONFIG_PATH="$BREW/lib/pkgconfig:$(brew --prefix ffmpeg)/lib/pkgconfig:$(brew --prefix openssl@3)/lib/pkgconfig"
|
|
cmake -S . -B build \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_PREFIX_PATH="$BREW" \
|
|
-DOPENSSL_ROOT_DIR="$(brew --prefix openssl@3)"
|
|
|
|
- name: Build
|
|
run: cmake --build build --parallel $(sysctl -n hw.logicalcpu)
|
|
|
|
- name: Create .app bundle
|
|
run: |
|
|
mkdir -p Wowee.app/Contents/{MacOS,Frameworks,Resources}
|
|
|
|
# Wrapper launch script — cd to MacOS/ so ./assets/ resolves correctly
|
|
printf '#!/bin/bash\ncd "$(dirname "$0")"\nexec ./wowee_bin "$@"\n' \
|
|
> Wowee.app/Contents/MacOS/wowee
|
|
chmod +x Wowee.app/Contents/MacOS/wowee
|
|
|
|
# Actual binary
|
|
cp build/bin/wowee Wowee.app/Contents/MacOS/wowee_bin
|
|
|
|
# Assets (exclude proprietary music)
|
|
rsync -a --exclude='Original Music' build/bin/assets/ \
|
|
Wowee.app/Contents/MacOS/assets/
|
|
|
|
# Bundle dylibs (if dylibbundler available)
|
|
if command -v dylibbundler &>/dev/null; then
|
|
dylibbundler -od -b \
|
|
-x Wowee.app/Contents/MacOS/wowee_bin \
|
|
-d Wowee.app/Contents/Frameworks/ \
|
|
-p @executable_path/../Frameworks/
|
|
fi
|
|
|
|
# Info.plist
|
|
cat > Wowee.app/Contents/Info.plist << 'EOF'
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
|
|
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0"><dict>
|
|
<key>CFBundleExecutable</key><string>wowee</string>
|
|
<key>CFBundleIdentifier</key><string>com.wowee.app</string>
|
|
<key>CFBundleName</key><string>Wowee</string>
|
|
<key>CFBundleVersion</key><string>1.0.0</string>
|
|
<key>CFBundleShortVersionString</key><string>1.0.0</string>
|
|
<key>CFBundlePackageType</key><string>APPL</string>
|
|
</dict></plist>
|
|
EOF
|
|
|
|
# Ad-hoc codesign (allows running on the local machine)
|
|
codesign --force --deep --sign - Wowee.app
|
|
|
|
- name: Create DMG
|
|
run: hdiutil create -volname Wowee -srcfolder Wowee.app -ov -format UDZO Wowee.dmg
|
|
|
|
- name: Upload DMG
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: wowee-macos-${{ matrix.arch }}-dmg
|
|
path: Wowee.dmg
|
|
if-no-files-found: error
|
|
|
|
build-windows-arm:
|
|
name: Build (windows-arm64)
|
|
runs-on: windows-11-arm
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up MSYS2
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: CLANGARM64
|
|
update: false
|
|
install: >-
|
|
mingw-w64-clang-aarch64-cmake
|
|
mingw-w64-clang-aarch64-clang
|
|
mingw-w64-clang-aarch64-ninja
|
|
mingw-w64-clang-aarch64-pkgconf
|
|
mingw-w64-clang-aarch64-SDL2
|
|
mingw-w64-clang-aarch64-glew
|
|
mingw-w64-clang-aarch64-glm
|
|
mingw-w64-clang-aarch64-openssl
|
|
mingw-w64-clang-aarch64-zlib
|
|
mingw-w64-clang-aarch64-ffmpeg
|
|
mingw-w64-clang-aarch64-unicorn
|
|
mingw-w64-clang-aarch64-vulkan-loader
|
|
mingw-w64-clang-aarch64-vulkan-headers
|
|
mingw-w64-clang-aarch64-shaderc
|
|
mingw-w64-clang-aarch64-stormlib
|
|
git
|
|
|
|
- name: Configure
|
|
shell: msys2 {0}
|
|
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: Build
|
|
shell: msys2 {0}
|
|
run: cmake --build build --parallel $(nproc)
|
|
|
|
- name: Bundle DLLs
|
|
shell: msys2 {0}
|
|
run: |
|
|
ldd build/bin/wowee.exe \
|
|
| awk '/=> \// { print $3 }' \
|
|
| grep -iv '^/c/Windows' \
|
|
| xargs -I{} sh -c 'cp -n "{}" build/bin/ 2>/dev/null || true'
|
|
|
|
- name: Package (ZIP)
|
|
shell: msys2 {0}
|
|
run: cd build && cpack -G ZIP
|
|
|
|
- name: Upload ZIP
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: wowee-windows-arm64-zip
|
|
path: build/wowee-*.zip
|
|
if-no-files-found: error
|
|
|
|
build-windows:
|
|
name: Build (windows-x86-64)
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up MSYS2
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW64
|
|
update: false
|
|
install: >-
|
|
mingw-w64-x86_64-cmake
|
|
mingw-w64-x86_64-gcc
|
|
mingw-w64-x86_64-ninja
|
|
mingw-w64-x86_64-pkgconf
|
|
mingw-w64-x86_64-SDL2
|
|
mingw-w64-x86_64-glew
|
|
mingw-w64-x86_64-glm
|
|
mingw-w64-x86_64-openssl
|
|
mingw-w64-x86_64-zlib
|
|
mingw-w64-x86_64-ffmpeg
|
|
mingw-w64-x86_64-unicorn
|
|
mingw-w64-x86_64-vulkan-loader
|
|
mingw-w64-x86_64-vulkan-headers
|
|
mingw-w64-x86_64-shaderc
|
|
mingw-w64-x86_64-stormlib
|
|
mingw-w64-x86_64-nsis
|
|
git
|
|
|
|
- name: Configure
|
|
shell: msys2 {0}
|
|
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: Build
|
|
shell: msys2 {0}
|
|
run: cmake --build build --parallel $(nproc)
|
|
|
|
- name: Bundle DLLs
|
|
shell: msys2 {0}
|
|
run: |
|
|
ldd build/bin/wowee.exe \
|
|
| awk '/=> \// { print $3 }' \
|
|
| grep -iv '^/c/Windows' \
|
|
| xargs -I{} sh -c 'cp -n "{}" build/bin/ 2>/dev/null || true'
|
|
|
|
- name: Package (NSIS)
|
|
shell: msys2 {0}
|
|
run: cd build && cpack -G NSIS
|
|
|
|
- name: Upload installer
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: wowee-windows-x86-64-installer
|
|
path: build/wowee-*.exe
|
|
if-no-files-found: error
|