ci: build the in-tree SDCC and keep it between runs

The workflow and the Dockerfile install what building SDCC needs instead
of the distribution's sdcc, and the workflow caches toolchain/ keyed on
the contents of sdcc/.
This commit is contained in:
d00f committed 2026-10-24 21:59:37 +02:00
1 parent 905e588071
commit 0181276ec6
2 files changed
+18 -3

No files matched your search

+10 -2
View File
@@ -29,7 +29,12 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
apt update apt update
apt install make gcc sdcc xxd python-is-python3 libjson-c-dev zlib1g-dev -y 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 - name: Run the host-side unit tests
run: cd branch && make -C test run: cd branch && make -C test
- name: Check that every machine definition can be compiled - name: Check that every machine definition can be compiled
@@ -41,7 +46,10 @@ jobs:
- name: Make project with the health instrumentation - name: Make project with the health instrumentation
run: cd branch && make clean && make CI=1 MACHINE="KP_9000_6XHML_X2" HEALTH=1 run: cd branch && make clean && make CI=1 MACHINE="KP_9000_6XHML_X2" HEALTH=1
- name: Make main - name: Make main
run: cd main && make CI=1 MACHINE="KP_9000_6XHML_X2" && cp output/KP_9000_6XHML_X2/rtlplayground.map /tmp/main.map 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 output/KP_9000_6XHML_X2/rtlplayground.map /tmp/main.map
- name: Calculate bank growth - name: Calculate bank growth
run: | run: |
sed -rn 's/^([XCD]SEG|(BANK[0-9])).*=\s+([0-9]+)\. bytes.*$/MAIN_\1=\3/p' /tmp/main.map | sort -u >> "$GITHUB_ENV" sed -rn 's/^([XCD]SEG|(BANK[0-9])).*=\s+([0-9]+)\. bytes.*$/MAIN_\1=\3/p' /tmp/main.map | sort -u >> "$GITHUB_ENV"
+8 -1
View File
@@ -3,7 +3,14 @@ FROM debian:13-slim
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
make \ make \
gcc \ gcc \
sdcc \ g++ \
bison \
flex \
libboost-dev \
patch \
bzip2 \
curl \
ca-certificates \
xxd \ xxd \
python3 \ python3 \
libjson-c-dev \ libjson-c-dev \