Files
Horizon-OC/.github/workflows/build.yml
souldbminersmwc 39366ce238 Update build.yml
2026-01-31 18:40:33 -05:00

94 lines
3.1 KiB
YAML

name: Build Horizon OC Zeus
on:
push:
branches: [ develop, main, master ]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container:
image: devkitpro/devkitpro-ci:latest
steps:
# -------------------------------------------------
# Verify toolchain
# -------------------------------------------------
- name: Check environment
run: |
echo "DEVKITPRO = $DEVKITPRO"
aarch64-none-elf-gcc --version
arm-none-eabi-gcc --version
python3 --version
make --version
hactool --help >/dev/null
zip --version >/dev/null
# -------------------------------------------------
# Get short commit SHA for naming
# -------------------------------------------------
- name: Set commit SHA
id: vars
run: echo "SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
# -------------------------------------------------
# Clone Atmosphère
# -------------------------------------------------
- name: Clone Atmosphere
run: git clone https://github.com/Atmosphere-NX/Atmosphere.git atmosphere
# -------------------------------------------------
# Clone Horizon OC (develop branch)
# -------------------------------------------------
- name: Clone Horizon OC
run: git clone -b develop --single-branch https://github.com/Horizon-OC/Horizon-OC.git horizon-oc
# -------------------------------------------------
# Prepare build folder
# -------------------------------------------------
- name: Prepare build folder
working-directory: horizon-oc
run: |
mkdir -p build
cp -r ../atmosphere/. build/
# -------------------------------------------------
# Override loader source
# -------------------------------------------------
- name: Override ldr_process_creation.cpp
working-directory: horizon-oc
run: |
cp -f Source/Atmosphere/stratosphere/loader/source/ldr_process_creation.cpp \
build/stratosphere/loader/source/ldr_process_creation.cpp
# -------------------------------------------------
# Build Horizon OC Zeus
# -------------------------------------------------
- name: Build Horizon OC Zeus
working-directory: horizon-oc
run: |
chmod +x build.sh
./build.sh
# -------------------------------------------------
# Package dist folder as ZIP with commit SHA
# -------------------------------------------------
- name: Package dist
working-directory: horizon-oc
run: |
ZIP_NAME="horizon-oc-zeus-dist-${SHORT_SHA}.zip"
zip -r "$ZIP_NAME" dist
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
# -------------------------------------------------
# Upload ZIP artifact
# -------------------------------------------------
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: horizon-oc-zeus-dist
path: horizon-oc/${{ env.ZIP_NAME }}