mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Storing the output of the build in tmp files so we can extract
the bits we need But we need both main and branch checked out and the action can do it for us Pulling the bank occupancy from the map produced by sdcc rather than the output of the build as it appears the output number is only the maximum size of the banks BANK0 isn't output, but what I'm guessing are the consituents for it are
This commit is contained in:
1 parent
c9e8403c6e
commit
aea537f8e7
1 file changed
+39
-5
@@ -5,6 +5,10 @@ on:
|
|||||||
branches: ['**']
|
branches: ['**']
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -13,18 +17,48 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
path: branch
|
||||||
|
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
path: main
|
||||||
|
ref: main
|
||||||
|
|
||||||
- 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 sdcc xxd python-is-python3 libjson-c-dev zlib1g-dev -y
|
||||||
- name: Run the host-side unit tests
|
- name: Run the host-side unit tests
|
||||||
run: 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
|
||||||
run: make machine_check
|
run: cd branch && make machine_check
|
||||||
- name: Make project (4x2/RTL8372)
|
- name: Make project (4x2/RTL8372)
|
||||||
run: make CI=1 MACHINE="KP_9000_6XHML_X2"
|
run: cd branch && make CI=1 MACHINE="KP_9000_6XHML_X2" && cp output/KP_9000_6XHML_X2/rtlplayground.map /tmp/branch.map
|
||||||
- name: Make project (8x1/RTL8373)
|
- name: Make project (8x1/RTL8373)
|
||||||
run: make CI=1 MACHINE="KP_9000_9XHML_X_V3_1"
|
run: cd branch && make CI=1 MACHINE="KP_9000_9XHML_X_V3_1"
|
||||||
- name: Make project with the health instrumentation
|
- name: Make project with the health instrumentation
|
||||||
run: 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
|
||||||
|
run: 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 | uniq >> "$GITHUB_ENV"
|
||||||
|
sed -rn 's/^([XCD]SEG|(BANK[0-9])).*=\s+([0-9]+)\. bytes.*$/BRANCH_\1=\3/p' /tmp/branch.map | sort | uniq >> "$GITHUB_ENV"
|
||||||
|
- name: Update PR comment
|
||||||
|
uses: marocchino/sticky-pull-request-comment@v2
|
||||||
|
with:
|
||||||
|
header: Sizes
|
||||||
|
message: |
|
||||||
|
## Image Growth
|
||||||
|
|
||||||
|
Commit: ${{ github.sha }}
|
||||||
|
|
||||||
|
| Bank # | Main | Branch |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| XSEG | ${{ env.MAIN_XSEG }} bytes | ${{ env.BRANCH_XSEG }} bytes |
|
||||||
|
| CSEG | ${{ env.MAIN_CSEG }} bytes | ${{ env.BRANCH_CSEG }} bytes |
|
||||||
|
| DSEG | ${{ env.MAIN_DSEG }} bytes | ${{ env.BRANCH_DSEG }} bytes |
|
||||||
|
| 1 | ${{ env.MAIN_BANK1 }} bytes | ${{ env.BRANCH_BANK1 }} bytes |
|
||||||
|
| 2 | ${{ env.MAIN_BANK2 }} bytes | ${{ env.BRANCH_BANK2 }} bytes |
|
||||||
|
| 3 | ${{ env.MAIN_BANK3 }} bytes | ${{ env.BRANCH_BANK3 }} bytes |
|
||||||
Reference in new issue
Block a user