Files
eden/.gitea/workflows/build.yml
ovosimpatico 10a83ad4c7
Some checks failed
Build Eden Emulator / build-windows (push) Failing after 8m52s
3
2025-12-26 22:46:02 -03:00

108 lines
3.0 KiB
YAML

name: Build Eden Emulator
on:
push:
branches:
- dev
workflow_dispatch:
jobs:
build-windows:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
ninja-build \
ccache \
git \
wget \
python3 \
python3-pip \
mingw-w64 \
wine64
# Install CPM dependencies
pip3 install --upgrade pip
- name: Setup ccache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-windows-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-windows-
- name: Setup CPM cache
uses: actions/cache@v4
with:
path: .cache/cpm
key: ${{ runner.os }}-cpm-${{ hashFiles('**/cpmfile.json') }}
restore-keys: |
${{ runner.os }}-cpm-
- name: Install MinGW toolchain
run: |
# Set up MinGW-w64 for cross-compilation
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: Configure CMake for Windows
run: |
cmake -S . -B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.gitea/toolchains/mingw-w64-x86_64.cmake \
-DYUZU_TESTS=OFF \
-DENABLE_QT_TRANSLATION=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build Eden
run: |
cmake --build build --parallel $(nproc)
- 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') != ''