[CI] Update workflows

This commit is contained in:
mickbot-92
2025-11-23 13:43:11 +01:00
committed by GitHub
parent e3938e355b
commit 9bf61ded07
6 changed files with 188 additions and 80 deletions

View File

@@ -1,12 +0,0 @@
name: Docker Image CI
on: [pull_request, push]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build the Docker image
run: docker build . --file docker/Dockerfile --tag omega:$(date +%s)

View File

@@ -17,11 +17,16 @@ on:
description: 'Run 3DS tests' description: 'Run 3DS tests'
required: true required: true
default: 'yes' default: 'yes'
triggerFxcg:
description: 'Run fxcg tests'
required: true
default: 'no'
jobs: jobs:
fxcg: fxcg: # fxcg build is broken for now, disabling it for now to avoid noise
if: github.event.inputs.triggerFxcg == 'yes'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- name: Install dependencies - name: Install dependencies
@@ -72,6 +77,25 @@ jobs:
path: 'output/release/simulator/fxcg/epsilon.g3a' path: 'output/release/simulator/fxcg/epsilon.g3a'
destination: 'upsilon-binfiles.appspot.com/dev/simulator/' destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
parent: false parent: false
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with:
repository: Yaya-Cout/Upsilon-binfiles
ref: 'main'
token: ${{ secrets.PAT_UPSILON_BINFILES }}
path: 'binfiles'
# TODO: Handle git conflicts using rebase
- name: Upload binary files to website
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
run: |
cp -r output/release/simulator/fxcg/epsilon.g3a binfiles/binaries/dev/simulator
cd binfiles
git add -A
git config --global user.email "ci@github.com"
git config --global user.name "GitHub Upsilon CI"
git pull
git commit -m "Update from CI"
git push
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: epsilon.g3a name: epsilon.g3a
@@ -81,7 +105,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: devkitpro/devkitarm:latest container: devkitpro/devkitarm:latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: true submodules: true
- run: sudo apt-get update - run: sudo apt-get update
@@ -102,10 +126,29 @@ jobs:
with: with:
name: epsilon-3ds.cia name: epsilon-3ds.cia
path: output/release/simulator/3ds/epsilon.cia path: output/release/simulator/3ds/epsilon.cia
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with:
repository: Yaya-Cout/Upsilon-binfiles
ref: 'main'
token: ${{ secrets.PAT_UPSILON_BINFILES }}
path: 'binfiles'
# TODO: Handle git conflicts using rebase
- name: Upload binary files to website
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
run: |
cp -r output/release/simulator/3ds/epsilon.3dsx output/release/simulator/3ds/epsilon.cia binfiles/binaries/dev/simulator
cd binfiles
git add -A
git config --global user.email "ci@github.com"
git config --global user.name "GitHub Upsilon CI"
git pull
git commit -m "Update from CI"
git push
android: android:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- run: | - run: |
@@ -131,6 +174,25 @@ jobs:
path: 'output/release/simulator/android/epsilon.apk' path: 'output/release/simulator/android/epsilon.apk'
destination: 'upsilon-binfiles.appspot.com/dev/simulator/' destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
parent: false parent: false
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with:
repository: Yaya-Cout/Upsilon-binfiles
ref: 'main'
token: ${{ secrets.PAT_UPSILON_BINFILES }}
path: 'binfiles'
# TODO: Handle git conflicts using rebase
- name: Upload binary files to website
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
run: |
cp -r output/release/simulator/android/epsilon.apk binfiles/binaries/dev/simulator
cd binfiles
git add -A
git config --global user.email "ci@github.com"
git config --global user.name "GitHub Upsilon CI"
git pull
git commit -m "Update from CI"
git push
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: epsilon-android.apk name: epsilon-android.apk
@@ -141,7 +203,7 @@ jobs:
- run: | - run: |
sudo apt-get update sudo apt-get update
sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config gcc-arm-none-eabi binutils-arm-none-eabi sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config gcc-arm-none-eabi binutils-arm-none-eabi
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- run: mkdir final-output - run: mkdir final-output
@@ -188,7 +250,8 @@ jobs:
with: with:
name: epsilon-binpack-n0100.tgz name: epsilon-binpack-n0100.tgz
path: binpack-n0100.tgz path: binpack-n0100.tgz
- uses: actions/checkout@v5 - if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with: with:
repository: Yaya-Cout/Upsilon-binfiles repository: Yaya-Cout/Upsilon-binfiles
ref: 'main' ref: 'main'
@@ -212,7 +275,7 @@ jobs:
- run: | - run: |
sudo apt-get update sudo apt-get update
sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config gcc-arm-none-eabi binutils-arm-none-eabi sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config gcc-arm-none-eabi binutils-arm-none-eabi
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- run: make -j2 MODEL=n0110 epsilon.dfu - run: make -j2 MODEL=n0110 epsilon.dfu
@@ -233,7 +296,8 @@ jobs:
with: with:
name: epsilon-binpack-n0110.tgz name: epsilon-binpack-n0110.tgz
path: output/release/device/n0110/binpack-n0110.tgz path: output/release/device/n0110/binpack-n0110.tgz
- uses: actions/checkout@v5 - if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with: with:
repository: Yaya-Cout/Upsilon-binfiles repository: Yaya-Cout/Upsilon-binfiles
ref: 'main' ref: 'main'
@@ -278,7 +342,8 @@ jobs:
with: with:
name: epsilon-binpack-bootloader.tgz name: epsilon-binpack-bootloader.tgz
path: output/release/device/bootloader/binpack-bootloader.tgz path: output/release/device/bootloader/binpack-bootloader.tgz
- uses: actions/checkout@v5 - if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with: with:
repository: Yaya-Cout/Upsilon-binfiles repository: Yaya-Cout/Upsilon-binfiles
ref: 'main' ref: 'main'
@@ -303,10 +368,10 @@ jobs:
shell: msys2 {0} shell: msys2 {0}
steps: steps:
- uses: msys2/setup-msys2@v2 - uses: msys2/setup-msys2@v2
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- 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 - 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
- run: make -j2 PLATFORM=simulator - run: make -j2 PLATFORM=simulator
- run: make -j2 PLATFORM=simulator test.exe - run: make -j2 PLATFORM=simulator test.exe
- run: cmd /c output\release\simulator\windows\test.exe --headless - run: cmd /c output\release\simulator\windows\test.exe --headless
@@ -322,6 +387,25 @@ jobs:
path: 'output/release/simulator/windows/epsilon.exe' path: 'output/release/simulator/windows/epsilon.exe'
destination: 'upsilon-binfiles.appspot.com/dev/simulator/' destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
parent: false parent: false
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with:
repository: Yaya-Cout/Upsilon-binfiles
ref: 'main'
token: ${{ secrets.PAT_UPSILON_BINFILES }}
path: 'binfiles'
# TODO: Handle git conflicts using rebase
- name: Upload binary files to website
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
run: |
cp -r output/release/simulator/windows/epsilon.exe binfiles/binaries/dev/simulator
cd binfiles
git add -A
git config --global user.email "ci@github.com"
git config --global user.name "GitHub Upsilon CI"
git pull
git commit -m "Update from CI"
git push
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: epsilon-windows.exe name: epsilon-windows.exe
@@ -354,6 +438,25 @@ jobs:
path: 'output/release/simulator/web/epsilon.js' path: 'output/release/simulator/web/epsilon.js'
destination: 'upsilon-binfiles.appspot.com/dev/simulator/' destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
parent: false parent: false
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with:
repository: Yaya-Cout/Upsilon-binfiles
ref: 'main'
token: ${{ secrets.PAT_UPSILON_BINFILES }}
path: 'binfiles'
# TODO: Handle git conflicts using rebase
- name: Upload binary files to website
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
run: |
cp -r output/release/simulator/web/epsilon.zip binfiles/binaries/dev/simulator
cd binfiles
git add -A
git config --global user.email "ci@github.com"
git config --global user.name "GitHub Upsilon CI"
git pull
git commit -m "Update from CI"
git push
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: epsilon-web.zip name: epsilon-web.zip
@@ -364,7 +467,7 @@ jobs:
- run: | - run: |
sudo apt-get update sudo apt-get update
sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config libxtst-dev sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config libxtst-dev
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- run: make -j2 PLATFORM=simulator - run: make -j2 PLATFORM=simulator
@@ -382,6 +485,25 @@ jobs:
path: 'output/release/simulator/linux/epsilon.bin' path: 'output/release/simulator/linux/epsilon.bin'
destination: 'upsilon-binfiles.appspot.com/dev/simulator/' destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
parent: false parent: false
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with:
repository: Yaya-Cout/Upsilon-binfiles
ref: 'main'
token: ${{ secrets.PAT_UPSILON_BINFILES }}
path: 'binfiles'
# TODO: Handle git conflicts using rebase
- name: Upload binary files to website
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
run: |
cp -r output/release/simulator/linux/epsilon.bin binfiles/binaries/dev/simulator
cd binfiles
git add -A
git config --global user.email "ci@github.com"
git config --global user.name "GitHub Upsilon CI"
git pull
git commit -m "Update from CI"
git push
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: epsilon-linux.bin name: epsilon-linux.bin
@@ -392,7 +514,7 @@ jobs:
steps: steps:
- run: brew install python-setuptools - run: brew install python-setuptools
- run: brew install numworks/tap/epsilon-sdk - run: brew install numworks/tap/epsilon-sdk
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- run: make -j2 PLATFORM=simulator - run: make -j2 PLATFORM=simulator
@@ -402,13 +524,32 @@ jobs:
with: with:
name: epsilon-macos.zip name: epsilon-macos.zip
path: output/release/simulator/macos/epsilon.app path: output/release/simulator/macos/epsilon.app
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with:
repository: Yaya-Cout/Upsilon-binfiles
ref: 'main'
token: ${{ secrets.PAT_UPSILON_BINFILES }}
path: 'binfiles'
# TODO: Handle git conflicts using rebase
- name: Upload binary files to website
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
run: |
cp -r output/release/simulator/macos/epsilon.app binfiles/binaries/dev/simulator
cd binfiles
git add -A
git config --global user.email "ci@github.com"
git config --global user.name "GitHub Upsilon CI"
git pull
git commit -m "Update from CI"
git push
ios: ios:
if: github.event.inputs.triggerIos == 'yes' || github.event.inputs.triggerIos == '' if: github.event.inputs.triggerIos == 'yes' || github.event.inputs.triggerIos == ''
runs-on: macOS-latest runs-on: macos-14
steps: steps:
- run: brew install python-setuptools - run: brew install python-setuptools
- run: brew install numworks/tap/epsilon-sdk - run: brew install numworks/tap/epsilon-sdk
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'recursive' submodules: 'recursive'
- run: make -j2 PLATFORM=simulator TARGET=ios EPSILON_TELEMETRY=0 - run: make -j2 PLATFORM=simulator TARGET=ios EPSILON_TELEMETRY=0
@@ -417,6 +558,25 @@ jobs:
with: with:
name: epsilon-ios.ipa name: epsilon-ios.ipa
path: output/release/simulator/ios/epsilon.ipa path: output/release/simulator/ios/epsilon.ipa
- if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }}
uses: actions/checkout@v5
with:
repository: Yaya-Cout/Upsilon-binfiles
ref: 'main'
token: ${{ secrets.PAT_UPSILON_BINFILES }}
path: 'binfiles'
# TODO: Handle git conflicts using rebase
- name: Upload binary files to website
if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}}
run: |
cp -r output/release/simulator/ios/epsilon.ipa binfiles/binaries/dev/simulator
cd binfiles
git add -A
git config --global user.email "ci@github.com"
git config --global user.name "GitHub Upsilon CI"
git pull
git commit -m "Update from CI"
git push
env: env:
ACCEPT_OFFICIAL_TOS: 1 ACCEPT_OFFICIAL_TOS: 1

View File

@@ -3,14 +3,14 @@ on: [pull_request_target]
jobs: jobs:
binary-size: binary-size:
runs-on: ubuntu-latest runs-on: ubuntu-24.04-arm
steps: steps:
- name: Install dependencies - name: Install dependencies
run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config
- name: Install ARM toolchain - name: Install ARM toolchain
uses: numworks/setup-arm-toolchain@2020-q2 run: sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi
- name: Checkout PR base - name: Checkout PR base
uses: actions/checkout@v4 uses: actions/checkout@v5
with: with:
submodules: recursive submodules: recursive
ref: ${{ github.event.pull_request.base.sha }} ref: ${{ github.event.pull_request.base.sha }}
@@ -18,7 +18,7 @@ jobs:
- name: Build base - name: Build base
run: make -j2 -C base MODEL=n0110 epsilon.elf run: make -j2 -C base MODEL=n0110 epsilon.elf
- name: Checkout PR head - name: Checkout PR head
uses: actions/checkout@v4 uses: actions/checkout@v5
with: with:
submodules: recursive submodules: recursive
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
@@ -26,15 +26,20 @@ jobs:
- name: Build head - name: Build head
run: make -j2 -C head MODEL=n0110 epsilon.elf run: make -j2 -C head MODEL=n0110 epsilon.elf
- name: Retrieve binary size analysis - name: Retrieve binary size analysis
id: binary_size run: |
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 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)"
{
echo 'table<<EOF'
echo "${table//%0A/$'\n'}"
echo EOF
} >> "$GITHUB_ENV"
- name: Add comment - name: Add comment
uses: actions/github-script@v7 uses: actions/github-script@v8
with: with:
script: | script: |
await github.rest.issues.createComment({ await github.rest.issues.createComment({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
issue_number: context.payload.pull_request.number, issue_number: context.payload.pull_request.number,
body: `${{ steps.binary_size.outputs.table }}`, body: `${{ env.table }}`,
}); });

View File

@@ -1,10 +0,0 @@
FROM debian:buster-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential git imagemagick libx11-dev libxext-dev libfreetype6-dev libpng-dev libjpeg-dev pkg-config gcc-arm-none-eabi binutils-arm-none-eabi ca-certificates python3 python2.7 && \
apt-get clean
COPY ./build /
ENTRYPOINT ["/build"]

View File

@@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -e
REPO="${1:-https://github.com/Omega-Numworks/Omega.git}"
BRANCH="${2:-master}"
MODEL="${3:-MODEL=n0110}"
OMEGA_USERNAME="${4:- }"
OPTIONS="${5:-epsilon_flash}"
echo Building ${REPO} branch ${BRANCH} for ${MODEL} with options ${OPTIONS} !
git clone --recurse-submodules -j $(nproc) --depth 1 --branch ${BRANCH} ${REPO} omega
time make cleanall && time make -j $(nproc) -C omega ${MODEL} ${OMEGA_USERNAME} ${OPTIONS}

View File

@@ -1,22 +0,0 @@
# Docker Omega Builder
This docker build and upload the firmware of a NumWorks from a repo easily.
## How to use
Connect the calculator to the computer, then to build the latest official firmware, just run :
```
docker run -it --rm --privileged omeganumworks/omegabuild
```
To build a specific version, you can use the following syntax :
```
docker run -it --rm --privileged omeganumworks/omegabuild git-repository-URL git-branch model username make-options
```
For example, to build latest dev version :
```
docker run -it --rm --privileged omeganumworks/omegabuild https://github.com/Omega-Numworks/Omega.git omega-dev