mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[CI] Update workflows
This commit is contained in:
12
.github/workflows/ci-docker.yml
vendored
12
.github/workflows/ci-docker.yml
vendored
@@ -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)
|
||||
190
.github/workflows/ci-workflow.yml
vendored
190
.github/workflows/ci-workflow.yml
vendored
@@ -17,11 +17,16 @@ on:
|
||||
description: 'Run 3DS tests'
|
||||
required: true
|
||||
default: 'yes'
|
||||
triggerFxcg:
|
||||
description: 'Run fxcg tests'
|
||||
required: true
|
||||
default: 'no'
|
||||
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
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Install dependencies
|
||||
@@ -72,6 +77,25 @@ jobs:
|
||||
path: 'output/release/simulator/fxcg/epsilon.g3a'
|
||||
destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
|
||||
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
|
||||
with:
|
||||
name: epsilon.g3a
|
||||
@@ -81,7 +105,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container: devkitpro/devkitarm:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: true
|
||||
- run: sudo apt-get update
|
||||
@@ -102,10 +126,29 @@ jobs:
|
||||
with:
|
||||
name: epsilon-3ds.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:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- run: |
|
||||
@@ -131,6 +174,25 @@ jobs:
|
||||
path: 'output/release/simulator/android/epsilon.apk'
|
||||
destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
|
||||
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
|
||||
with:
|
||||
name: epsilon-android.apk
|
||||
@@ -141,7 +203,7 @@ jobs:
|
||||
- run: |
|
||||
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
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- run: mkdir final-output
|
||||
@@ -188,7 +250,8 @@ jobs:
|
||||
with:
|
||||
name: epsilon-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:
|
||||
repository: Yaya-Cout/Upsilon-binfiles
|
||||
ref: 'main'
|
||||
@@ -212,7 +275,7 @@ jobs:
|
||||
- run: |
|
||||
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
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- run: make -j2 MODEL=n0110 epsilon.dfu
|
||||
@@ -233,7 +296,8 @@ jobs:
|
||||
with:
|
||||
name: epsilon-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:
|
||||
repository: Yaya-Cout/Upsilon-binfiles
|
||||
ref: 'main'
|
||||
@@ -278,7 +342,8 @@ jobs:
|
||||
with:
|
||||
name: epsilon-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:
|
||||
repository: Yaya-Cout/Upsilon-binfiles
|
||||
ref: 'main'
|
||||
@@ -303,10 +368,10 @@ jobs:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
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 test.exe
|
||||
- run: cmd /c output\release\simulator\windows\test.exe --headless
|
||||
@@ -322,6 +387,25 @@ jobs:
|
||||
path: 'output/release/simulator/windows/epsilon.exe'
|
||||
destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
|
||||
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
|
||||
with:
|
||||
name: epsilon-windows.exe
|
||||
@@ -354,6 +438,25 @@ jobs:
|
||||
path: 'output/release/simulator/web/epsilon.js'
|
||||
destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
|
||||
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
|
||||
with:
|
||||
name: epsilon-web.zip
|
||||
@@ -364,7 +467,7 @@ jobs:
|
||||
- run: |
|
||||
sudo apt-get update
|
||||
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:
|
||||
submodules: 'recursive'
|
||||
- run: make -j2 PLATFORM=simulator
|
||||
@@ -382,6 +485,25 @@ jobs:
|
||||
path: 'output/release/simulator/linux/epsilon.bin'
|
||||
destination: 'upsilon-binfiles.appspot.com/dev/simulator/'
|
||||
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
|
||||
with:
|
||||
name: epsilon-linux.bin
|
||||
@@ -392,7 +514,7 @@ jobs:
|
||||
steps:
|
||||
- run: brew install python-setuptools
|
||||
- run: brew install numworks/tap/epsilon-sdk
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- run: make -j2 PLATFORM=simulator
|
||||
@@ -402,13 +524,32 @@ jobs:
|
||||
with:
|
||||
name: epsilon-macos.zip
|
||||
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:
|
||||
if: github.event.inputs.triggerIos == 'yes' || github.event.inputs.triggerIos == ''
|
||||
runs-on: macOS-latest
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- run: brew install python-setuptools
|
||||
- run: brew install numworks/tap/epsilon-sdk
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- run: make -j2 PLATFORM=simulator TARGET=ios EPSILON_TELEMETRY=0
|
||||
@@ -417,6 +558,25 @@ jobs:
|
||||
with:
|
||||
name: epsilon-ios.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:
|
||||
ACCEPT_OFFICIAL_TOS: 1
|
||||
|
||||
21
.github/workflows/metric-workflow.yml
vendored
21
.github/workflows/metric-workflow.yml
vendored
@@ -3,14 +3,14 @@ on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
binary-size:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config
|
||||
- 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
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
ref: ${{ github.event.pull_request.base.sha }}
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
- name: Build base
|
||||
run: make -j2 -C base MODEL=n0110 epsilon.elf
|
||||
- name: Checkout PR head
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
@@ -26,15 +26,20 @@ jobs:
|
||||
- name: Build head
|
||||
run: make -j2 -C head MODEL=n0110 epsilon.elf
|
||||
- name: Retrieve binary size analysis
|
||||
id: binary_size
|
||||
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
|
||||
run: |
|
||||
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
|
||||
uses: actions/github-script@v7
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.payload.pull_request.number,
|
||||
body: `${{ steps.binary_size.outputs.table }}`,
|
||||
body: `${{ env.table }}`,
|
||||
});
|
||||
|
||||
@@ -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"]
|
||||
13
docker/build
13
docker/build
@@ -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}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user