mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
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:
1 parent
905e588071
commit
0181276ec6
2 files changed
+18
-3
No files matched your search
@@ -29,7 +29,12 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
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
|
||||
run: cd branch && make -C test
|
||||
- name: Check that every machine definition can be compiled
|
||||
@@ -41,7 +46,10 @@ jobs:
|
||||
- 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: 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
|
||||
run: |
|
||||
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
@@ -3,7 +3,14 @@ FROM debian:13-slim
|
||||
RUN apt-get update && apt-get install -y \
|
||||
make \
|
||||
gcc \
|
||||
sdcc \
|
||||
g++ \
|
||||
bison \
|
||||
flex \
|
||||
libboost-dev \
|
||||
patch \
|
||||
bzip2 \
|
||||
curl \
|
||||
ca-certificates \
|
||||
xxd \
|
||||
python3 \
|
||||
libjson-c-dev \
|
||||
|
||||
Reference in new issue
Block a user