-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (94 loc) · 3.75 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Build binaries
on:
push:
branches:
- "**"
paths-ignore:
- '**.md'
- '.devcontainer/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/**/*.md'
- '.vscode/**'
- 'hbc/**'
- 'languages/**'
pull_request:
paths-ignore:
- '**.md'
- '.devcontainer/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/**/*.md'
- '.vscode/**'
- 'hbc/**'
- 'languages/**'
jobs:
download-build-tools:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Restore cache
id: cache-1
uses: actions/cache@v3
with:
path: cache
key: ${{ runner.os }}-cache-1
- name: Download devkitPPC r41, libogc 2.3.1 and required tools
if: steps.cache-1.outputs.cache-hit != 'true'
# general-tools is needed for bin2s and gamecube-tools is needed for elf2dol & gcdsptool
run: |
mkdir cache && cd cache
wget "https://wii.leseratte10.de/devkitPro/file.php/devkitPPC-r41-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"
cd ..
- name: Verify checksums
run: |
sha256sum -c <<EOF
f8bdbabd7e30ebc87dc129c092d1fa85e38d726de78befad3dc6714568431076 cache/devkitPPC-r41-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
EOF
build:
runs-on: ubuntu-latest
needs: download-build-tools
steps:
- uses: actions/checkout@v3
- name: Restore cache
id: cache-1
uses: actions/cache@v3
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: |
tar -xf cache/devkitPPC-r41-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
- name: Compile USB Loader GX
run: |
PATH=$(pwd)/devkitpro/devkitPPC/bin:$PATH DEVKITPPC=$(pwd)/devkitpro/devkitPPC DEVKITPRO=$(pwd)/devkitpro make
- name: Package
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 "sha=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: usbloadergx_${{ env.sha }}
path: upload
- name: Upload debug binary
uses: actions/upload-artifact@v3
with:
name: usbloadergx_${{ env.sha }}_debug
path: boot.elf