2021-01-01 21:30:01 +01:00
|
|
|
name: Build binaries
|
|
|
|
|
2021-02-04 17:53:49 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- 'HBC/**'
|
|
|
|
- 'Languages/**'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'HBC/**'
|
|
|
|
- 'Languages/**'
|
2021-01-01 21:30:01 +01:00
|
|
|
|
|
|
|
jobs:
|
2021-04-04 20:00:03 +02:00
|
|
|
download-build-tools:
|
2021-01-01 21:30:01 +01:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
2021-04-04 20:00:03 +02:00
|
|
|
- name: Restore cache
|
2021-01-01 21:30:01 +01:00
|
|
|
id: cache-1
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: cache
|
|
|
|
key: ${{ runner.os }}-cache-1
|
|
|
|
|
2021-08-01 19:00:18 +02:00
|
|
|
- name: Download devkitPPC r39, libogc 2.3.1 and required tools
|
2021-01-01 21:30:01 +01:00
|
|
|
if: steps.cache-1.outputs.cache-hit != 'true'
|
2021-04-04 20:00:03 +02:00
|
|
|
# general-tools is needed for bin2s and gamecube-tools is needed for elf2dol & gcdsptool
|
2021-01-01 21:30:01 +01:00
|
|
|
run: |
|
|
|
|
mkdir cache && cd cache
|
2021-08-01 19:00:18 +02:00
|
|
|
wget "https://wii.leseratte10.de/devkitPro/file.php/devkitPPC-r39-2-linux_x86_64.pkg.tar.xz"
|
|
|
|
wget "https://wii.leseratte10.de/devkitPro/file.php/devkitppc-rules-1.1.1-1-any.pkg.tar.xz"
|
|
|
|
wget "https://wii.leseratte10.de/devkitPro/file.php/libogc-2.3.1-1-any.pkg.tar.xz"
|
|
|
|
wget "https://wii.leseratte10.de/devkitPro/file.php/general-tools-1.2.0-2-linux_x86_64.pkg.tar.xz"
|
|
|
|
wget "https://wii.leseratte10.de/devkitPro/file.php/gamecube-tools-1.0.3-1-linux_x86_64.pkg.tar.xz"
|
2021-01-01 21:30:01 +01:00
|
|
|
cd ..
|
|
|
|
|
2021-04-04 20:00:03 +02:00
|
|
|
- name: Verify checksums
|
2021-01-01 21:30:01 +01:00
|
|
|
run: |
|
|
|
|
sha256sum -c <<EOF
|
2021-08-01 19:00:18 +02:00
|
|
|
76465565a4c5f9bce2849f12876b470f5044b02ce242fd22f57b6b7a2b113ead cache/devkitPPC-r39-2-linux_x86_64.pkg.tar.xz
|
|
|
|
0118f06fff938c3d4913fdc004d5edd2f72e3a16c544fb5699b0e97552529d29 cache/devkitppc-rules-1.1.1-1-any.pkg.tar.xz
|
|
|
|
b10553cced35ab8d3d0c48ee44cdb345f46be5e8f82496dd308f699db4f8d490 cache/libogc-2.3.1-1-any.pkg.tar.xz
|
|
|
|
3348e521e48f27912d0bca05eac73b4365c8c7006b637c95850f4feabe5dd2e9 cache/general-tools-1.2.0-2-linux_x86_64.pkg.tar.xz
|
|
|
|
e7ea6a13ca5a5e9d6a5b8e1616afcc92a81255aa6fee436ed81c812b62e112af cache/gamecube-tools-1.0.3-1-linux_x86_64.pkg.tar.xz
|
2021-01-01 21:30:01 +01:00
|
|
|
EOF
|
2021-04-04 20:00:03 +02:00
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: download-build-tools
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Restore cache
|
|
|
|
id: cache-1
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: cache
|
|
|
|
key: ${{ runner.os }}-cache-1
|
2021-01-01 21:30:01 +01:00
|
|
|
|
2021-04-04 20:00:03 +02:00
|
|
|
- name: Check cache
|
|
|
|
if: steps.cache-1.outputs.cache-hit != 'true'
|
|
|
|
run: exit 1
|
2021-01-01 21:30:01 +01:00
|
|
|
|
2021-04-04 20:00:03 +02:00
|
|
|
- name: Extract downloaded files
|
|
|
|
run: |
|
2021-08-01 19:00:18 +02:00
|
|
|
tar -xf cache/devkitPPC-r39-2-linux_x86_64.pkg.tar.xz --strip-components=1
|
|
|
|
tar -xf cache/devkitppc-rules-1.1.1-1-any.pkg.tar.xz --strip-components=1
|
|
|
|
tar -xf cache/libogc-2.3.1-1-any.pkg.tar.xz --strip-components=1
|
|
|
|
tar -xf cache/general-tools-1.2.0-2-linux_x86_64.pkg.tar.xz --strip-components=1
|
|
|
|
tar -xf cache/gamecube-tools-1.0.3-1-linux_x86_64.pkg.tar.xz --strip-components=1
|
2021-04-04 20:00:03 +02:00
|
|
|
|
|
|
|
- name: Compile USB Loader GX
|
|
|
|
run: |
|
|
|
|
PATH=$(pwd)/devkitpro/devkitPPC/bin:$PATH DEVKITPPC=$(pwd)/devkitpro/devkitPPC DEVKITPRO=$(pwd)/devkitpro make
|
2021-01-01 21:30:01 +01:00
|
|
|
|
|
|
|
- name: Package
|
|
|
|
id: pack
|
|
|
|
run: |
|
2021-04-04 20:00:03 +02:00
|
|
|
mkdir -p upload/apps/usbloader_gx
|
|
|
|
cp boot.dol upload/apps/usbloader_gx
|
|
|
|
cp HBC/icon.png upload/apps/usbloader_gx
|
|
|
|
cp HBC/meta.xml upload/apps/usbloader_gx
|
2021-01-01 21:30:01 +01:00
|
|
|
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | head -c 7)"
|
|
|
|
|
|
|
|
- name: Upload binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: usbloadergx_${{ steps.pack.outputs.sha }}
|
|
|
|
path: upload
|
|
|
|
|
|
|
|
- name: Upload debug binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: usbloadergx_${{ steps.pack.outputs.sha }}_debug
|
|
|
|
path: boot.elf
|
2021-04-04 20:00:03 +02:00
|
|
|
|
|
|
|
build-latest-libogc:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: download-build-tools
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Restore cache
|
|
|
|
id: cache-1
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: cache
|
|
|
|
key: ${{ runner.os }}-cache-1
|
|
|
|
|
|
|
|
- name: Check cache
|
|
|
|
if: steps.cache-1.outputs.cache-hit != 'true'
|
|
|
|
run: exit 1
|
|
|
|
|
|
|
|
- name: Extract downloaded files
|
|
|
|
run: |
|
2021-08-01 19:00:18 +02:00
|
|
|
tar -xf cache/devkitPPC-r39-2-linux_x86_64.pkg.tar.xz --strip-components=1
|
|
|
|
tar -xf cache/devkitppc-rules-1.1.1-1-any.pkg.tar.xz --strip-components=1
|
|
|
|
tar -xf cache/general-tools-1.2.0-2-linux_x86_64.pkg.tar.xz --strip-components=1
|
|
|
|
tar -xf cache/gamecube-tools-1.0.3-1-linux_x86_64.pkg.tar.xz --strip-components=1
|
2021-04-04 20:00:03 +02:00
|
|
|
|
|
|
|
- name: Checkout libogc
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: devkitPro/libogc
|
|
|
|
path: libogc
|
|
|
|
|
|
|
|
- name: Compile and install libogc
|
|
|
|
run: PATH=$(pwd)/devkitpro/devkitPPC/bin:$PATH DEVKITPPC=$(pwd)/devkitpro/devkitPPC DEVKITPRO=$(pwd)/devkitpro make install -C libogc
|
|
|
|
|
|
|
|
- name: Compile USB Loader GX
|
|
|
|
run: |
|
|
|
|
rm -r libogc
|
|
|
|
PATH=$(pwd)/devkitpro/devkitPPC/bin:$PATH DEVKITPPC=$(pwd)/devkitpro/devkitPPC DEVKITPRO=$(pwd)/devkitpro make
|
|
|
|
|
|
|
|
- name: Package
|
|
|
|
id: pack
|
|
|
|
run: |
|
|
|
|
mkdir -p upload/apps/usbloader_gx
|
|
|
|
cp boot.dol upload/apps/usbloader_gx
|
|
|
|
cp HBC/icon.png upload/apps/usbloader_gx
|
|
|
|
cp HBC/meta.xml upload/apps/usbloader_gx
|
|
|
|
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | head -c 7)"
|
|
|
|
|
|
|
|
- name: Upload binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: usbloadergx_libogc_${{ steps.pack.outputs.sha }}
|
|
|
|
path: upload
|
|
|
|
|
|
|
|
- name: Upload debug binary
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: usbloadergx_libogc_${{ steps.pack.outputs.sha }}_debug
|
|
|
|
path: boot.elf
|