mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-11-01 18:04:12 +08:00
bank_occupancy.sh takes the main and branch build directories as optional arguments and prints a markdown table, so CI calls it instead of a second script. It gains the HOME, BANK4 and stack rows, and reads the web assets from the build directory, where html_min is now.
56 lines
2.0 KiB
YAML
56 lines
2.0 KiB
YAML
name: Build firmware
|
|
|
|
on:
|
|
push:
|
|
branches: ['**']
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
issues: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: debian:trixie
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
path: branch
|
|
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
path: main
|
|
ref: main
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
apt update
|
|
apt install make gcc g++ bison flex libboost-dev patch bzip2 curl ca-certificates xxd python-is-python3 libjson-c-dev zlib1g-dev -y
|
|
- name: Cache the patched SDCC
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: branch/toolchain
|
|
key: sdcc-${{ hashFiles('branch/sdcc/*') }}
|
|
- name: Run the host-side unit tests
|
|
run: cd branch && make -C test
|
|
- name: Check that every machine definition can be compiled
|
|
run: cd branch && make machine_check
|
|
- name: Make project (4x2/RTL8372)
|
|
run: mkdir -p /tmp/branch /tmp/main && cd branch && make CI=1 MACHINE="KP_9000_6XHML_X2" && cp -r output/KP_9000_6XHML_X2/rtlplayground.map output/KP_9000_6XHML_X2/rtlplayground.mem output/KP_9000_6XHML_X2/html_min /tmp/branch/
|
|
- name: Make project (8x1/RTL8373)
|
|
run: cd branch && make CI=1 MACHINE="KP_9000_9XHML_X_V3_1"
|
|
- name: Make project with the health instrumentation
|
|
run: cd branch && make clean && make CI=1 MACHINE="KP_9000_6XHML_X2" HEALTH=1
|
|
- name: Make main
|
|
run: |
|
|
ln -s ../branch/toolchain main/toolchain
|
|
PATH="$(echo "$PWD"/branch/toolchain/sdcc-*/bin):$PATH"
|
|
cd main && make CI=1 MACHINE="KP_9000_6XHML_X2" && cp -r output/KP_9000_6XHML_X2/rtlplayground.map output/KP_9000_6XHML_X2/rtlplayground.mem output/KP_9000_6XHML_X2/html_min /tmp/main/
|
|
- name: Calculate bank growth
|
|
run: |
|
|
bash branch/tools/bank_occupancy.sh KP_9000_6XHML_X2 /tmp/main /tmp/branch >> "$GITHUB_STEP_SUMMARY"
|