1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-08 11:22:40 +03:00

Rework CI workflows (#8688)

- split workflows into separate files to trigger by path
  this should help out documentation and boards / eboot / pkg files
  updates, since those *wont* trigger usual build stuff anymore
- build*.sh whatever merged into just common.sh and build.sh
  trigger different parity builds, mod % rem and allow to set .ino list
  through the environment variable
- removes unnecessary temporary files, try to use more pipes
  move remaining ones into cache dir instead of PWD
- remove legacy TRAVIS env vars, use ESP8266_ARDUINO prefix for config
- remove Windows path workarounds
- hardware/ and ide/ directories are set through envionment
  do not force specific paths, simplify builds on local machine
- sketch list is set through environment. expicit paths for Windows and
  macOS builders. platformio also gets a real shuffled list instead of
  mod and rem magic numbers
- detect root of the repo through git cli, not base{name,dir} or relative paths
This commit is contained in:
Max Prokhorov
2022-10-31 21:13:40 +03:00
committed by GitHub
parent 2360d1cff1
commit 0aab6ecee2
28 changed files with 925 additions and 772 deletions

View File

@@ -4,11 +4,14 @@
set -ev
cd $TRAVIS_BUILD_DIR
root=$(git rev-parse --show-toplevel)
cd $root
tools/boards.txt.py --boardsgen --ldgen --packagegen --docgen
git diff --exit-code -- boards.txt \
doc/boards.rst \
tools/sdk/ld/
git diff --exit-code -w -- package/package_esp8266com_index.template.json
git diff --exit-code -- \
boards.txt \
doc/boards.rst \
tools/sdk/ld/
git diff --exit-code --ignore-all-space -- \
package/package_esp8266com_index.template.json

View File

@@ -4,6 +4,5 @@
set -ev
cd $TRAVIS_BUILD_DIR/doc
SPHINXOPTS="-W" make html
root=$(git rev-parse --show-toplevel)
env SPHINXOPTS="-W" make -C $root/doc html

View File

@@ -4,13 +4,16 @@
set -ev
export PKG_URL=https://github.com/esp8266/Arduino/releases/download/$TRAVIS_TAG/esp8266-$TRAVIS_TAG.zip
export DOC_URL=https://arduino-esp8266.readthedocs.io/en/$TRAVIS_TAG/
root=$(git rev-parse --show-toplevel)
tag=$ESP8266_ARDUINO_RELEASE_TAG
export PKG_URL=https://github.com/esp8266/Arduino/releases/download/$tag/esp8266-$tag.zip
export DOC_URL=https://arduino-esp8266.readthedocs.io/en/$tag/
if [ -z "$CI_GITHUB_API_KEY" ]; then
echo "Github API key not set. Skip building the package."
exit 0
fi
cd $TRAVIS_BUILD_DIR/package
cd $root/package
./build_boards_manager_package.sh

View File

@@ -1,13 +1,14 @@
#!/bin/bash
READELF="$TRAVIS_BUILD_DIR/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-readelf"
set -ev
cd $TRAVIS_BUILD_DIR/tools
root=$(git rev-parse --show-toplevel)
READELF="$root/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-readelf"
cd $root/tools
python3 get.py -q
cd $TRAVIS_BUILD_DIR/bootloaders/eboot
cd $root/bootloaders/eboot
"$READELF" -x .data -x .text eboot.elf > git.txt
make clean

View File

@@ -4,12 +4,8 @@
set -ev
if [ -z "$TRAVIS_BUILD_DIR" ]; then
export TRAVIS_BUILD_DIR=$(cd ${PWD%/*}/..; pwd)
fi
cd $TRAVIS_BUILD_DIR/tests/host
root=$(git rev-parse --show-toplevel)
cd $root/tests/host
make -j2 FORCE32=0 ssl
for i in ../../libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient \

View File

@@ -2,8 +2,10 @@
set -ev
root=$(git rev-parse --show-toplevel)
fail=0
for i in $(cat "$TRAVIS_BUILD_DIR/package/package_esp8266com_index.template.json" | jq '.packages[0]."tools" | .[] | .systems[] | "\(.url) \(.checksum)"' | sort -u | sed 's/ /@/'); do
for i in $(cat "$root/package/package_esp8266com_index.template.json" | jq '.packages[0]."tools" | .[] | .systems[] | "\(.url) \(.checksum)"' | sort -u | sed 's/ /@/'); do
url=$(echo $i | sed 's/@/ /' | cut -f2 -d\" | cut -f1 -d' ')
sha=$(echo $i | sed 's/@/ /' | cut -f2 -d\" | cut -f2 -d' ' | cut -f2 -d:)
echo "INFO: Checking $url"

View File

@@ -4,12 +4,15 @@
set -e -x
root=$(git rev-parse --show-toplevel)
${root}/tests/restyle.sh
# Revert changes which formatter might have done to the submodules,
# as we don't want to fail the build because of the 3rd party libraries
git --version || true
git submodule foreach --recursive 'git reset --hard'
root=$(git rev-parse --show-toplevel)
git diff --exit-code -- $TRAVIS_BUILD_DIR
# Run formatter and compare what changed in the git tree.
# Also revert changes which formatter might have done to the submodules,
# as we don't want to fail the build because of the 3rd party libraries
cd $root
./tests/restyle.sh
git submodule foreach --recursive 'git reset --hard'
git diff --exit-code