Files
dusk/.gitea/workflows/build.yml
Dominic Masters 236e16aa6d
Some checks failed
Build Dusk / run-tests (push) Failing after 1s
Build Dusk / build-linux (push) Failing after 1s
Build Dusk / build-psp (push) Failing after 1s
Build Dusk / build-dolphin (push) Failing after 1s
Fix url format
2026-02-09 11:51:04 -06:00

157 lines
5.6 KiB
YAML

name: Build Dusk
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: YourWishes/checkout@main
- name: Install dependencies
run: |
apt-get update
apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev
- name: Configure CMake for tests
run: cmake -S . -B build -DDUSK_BUILD_TESTS=ON -DDUSK_TARGET_SYSTEM=linux
- name: Build tests
run: cmake --build build -- -j$(nproc)
- name: Run tests
run: ctest --output-on-failure --test-dir build
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: YourWishes/checkout@main
- name: Install dependencies
run: |
apt-get update
apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev
- name: Configure CMake
run: cmake -S . -B build -DDUSK_TARGET_SYSTEM=linux
- name: Build
run: cmake --build build -- -j$(nproc)
- name: List build output
run: ls -lh build
- name: Upload Linux binary
uses: YourWishes/upload-artifact
with:
name: dusk-linux
path: build/Dusk
if-no-files-found: error
build-psp:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: YourWishes/checkout@main
- name: Install dependencies
run: |
apt-get update
apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev
- name: Configure CMake
run: cmake -S . -B build -DDUSK_TARGET_SYSTEM=psp -DENABLE_TESTS=OFF
- name: Build
run: cmake --build build -- -j$(nproc)
- name: Move EBOOT.PBP to Dusk subfolder
run: |
mkdir -p build/gitea/Dusk
mv build/EBOOT.PBP build/gitea/Dusk/EBOOT.PBP
- name: List build output
run: ls -lh build/gitea/Dusk
- name: Upload PSP binary
uses: YourWishes/upload-artifact
with:
name: dusk-psp
path: build/gitea/
if-no-files-found: error
build-dolphin:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: YourWishes/checkout@main
- name: Install dependencies
run: |
# Install devkit pacman
if ! [ $(id -u) = 0 ]; then
echo "Need root privilege to install!"
exit 1
fi
# ensure apt is set up to work with https sources
apt-get install apt-transport-https
# Store devkitPro gpg key locally if we don't have it already
if ! [ -f /usr/share/keyring/devkitpro-pub.gpg ]; then
mkdir -p /usr/share/keyring/
wget -U "dkp apt" -O /usr/share/keyring/devkitpro-pub.gpg https://apt.devkitpro.org/devkitpro-pub.gpg
fi
# Add the devkitPro apt repository if we don't have it set up already
if ! [ -f /etc/apt/sources.list.d/devkitpro.list ]; then
echo "deb [signed-by=/usr/share/keyring/devkitpro-pub.gpg] https://apt.devkitpro.org stable main" > /etc/apt/sources.list.d/devkitpro.list
fi
apt-get update
apt-get install devkitpro-pacman --yes
apt-get install --yes build-essential cmake python3 python3-pip python3-polib python3-pil python3-dotenv python3-pyqt5 python3-opengl
sudo dkp-pacman -Syu --noconfirm
sudo dkp-pacman -S gamecube-dev wii-dev ppc-liblzma ppc-libzip --needed --noconfirm
- name: Build GameCube
run: |
export DEVKITPRO=/opt/devkitpro
export DEVKITPPC=/opt/devkitpro/devkitPPC
export PATH="$DEVKITPPC/bin:$DEVKITPRO/tools/bin:$PATH"
mkdir -p build-gamecube
cmake -S. -Bbuild-gamecube -DDUSK_TARGET_SYSTEM=gamecube -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/GameCube.cmake"
cd build-gamecube
make -j$(nproc) VERBOSE=1
- name: Copy GameCube
run: |
ls -l
mkdir -p build/gitea/GameCube/Dusk
mv build-gamecube/Dusk.dol build/gitea/GameCube/Dusk/Dusk.dol
mv build-gamecube/dusk.dsk build/gitea/GameCube/Dusk/dusk.dsk
- name: Upload GameCube Binary
uses: YourWishes/upload-artifact@main
with:
name: dusk-gamecube
path: build/gitea/GameCube
if-no-files-found: error
- name: Build Wii
run: |
export DEVKITPRO=/opt/devkitpro
export DEVKITPPC=/opt/devkitpro/devkitPPC
export PATH="$DEVKITPPC/bin:$DEVKITPRO/tools/bin:$PATH"
mkdir -p build-wii
cmake -S. -Bbuild-wii -DDUSK_TARGET_SYSTEM=wii -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/Wii.cmake"
cd build-wii
make -j$(nproc) VERBOSE=1
- name: Copy Wii
run: |
ls -l
mkdir -p build/gitea/Wii/apps/Dusk
mv build-wii/Dusk.dol build/gitea/Wii/apps/Dusk/boot.dol
mv build-wii/dusk.dsk build/gitea/Wii/apps/Dusk/dusk.dsk
cp .ci/dolphin/meta.xml build/gitea/Wii/apps/Dusk/meta.xml
- name: Upload Wii Binary
uses: YourWishes/upload-artifact@main
with:
name: dusk-wii
path: build/gitea/Wii
if-no-files-found: error