Files
eden/.gitea/workflows/build.yml
ovosimpatico c5643cb780
Some checks failed
Build Eden Emulator (Wine Native) / build-windows-wine (push) Failing after 15m57s
8
2025-12-27 04:51:30 -03:00

125 lines
3.9 KiB
YAML

name: Build Eden Emulator (Wine Native)
on:
push:
branches:
- dev
workflow_dispatch:
jobs:
build-windows-wine:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Wine and Dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y \
wget \
p7zip-full \
wine \
wine32 \
wine64 \
xvfb \
winbind
# Configure Wine
export DISPLAY=:99
Xvfb :99 -screen 0 1024x768x16 &
sleep 3
wineboot --init || true
sleep 5
- name: Download Windows Tools
run: |
mkdir -p tools
cd tools
# 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 patch.exe (needed for CPM)
mkdir -p utils
wget https://github.com/git-for-windows/git/releases/download/v2.47.1.windows.1/MinGit-2.47.1-64-bit.zip
unzip -q MinGit-2.47.1-64-bit.zip -d utils
- name: Setup Environment and Scripts
run: |
# Create configure script
echo "@echo off" > configure.bat
echo "set PATH=tools\llvm\bin;tools\cmake\bin;tools\ninja;tools\utils\usr\bin;%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" >> configure.bat
# Create build script
echo "@echo off" > build_eden.bat
echo "set PATH=tools\llvm\bin;tools\cmake\bin;tools\ninja;tools\utils\usr\bin;%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
- name: Prepare artifacts
run: |
mkdir -p artifacts
# Copy the built executable
if [ -f build/bin/eden.exe ]; then
cp build/bin/eden.exe artifacts/
fi
# Copy any additional runtime files
if [ -d build/bin ]; then
find build/bin -name "*.dll" -exec cp {} artifacts/ \;
fi
# Create a version file
echo "Build Date: $(date)" > artifacts/build_info.txt
echo "Commit: ${{ github.sha }}" >> artifacts/build_info.txt
echo "Branch: ${{ github.ref_name }}" >> artifacts/build_info.txt
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: eden-windows-${{ github.sha }}
path: artifacts/
retention-days: 30
- name: Upload executable only
uses: actions/upload-artifact@v4
with:
name: eden-windows-exe
path: artifacts/eden.exe
retention-days: 30
if: success() && hashFiles('artifacts/eden.exe') != ''