Revert to last working
Updated the Docker image for the build container and removed unnecessary steps for creating compiler shims. Added packaging of the dist folder as a ZIP file with the commit SHA.
This commit is contained in:
93
.github/workflows/build.yml
vendored
93
.github/workflows/build.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
|
|
||||||
# Minimal devkitA64 container, apparently dkp-toolchain isn't needed?
|
# Minimal devkitA64 container, apparently dkp-toolchain isn't needed?
|
||||||
container:
|
container:
|
||||||
image: devkitpro/toolchain-base:20250727
|
image: devkitpro/devkita64:20251231
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository and submodules # needed for hoc-clk
|
- name: Checkout repository and submodules # needed for hoc-clk
|
||||||
@@ -21,9 +21,9 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
|
||||||
- name: install switch-dev
|
# -------------------------------------------------
|
||||||
run: dkp-pacman -Syu switch-dev --noconfirm
|
# Fix PATH for devkitA64 and devkitARM
|
||||||
|
# -------------------------------------------------
|
||||||
- name: Set devkitPro PATH
|
- name: Set devkitPro PATH
|
||||||
run: |
|
run: |
|
||||||
echo "DEVKITPRO=/opt/devkitpro" >> $GITHUB_ENV
|
echo "DEVKITPRO=/opt/devkitpro" >> $GITHUB_ENV
|
||||||
@@ -44,58 +44,21 @@ jobs:
|
|||||||
apt-get install -y ccache
|
apt-get install -y ccache
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Create compiler shims
|
# -------------------------------------------------
|
||||||
run: | #I deeply hate this from my heart
|
# Get short commit SHA
|
||||||
# aarch64 gcc
|
# -------------------------------------------------
|
||||||
mv /opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc /opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc.real
|
|
||||||
cat > /opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc <<'EOF'
|
|
||||||
#!/bin/sh
|
|
||||||
exec ccache /opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc.real "$@"
|
|
||||||
EOF
|
|
||||||
chmod +x /opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc
|
|
||||||
|
|
||||||
# aarch64 g++
|
|
||||||
mv /opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++ /opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++.real
|
|
||||||
cat > /opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++ <<'EOF'
|
|
||||||
#!/bin/sh
|
|
||||||
exec ccache /opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++.real "$@"
|
|
||||||
EOF
|
|
||||||
chmod +x /opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++
|
|
||||||
|
|
||||||
# arm gcc
|
|
||||||
mv /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc.real
|
|
||||||
cat > /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc <<'EOF'
|
|
||||||
#!/bin/sh
|
|
||||||
exec ccache /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc.real "$@"
|
|
||||||
EOF
|
|
||||||
chmod +x /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc
|
|
||||||
|
|
||||||
# arm g++
|
|
||||||
mv /opt/devkitpro/devkitARM/bin/arm-none-eabi-g++ /opt/devkitpro/devkitARM/bin/arm-none-eabi-g++.real
|
|
||||||
cat > /opt/devkitpro/devkitARM/bin/arm-none-eabi-g++ <<'EOF'
|
|
||||||
#!/bin/sh
|
|
||||||
exec ccache /opt/devkitpro/devkitARM/bin/arm-none-eabi-g++.real "$@"
|
|
||||||
EOF
|
|
||||||
chmod +x /opt/devkitpro/devkitARM/bin/arm-none-eabi-g++
|
|
||||||
|
|
||||||
cat $(which arm-none-eabi-g++)
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Set commit SHA
|
- name: Set commit SHA
|
||||||
id: vars
|
id: vars
|
||||||
run: echo "SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
|
run: echo "SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Clone Atmosphere
|
- name: Clone Atmosphere
|
||||||
run: git clone --depth=1 --single-branch https://github.com/Atmosphere-NX/Atmosphere.git atmosphere -b $(cat ams_ver.txt)
|
run: git clone --depth=1 --single-branch https://github.com/Atmosphere-NX/Atmosphere.git atmosphere -b $(cat ams_ver.txt)
|
||||||
|
|
||||||
- name: Prepare build folder
|
- name: Prepare build folder
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cp -r atmosphere/* build/
|
cp -r atmosphere/* build/
|
||||||
|
|
||||||
# -------------------------------------------------
|
|
||||||
# Override loader source
|
|
||||||
# -------------------------------------------------
|
|
||||||
- name: Override ldr_process_creation.cpp
|
- name: Override ldr_process_creation.cpp
|
||||||
run: |
|
run: |
|
||||||
cp -rf Source/Atmosphere/stratosphere/loader/source/* build/stratosphere/loader/source/
|
cp -rf Source/Atmosphere/stratosphere/loader/source/* build/stratosphere/loader/source/
|
||||||
@@ -104,10 +67,9 @@ jobs:
|
|||||||
uses: actions/cache@v5.0.3
|
uses: actions/cache@v5.0.3
|
||||||
with:
|
with:
|
||||||
path: /root/.cache/ccache
|
path: /root/.cache/ccache
|
||||||
key: ccache-${{ runner.os }}-devkitpro-ams-${{ hashFiles('ams_ver.txt') }} # last key was utter garbage, stick to ams versions
|
key: ccache-${{ runner.os }}-devkitpro-ams-${{ hashFiles('ams_ver.txt') }} # last key was utter garbage, stick to ams versions,
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
ccache-${{ runner.os }}-devkitpro-
|
ccache-${{ runner.os }}-devkitpro-
|
||||||
save-always: true
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
run: |
|
run: |
|
||||||
@@ -120,6 +82,9 @@ jobs:
|
|||||||
- name: Build hoc-clk sysmodule and overlay
|
- name: Build hoc-clk sysmodule and overlay
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
export CC="ccache aarch64-none-elf-gcc"
|
||||||
|
export CXX="ccache aarch64-none-elf-g++"
|
||||||
|
|
||||||
ROOT_DIR="$GITHUB_WORKSPACE/Source/sys-clk"
|
ROOT_DIR="$GITHUB_WORKSPACE/Source/sys-clk"
|
||||||
DIST_DIR="$ROOT_DIR/dist"
|
DIST_DIR="$ROOT_DIR/dist"
|
||||||
|
|
||||||
@@ -133,7 +98,7 @@ jobs:
|
|||||||
echo "TITLE_ID: $TITLE_ID"
|
echo "TITLE_ID: $TITLE_ID"
|
||||||
|
|
||||||
pushd "$ROOT_DIR/sysmodule"
|
pushd "$ROOT_DIR/sysmodule"
|
||||||
make -j$(($(nproc) * 4))
|
make -j$(($(nproc) * 2)) CXX="ccache aarch64-none-elf-g++" CC="ccache aarch64-none-elf-gcc"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
mkdir -p "$DIST_DIR/atmosphere/contents/$TITLE_ID/flags"
|
mkdir -p "$DIST_DIR/atmosphere/contents/$TITLE_ID/flags"
|
||||||
@@ -151,7 +116,7 @@ jobs:
|
|||||||
echo "*** overlay ***"
|
echo "*** overlay ***"
|
||||||
|
|
||||||
pushd "$ROOT_DIR/overlay"
|
pushd "$ROOT_DIR/overlay"
|
||||||
make -j$(($(nproc) * 4))
|
make -j$(($(nproc) * 2)) CXX="ccache aarch64-none-elf-g++" CC="ccache aarch64-none-elf-gcc"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
mkdir -p "$DIST_DIR/switch/.overlays"
|
mkdir -p "$DIST_DIR/switch/.overlays"
|
||||||
@@ -175,26 +140,12 @@ jobs:
|
|||||||
- name: Build kip
|
- name: Build kip
|
||||||
working-directory: build/stratosphere/loader
|
working-directory: build/stratosphere/loader
|
||||||
run: |
|
run: |
|
||||||
make -j$(($(nproc) * 4))
|
export CC="ccache aarch64-none-elf-gcc"
|
||||||
|
export CXX="ccache aarch64-none-elf-g++"
|
||||||
|
make -j$(($(nproc) * 4)) CXX="ccache aarch64-none-elf-g++" CC="ccache aarch64-none-elf-gcc"
|
||||||
hactool -t kip1 out/nintendo_nx_arm64_armv8a/release/loader.kip --uncompress=hoc.kip
|
hactool -t kip1 out/nintendo_nx_arm64_armv8a/release/loader.kip --uncompress=hoc.kip
|
||||||
cp hoc.kip ../../../dist/atmosphere/kips/hoc.kip
|
cp hoc.kip ../../../dist/atmosphere/kips/hoc.kip
|
||||||
|
|
||||||
- name: Build exosphere
|
|
||||||
working-directory: build/exosphere
|
|
||||||
run: |
|
|
||||||
export PATCHES="../../Source/Atmosphere-Patches"
|
|
||||||
export ROOT=".."
|
|
||||||
cp "$PATCHES/secmon_memory_layout.hpp" "$ROOT/libraries/libexosphere/include/exosphere/secmon/"
|
|
||||||
cp "$PATCHES/secmon_emc_access_table_data.inc" "$ROOT/exosphere/program/source/smc/"
|
|
||||||
cp "$PATCHES/secmon_define_emc_access_table.inc" "$ROOT/exosphere/program/source/smc/"
|
|
||||||
cp "$PATCHES/secmon_smc_register_access.cpp" "$ROOT/exosphere/program/source/smc/"
|
|
||||||
cp "$PATCHES/secmon_define_soctherm_access_table.inc" "$ROOT/exosphere/program/source/smc/"
|
|
||||||
cp "$PATCHES/secmon_soctherm_access_table_data.inc" "$ROOT/exosphere/program/source/smc/"
|
|
||||||
|
|
||||||
# build without ams for now
|
|
||||||
make -j$(($(nproc) * 4))
|
|
||||||
cp ./out/nintendo_nx_arm64_armv8a/release/exosphere.bin ../../dist/
|
|
||||||
|
|
||||||
- name: ccache stats
|
- name: ccache stats
|
||||||
run: ccache --show-stats
|
run: ccache --show-stats
|
||||||
|
|
||||||
@@ -202,6 +153,16 @@ jobs:
|
|||||||
# -------------------------------------------------
|
# -------------------------------------------------
|
||||||
# Package dist folder as ZIP with commit SHA
|
# 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
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v6
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user