Add firmware artifacts, memory summary, and Doxygen gh-pages deploy
CMakeLists.txt: generate firmware.map via -Wl,-Map. CI build job: - Writes per-section size table to the Gitea job summary (visible in the Actions UI after each run). - Uploads firmware.hex and firmware.map as a downloadable artifact named firmware-<sha>. CI docs job: - On push to main, force-pushes docs/html/ as an orphan commit to the gh-pages branch. Gitea Pages must be enabled in site admin for the HTML to be served; the branch is always available via the repo file browser regardless.
This commit is contained in:
@@ -25,8 +25,26 @@ jobs:
|
||||
- name: Compile firmware
|
||||
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel . && ninja -C build
|
||||
|
||||
- name: Print size
|
||||
run: arm-none-eabi-size build/firmware
|
||||
- name: Memory summary
|
||||
run: |
|
||||
echo '## Memory usage' >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '' >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
arm-none-eabi-size -A build/firmware \
|
||||
| grep -E '^\.(text|data|bss|rodata|ARM)' \
|
||||
>> "$GITHUB_STEP_SUMMARY"
|
||||
echo '' >> "$GITHUB_STEP_SUMMARY"
|
||||
arm-none-eabi-size build/firmware | tail -1 >> "$GITHUB_STEP_SUMMARY"
|
||||
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Upload firmware artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: firmware-${{ github.sha }}
|
||||
path: |
|
||||
build/firmware.hex
|
||||
build/firmware.map
|
||||
if-no-files-found: error
|
||||
|
||||
format:
|
||||
name: Check formatting
|
||||
@@ -80,3 +98,19 @@ jobs:
|
||||
run: |
|
||||
doxygen Doxyfile 2>&1 | tee /tmp/doxy.log
|
||||
! grep -q 'warning:' /tmp/doxy.log
|
||||
|
||||
- name: Deploy to gh-pages
|
||||
if: github.ref == 'refs/heads/main'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
cd docs/html
|
||||
git init -b gh-pages
|
||||
git config user.name "ci"
|
||||
git config user.email "ci@localhost"
|
||||
git add -A
|
||||
git commit -m "docs: ${GITHUB_SHA}"
|
||||
SERVER="${GITHUB_SERVER_URL#https://}"
|
||||
git push --force \
|
||||
"https://x-token:${GITHUB_TOKEN}@${SERVER}/${GITHUB_REPOSITORY}.git" \
|
||||
HEAD:gh-pages
|
||||
|
||||
Reference in New Issue
Block a user