mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Add CI test for eboot build (#7546)
Check that building the eboot.c block generates the same binary as the verison checked into the repo. Catches the case where a library or eboot.c file is changed, but an updated eboot.elf isn't included in a PR. Can't do simple binary diff of the ELFs because paths and compile times will change, so dump the two sections we care about.
This commit is contained in:
parent
53e4dec51f
commit
c366f84520
7
.github/workflows/pull-request.yml
vendored
7
.github/workflows/pull-request.yml
vendored
@ -251,9 +251,16 @@ jobs:
|
|||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
|
- name: Cache Linux toolchain
|
||||||
|
id: cache-linux
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ./tools/dist
|
||||||
|
key: key-linux-toolchain
|
||||||
- name: Boards.txt diff
|
- name: Boards.txt diff
|
||||||
env:
|
env:
|
||||||
TRAVIS_BUILD_DIR: ${{ github.workspace }}
|
TRAVIS_BUILD_DIR: ${{ github.workspace }}
|
||||||
TRAVIS_TAG: ${{ github.ref }}
|
TRAVIS_TAG: ${{ github.ref }}
|
||||||
run: |
|
run: |
|
||||||
bash ./tests/ci/build_boards.sh
|
bash ./tests/ci/build_boards.sh
|
||||||
|
bash ./tests/ci/eboot_test.sh
|
||||||
|
21
tests/ci/eboot_test.sh
Normal file
21
tests/ci/eboot_test.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
READELF="$TRAVIS_BUILD_DIR/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-readelf"
|
||||||
|
|
||||||
|
set -ev
|
||||||
|
|
||||||
|
cd $TRAVIS_BUILD_DIR/tools
|
||||||
|
python3 get.py -q
|
||||||
|
|
||||||
|
cd $TRAVIS_BUILD_DIR/bootloaders/eboot
|
||||||
|
|
||||||
|
"$READELF" -x .data -x .text eboot.elf > git.txt
|
||||||
|
make clean
|
||||||
|
make
|
||||||
|
"$READELF" -x .data -x .text eboot.elf > build.txt
|
||||||
|
diff git.txt build.txt
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo ERROR: eboot.elf in repo does not match output from compile.
|
||||||
|
echo ERROR: Need to rebuild and check in updated eboot.
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user