Some checks failed
Build Eden Emulator (Wine Native) / build-windows-wine (push) Failing after 15m18s
119 lines
3.6 KiB
YAML
119 lines
3.6 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
|
|
|
|
# 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/
|
|
|
|
- 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;%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;%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') != ''
|