Files
RTLPlayground/.github/workflows/build.yml
T
d00f 49f2a156ee ci: drop the write permissions
They were added for the step that commented on the pull request. The
sizes go to the job summary now, which only needs to read the
repository.
2026-10-29 20:01:02 +01:00

54 lines
1.9 KiB
YAML

name: Build firmware
on:
push:
branches: ['**']
pull_request:
permissions:
contents: read
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"