Skip to content

Commit bd78483

Browse files
authored
Merge pull request #388 from mickbot-92/ci
[CI] Update workflows
2 parents 2b5d6e9 + 9bf61de commit bd78483

File tree

6 files changed

+188
-80
lines changed

6 files changed

+188
-80
lines changed

.github/workflows/ci-docker.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/ci-workflow.yml

Lines changed: 175 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@ on:
1717
description: 'Run 3DS tests'
1818
required: true
1919
default: 'yes'
20+
triggerFxcg:
21+
description: 'Run fxcg tests'
22+
required: true
23+
default: 'no'
2024
jobs:
21-
fxcg:
25+
fxcg: # fxcg build is broken for now, disabling it for now to avoid noise
26+
if: github.event.inputs.triggerFxcg == 'yes'
2227
runs-on: ubuntu-latest
2328
steps:
24-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v5
2530
with:
2631
submodules: 'recursive'
2732
- name: Install dependencies
@@ -72,6 +77,25 @@ jobs:
7277
path: 'output/release/simulator/fxcg/epsilon.g3a'
7378
destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
7479
parent: false
80+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
81+
uses: actions/checkout@v5
82+
with:
83+
repository: Yaya-Cout/Upsilon-binfiles
84+
ref: 'main'
85+
token: ${{ secrets.PAT_UPSILON_BINFILES }}
86+
path: 'binfiles'
87+
# TODO: Handle git conflicts using rebase
88+
- name: Upload binary files to website
89+
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
90+
run: |
91+
cp -r output/release/simulator/fxcg/epsilon.g3a binfiles/binaries/dev/simulator
92+
cd binfiles
93+
git add -A
94+
git config --global user.email "ci@github.com"
95+
git config --global user.name "GitHub Upsilon CI"
96+
git pull
97+
git commit -m "Update from CI"
98+
git push
7599
- uses: actions/upload-artifact@v4
76100
with:
77101
name: epsilon.g3a
@@ -81,7 +105,7 @@ jobs:
81105
runs-on: ubuntu-latest
82106
container: devkitpro/devkitarm:latest
83107
steps:
84-
- uses: actions/checkout@v4
108+
- uses: actions/checkout@v5
85109
with:
86110
submodules: true
87111
- run: sudo apt-get update
@@ -102,10 +126,29 @@ jobs:
102126
with:
103127
name: epsilon-3ds.cia
104128
path: output/release/simulator/3ds/epsilon.cia
129+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
130+
uses: actions/checkout@v5
131+
with:
132+
repository: Yaya-Cout/Upsilon-binfiles
133+
ref: 'main'
134+
token: ${{ secrets.PAT_UPSILON_BINFILES }}
135+
path: 'binfiles'
136+
# TODO: Handle git conflicts using rebase
137+
- name: Upload binary files to website
138+
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
139+
run: |
140+
cp -r output/release/simulator/3ds/epsilon.3dsx output/release/simulator/3ds/epsilon.cia binfiles/binaries/dev/simulator
141+
cd binfiles
142+
git add -A
143+
git config --global user.email "ci@github.com"
144+
git config --global user.name "GitHub Upsilon CI"
145+
git pull
146+
git commit -m "Update from CI"
147+
git push
105148
android:
106149
runs-on: ubuntu-latest
107150
steps:
108-
- uses: actions/checkout@v4
151+
- uses: actions/checkout@v5
109152
with:
110153
submodules: 'recursive'
111154
- run: |
@@ -131,6 +174,25 @@ jobs:
131174
path: 'output/release/simulator/android/epsilon.apk'
132175
destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
133176
parent: false
177+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
178+
uses: actions/checkout@v5
179+
with:
180+
repository: Yaya-Cout/Upsilon-binfiles
181+
ref: 'main'
182+
token: ${{ secrets.PAT_UPSILON_BINFILES }}
183+
path: 'binfiles'
184+
# TODO: Handle git conflicts using rebase
185+
- name: Upload binary files to website
186+
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
187+
run: |
188+
cp -r output/release/simulator/android/epsilon.apk binfiles/binaries/dev/simulator
189+
cd binfiles
190+
git add -A
191+
git config --global user.email "ci@github.com"
192+
git config --global user.name "GitHub Upsilon CI"
193+
git pull
194+
git commit -m "Update from CI"
195+
git push
134196
- uses: actions/upload-artifact@v4
135197
with:
136198
name: epsilon-android.apk
@@ -141,7 +203,7 @@ jobs:
141203
- run: |
142204
sudo apt-get update
143205
sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config gcc-arm-none-eabi binutils-arm-none-eabi
144-
- uses: actions/checkout@v4
206+
- uses: actions/checkout@v5
145207
with:
146208
submodules: 'recursive'
147209
- run: mkdir final-output
@@ -188,7 +250,8 @@ jobs:
188250
with:
189251
name: epsilon-binpack-n0100.tgz
190252
path: binpack-n0100.tgz
191-
- uses: actions/checkout@v5
253+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
254+
uses: actions/checkout@v5
192255
with:
193256
repository: Yaya-Cout/Upsilon-binfiles
194257
ref: 'main'
@@ -212,7 +275,7 @@ jobs:
212275
- run: |
213276
sudo apt-get update
214277
sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config gcc-arm-none-eabi binutils-arm-none-eabi
215-
- uses: actions/checkout@v4
278+
- uses: actions/checkout@v5
216279
with:
217280
submodules: 'recursive'
218281
- run: make -j2 MODEL=n0110 epsilon.dfu
@@ -233,7 +296,8 @@ jobs:
233296
with:
234297
name: epsilon-binpack-n0110.tgz
235298
path: output/release/device/n0110/binpack-n0110.tgz
236-
- uses: actions/checkout@v5
299+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
300+
uses: actions/checkout@v5
237301
with:
238302
repository: Yaya-Cout/Upsilon-binfiles
239303
ref: 'main'
@@ -278,7 +342,8 @@ jobs:
278342
with:
279343
name: epsilon-binpack-bootloader.tgz
280344
path: output/release/device/bootloader/binpack-bootloader.tgz
281-
- uses: actions/checkout@v5
345+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
346+
uses: actions/checkout@v5
282347
with:
283348
repository: Yaya-Cout/Upsilon-binfiles
284349
ref: 'main'
@@ -303,10 +368,10 @@ jobs:
303368
shell: msys2 {0}
304369
steps:
305370
- uses: msys2/setup-msys2@v2
306-
- uses: actions/checkout@v4
371+
- uses: actions/checkout@v5
307372
with:
308373
submodules: 'recursive'
309-
- run: pacman -S --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-freetype mingw-w64-x86_64-pkg-config make mingw-w64-x86_64-python3 mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-libpng
374+
- run: pacman -S --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-freetype mingw-w64-x86_64-pkg-config make mingw-w64-x86_64-python3 mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-libpng git
310375
- run: make -j2 PLATFORM=simulator
311376
- run: make -j2 PLATFORM=simulator test.exe
312377
- run: cmd /c output\release\simulator\windows\test.exe --headless
@@ -322,6 +387,25 @@ jobs:
322387
path: 'output/release/simulator/windows/epsilon.exe'
323388
destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
324389
parent: false
390+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
391+
uses: actions/checkout@v5
392+
with:
393+
repository: Yaya-Cout/Upsilon-binfiles
394+
ref: 'main'
395+
token: ${{ secrets.PAT_UPSILON_BINFILES }}
396+
path: 'binfiles'
397+
# TODO: Handle git conflicts using rebase
398+
- name: Upload binary files to website
399+
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
400+
run: |
401+
cp -r output/release/simulator/windows/epsilon.exe binfiles/binaries/dev/simulator
402+
cd binfiles
403+
git add -A
404+
git config --global user.email "ci@github.com"
405+
git config --global user.name "GitHub Upsilon CI"
406+
git pull
407+
git commit -m "Update from CI"
408+
git push
325409
- uses: actions/upload-artifact@v4
326410
with:
327411
name: epsilon-windows.exe
@@ -354,6 +438,25 @@ jobs:
354438
path: 'output/release/simulator/web/epsilon.js'
355439
destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
356440
parent: false
441+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
442+
uses: actions/checkout@v5
443+
with:
444+
repository: Yaya-Cout/Upsilon-binfiles
445+
ref: 'main'
446+
token: ${{ secrets.PAT_UPSILON_BINFILES }}
447+
path: 'binfiles'
448+
# TODO: Handle git conflicts using rebase
449+
- name: Upload binary files to website
450+
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
451+
run: |
452+
cp -r output/release/simulator/web/epsilon.zip binfiles/binaries/dev/simulator
453+
cd binfiles
454+
git add -A
455+
git config --global user.email "ci@github.com"
456+
git config --global user.name "GitHub Upsilon CI"
457+
git pull
458+
git commit -m "Update from CI"
459+
git push
357460
- uses: actions/upload-artifact@v4
358461
with:
359462
name: epsilon-web.zip
@@ -364,7 +467,7 @@ jobs:
364467
- run: |
365468
sudo apt-get update
366469
sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config libxtst-dev
367-
- uses: actions/checkout@v4
470+
- uses: actions/checkout@v5
368471
with:
369472
submodules: 'recursive'
370473
- run: make -j2 PLATFORM=simulator
@@ -382,6 +485,25 @@ jobs:
382485
path: 'output/release/simulator/linux/epsilon.bin'
383486
destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
384487
parent: false
488+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
489+
uses: actions/checkout@v5
490+
with:
491+
repository: Yaya-Cout/Upsilon-binfiles
492+
ref: 'main'
493+
token: ${{ secrets.PAT_UPSILON_BINFILES }}
494+
path: 'binfiles'
495+
# TODO: Handle git conflicts using rebase
496+
- name: Upload binary files to website
497+
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
498+
run: |
499+
cp -r output/release/simulator/linux/epsilon.bin binfiles/binaries/dev/simulator
500+
cd binfiles
501+
git add -A
502+
git config --global user.email "ci@github.com"
503+
git config --global user.name "GitHub Upsilon CI"
504+
git pull
505+
git commit -m "Update from CI"
506+
git push
385507
- uses: actions/upload-artifact@v4
386508
with:
387509
name: epsilon-linux.bin
@@ -392,7 +514,7 @@ jobs:
392514
steps:
393515
- run: brew install python-setuptools
394516
- run: brew install numworks/tap/epsilon-sdk
395-
- uses: actions/checkout@v4
517+
- uses: actions/checkout@v5
396518
with:
397519
submodules: 'recursive'
398520
- run: make -j2 PLATFORM=simulator
@@ -402,13 +524,32 @@ jobs:
402524
with:
403525
name: epsilon-macos.zip
404526
path: output/release/simulator/macos/epsilon.app
527+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
528+
uses: actions/checkout@v5
529+
with:
530+
repository: Yaya-Cout/Upsilon-binfiles
531+
ref: 'main'
532+
token: ${{ secrets.PAT_UPSILON_BINFILES }}
533+
path: 'binfiles'
534+
# TODO: Handle git conflicts using rebase
535+
- name: Upload binary files to website
536+
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
537+
run: |
538+
cp -r output/release/simulator/macos/epsilon.app binfiles/binaries/dev/simulator
539+
cd binfiles
540+
git add -A
541+
git config --global user.email "ci@github.com"
542+
git config --global user.name "GitHub Upsilon CI"
543+
git pull
544+
git commit -m "Update from CI"
545+
git push
405546
ios:
406547
if: github.event.inputs.triggerIos == 'yes' || github.event.inputs.triggerIos == ''
407-
runs-on: macOS-latest
548+
runs-on: macos-14
408549
steps:
409550
- run: brew install python-setuptools
410551
- run: brew install numworks/tap/epsilon-sdk
411-
- uses: actions/checkout@v4
552+
- uses: actions/checkout@v5
412553
with:
413554
submodules: 'recursive'
414555
- run: make -j2 PLATFORM=simulator TARGET=ios EPSILON_TELEMETRY=0
@@ -417,6 +558,25 @@ jobs:
417558
with:
418559
name: epsilon-ios.ipa
419560
path: output/release/simulator/ios/epsilon.ipa
561+
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
562+
uses: actions/checkout@v5
563+
with:
564+
repository: Yaya-Cout/Upsilon-binfiles
565+
ref: 'main'
566+
token: ${{ secrets.PAT_UPSILON_BINFILES }}
567+
path: 'binfiles'
568+
# TODO: Handle git conflicts using rebase
569+
- name: Upload binary files to website
570+
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
571+
run: |
572+
cp -r output/release/simulator/ios/epsilon.ipa binfiles/binaries/dev/simulator
573+
cd binfiles
574+
git add -A
575+
git config --global user.email "ci@github.com"
576+
git config --global user.name "GitHub Upsilon CI"
577+
git pull
578+
git commit -m "Update from CI"
579+
git push
420580
421581
env:
422582
ACCEPT_OFFICIAL_TOS: 1

.github/workflows/metric-workflow.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,43 @@ on: [pull_request_target]
33

44
jobs:
55
binary-size:
6-
runs-on: ubuntu-latest
6+
runs-on: ubuntu-24.04-arm
77
steps:
88
- name: Install dependencies
99
run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config
1010
- name: Install ARM toolchain
11-
uses: numworks/setup-arm-toolchain@2020-q2
11+
run: sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi
1212
- name: Checkout PR base
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v5
1414
with:
1515
submodules: recursive
1616
ref: ${{ github.event.pull_request.base.sha }}
1717
path: base
1818
- name: Build base
1919
run: make -j2 -C base MODEL=n0110 epsilon.elf
2020
- name: Checkout PR head
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222
with:
2323
submodules: recursive
2424
ref: ${{ github.event.pull_request.head.sha }}
2525
path: head
2626
- name: Build head
2727
run: make -j2 -C head MODEL=n0110 epsilon.elf
2828
- name: Retrieve binary size analysis
29-
id: binary_size
30-
run: echo "table=$(python3 head/build/metrics/binary_size.py base/output/release/device/n0110/epsilon.elf head/output/release/device/n0110/epsilon.elf --labels Base Head --sections .text .rodata .bss .data --custom 'Total (RAM)' .data .bss --custom 'Total (ROM)' .text .rodata .data --escape)" >> $GITHUB_OUTPUT
29+
run: |
30+
table="$(python3 head/build/metrics/binary_size.py base/output/release/device/n0110/epsilon.elf head/output/release/device/n0110/epsilon.elf --labels Base Head --sections .text .rodata .bss .data --custom 'Total (RAM)' .data .bss --custom 'Total (ROM)' .text .rodata .data --escape)"
31+
{
32+
echo 'table<<EOF'
33+
echo "${table//%0A/$'\n'}"
34+
echo EOF
35+
} >> "$GITHUB_ENV"
3136
- name: Add comment
32-
uses: actions/github-script@v7
37+
uses: actions/github-script@v8
3338
with:
3439
script: |
3540
await github.rest.issues.createComment({
3641
owner: context.repo.owner,
3742
repo: context.repo.repo,
3843
issue_number: context.payload.pull_request.number,
39-
body: `${{ steps.binary_size.outputs.table }}`,
44+
body: `${{ env.table }}`,
4045
});

0 commit comments

Comments
 (0)