Skip to content

Commit

Permalink
Resurrect builds
Browse files Browse the repository at this point in the history
Closes #171
  • Loading branch information
probonopd authored Apr 26, 2022
1 parent 2d89d20 commit 2a98e59
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 21 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/platformio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ jobs:
uses: actions/setup-python@v1
- name: Install dependencies
run: |
sudo apt-get install rename
python -m pip install --upgrade pip
pip install -U platformio==4.2.1
# pip install -U --upgrade platformio # Needed? if we use this, then compilation fails for some boards!
pip install -U platformio==5.2.5
- name: Run PlatformIO
run: |
set -x
set -e
VERSION=$(git rev-parse --short HEAD)
HERE=$(readlink -f .)
sed -i -e 's|#define SKETCH_VERSION ".*"|#define SKETCH_VERSION "'$VERSION'"|' $PWD/ESP8266WirelessPrintAsync/ESP8266WirelessPrintAsync.ino
Expand All @@ -27,7 +29,22 @@ jobs:
for board_dir in */; do
pushd "$board_dir"
board=$(echo "$board_dir" | tr -d '/')
rename "s|firmware|ESP8266WirelessPrintAsync_${board}_${VERSION}|" firmware.*
rename "s|firmware|WirelessPrinting_${board}_${VERSION}|" firmware.*
popd
done
popd
mkdir WirelessPrinting
find . -type f -name 'WirelessPrinting_*.bin' -exec cp {} ./WirelessPrinting/ \;
( cd ./WirelessPrinting ; zip -r ../WirelessPrinting_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD).zip * )
echo "artifactName=WirelessPrinting_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
name: ${{ env.artifactName }} # Exported above
path: ./WirelessPrinting/*
- name: Upload to GitHub Releases (only when building from main branch)
if: ${{ github.ref == 'refs/heads/main' }}
run: |
set -ex
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash ./upload.sh ./WirelessPrinting*.zip
33 changes: 15 additions & 18 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,38 @@
[platformio]
src_dir = ESP8266WirelessPrintAsync


# common variables shared by the environments
[common]
[env]
framework = arduino
lib_deps =
https://github.com/greiman/SdFat#3b79f38
https://github.com/me-no-dev/ESPAsyncWebServer#95dedf7
https://github.com/me-no-dev/ESPAsyncTCP#7e9ed22
https://github.com/me-no-dev/AsyncTCP#90715ae6
https://github.com/ayushsharma82/AsyncElegantOTA#4b3528c
https://github.com/alanswx/ESPAsyncWiFiManager#1c02154
https://github.com/bblanchon/ArduinoJson#3df4efd
https://github.com/Makuna/NeoPixelBus#9619fef

lib_deps =
https://github.com/greiman/SdFat#3b79f38
https://github.com/me-no-dev/ESPAsyncTCP#7e9ed22
https://github.com/me-no-dev/ESPAsyncWebServer#95dedf7
https://github.com/ayushsharma82/AsyncElegantOTA#4b3528c
https://github.com/alanswx/ESPAsyncWiFiManager#1c02154
https://github.com/bblanchon/ArduinoJson#3df4efd
https://github.com/Makuna/NeoPixelBus#9619fef
build_flags = -DLOG_LOCAL_LEVEL=ESP_LOG_NONE

# base environments
# can be extended by board-specific environments
[base:esp8266]
; corresponds to https://github.com/platformio/platform-espressif8266/releases/tag/v2.0.0
; see https://github.com/esp8266/Arduino/releases/tag/2.5.0
platform = espressif8266@2.0.0
framework = ${common.framework}
lib_deps = ${common.lib_deps}
framework = ${env.framework}
lib_deps = ${env.lib_deps}
lib_ignore = AsyncTCP

[base:esp32]
; corresponds to https://github.com/platformio/platform-espressif32/releases/tag/v1.8.0
; see https://github.com/espressif/arduino-esp32/releases/tag/1.0.2
platform = espressif32@1.8.0
framework = ${common.framework}
framework = ${env.framework}
lib_deps =
${common.lib_deps}
${env.lib_deps}
https://github.com/bbx10/Hash_tng


[env:nodemcuv2]
board = nodemcuv2
extends = base:esp8266
Expand All @@ -58,4 +56,3 @@ extends = base:esp8266
[env:esp32dev]
board = esp32dev
extends = base:esp32

0 comments on commit 2a98e59

Please sign in to comment.