15
Some checks failed
Build Eden Emulator / build-windows (push) Failing after 1m32s

This commit is contained in:
2025-12-27 19:32:25 -03:00
parent a7f03402cd
commit cb56eb8ee9

View File

@@ -1,4 +1,4 @@
name: Build Eden Emulator (Wine Native)
name: Build Eden Emulator
on:
push:
@@ -7,8 +7,8 @@ on:
workflow_dispatch:
jobs:
build-windows-wine:
runs-on: ubuntu-latest
build-windows:
runs-on: windows-amd64
steps:
- name: Checkout repository
@@ -17,113 +17,36 @@ jobs:
submodules: recursive
fetch-depth: 0
- name: Install Wine and Dependencies
- name: Install dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y \
wget \
p7zip-full \
wine \
wine32 \
wine64 \
xvfb \
winbind \
zstd
# Assuming chocolatey or winget is available, or just use what's on the runner.
# Many runners have CMake and Ninja pre-installed.
choco install ninja cmake -y --no-progress
# Configure Wine
export DISPLAY=:99
Xvfb :99 -screen 0 1024x768x16 &
sleep 3
wineboot --init || true
sleep 5
- name: Download Windows Tools
- name: Configure CMake
shell: cmd
run: |
mkdir -p tools
cd tools
cmake -S . -B build -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release -DYUZU_TESTS=OFF -DENABLE_QT_TRANSLATION=ON -DYUZU_USE_BUNDLED_OPENSSL=ON -DYUZU_USE_BUNDLED_FFMPEG=ON -DYUZU_USE_BUNDLED_SDL2=ON -DYUZU_USE_BUNDLED_QT=ON -DYUZU_USE_CPM=ON
# Download LLVM-MinGW (Windows Toolchain)
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20240619/llvm-mingw-20240619-ucrt-x86_64.zip
unzip -q llvm-mingw-20240619-ucrt-x86_64.zip
mv llvm-mingw-20240619-ucrt-x86_64 llvm
# Download CMake (Windows)
wget https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-windows-x86_64.zip
unzip -q cmake-3.29.2-windows-x86_64.zip
mv cmake-3.29.2-windows-x86_64 cmake
# Download Ninja (Windows)
wget https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip
unzip -q ninja-win.zip
mkdir ninja
mv ninja.exe ninja/
# Download BusyBox (provides patch, tar, etc.)
mkdir -p utils
wget https://frippery.org/files/busybox/busybox.exe -O utils/busybox.exe
cp utils/busybox.exe utils/patch.exe
cp utils/busybox.exe utils/tar.exe
cp utils/busybox.exe utils/unzip.exe
cp utils/busybox.exe utils/sh.exe
# Download Python (Windows Embeddable)
wget https://www.python.org/ftp/python/3.12.3/python-3.12.3-embed-amd64.zip
unzip -q python-3.12.3-embed-amd64.zip -d python
# Enable site-packages in embeddable python (needed for some scripts)
sed -i 's/#import site/import site/' python/python312._pth
# Download libiconv (needed for FFmpeg)
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-libiconv-1.18-1-any.pkg.tar.zst
# Extract zst using tar (if system tar supports it) or zstd
# We installed p7zip-full, but tar with zstd is cleaner if available.
# Let's install zstd in the apt step.
tar -I zstd -xf mingw-w64-x86_64-libiconv-1.18-1-any.pkg.tar.zst -C tools/
# The package extracts to mingw64/, move it to iconv/
mv tools/mingw64 tools/iconv
- name: Setup Environment and Scripts
- name: Build Eden
shell: cmd
run: |
# Patch libusb CMakeLists.txt to use native CMake build instead of autoconf on MinGW
sed -i 's/if (MINGW OR PLATFORM_LINUX OR APPLE)/if (PLATFORM_LINUX OR APPLE)/' externals/libusb/CMakeLists.txt
# Create configure script
echo "@echo off" > configure.bat
echo "set PATH=tools\llvm\bin;tools\cmake\bin;tools\ninja;tools\python;tools\utils;%PATH%" >> configure.bat
echo "set CC=clang" >> configure.bat
echo "set CXX=clang++" >> configure.bat
echo "cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_OPENSSL=ON -DYUZU_USE_BUNDLED_FFMPEG=ON -DYUZU_USE_BUNDLED_SDL2=ON -DYUZU_USE_BUNDLED_QT=ON -DYUZU_USE_CPM=ON -DCMAKE_PREFIX_PATH=\"tools\llvm\x86_64-w64-mingw32;tools\iconv\"" >> configure.bat
# Create build script
echo "@echo off" > build_eden.bat
echo "set PATH=tools\llvm\bin;tools\cmake\bin;tools\ninja;tools\python;tools\utils;%PATH%" >> build_eden.bat
echo "cmake --build build --config Release" >> build_eden.bat
- name: Configure (Wine Native)
env:
DISPLAY: :99
run: |
wine cmd /c configure.bat
- name: Build (Wine Native)
env:
DISPLAY: :99
run: |
wine cmd /c build_eden.bat
cmake --build build --config Release --parallel
- name: Prepare artifacts
shell: bash
run: |
mkdir -p artifacts
# Copy the built executable
if [ -f build/bin/eden.exe ]; then
cp build/bin/eden.exe artifacts/
if [ -f build/bin/eden.exe ]; then # VS generator puts it in Release/ or similar
cp build/bin/Release/eden.exe artifacts/ || cp build/bin/eden.exe artifacts/
fi
# Copy any additional runtime files
# Copy any additional runtime files (DLLs)
# With bundled dependencies, they usually get copied to bin/
if [ -d build/bin ]; then
find build/bin -name "*.dll" -exec cp {} artifacts/ \;
find build/bin -name "*.dll" -exec cp {} artifacts/ \;
fi
# Create a version file