pausing workflow work for now #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Application CI (no cache) | |
#on: | |
# workflow_run: | |
# workflows: ["Application CI - get webapp artifacts"] | |
# types: | |
# - completed | |
jobs: | |
install_sming: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
ref: develop | |
- name: Install Sming Framework | |
run: | | |
cd /tmp | |
git clone https://github.com/SmingHub/Sming.git | |
cd Sming/Sming | |
git checkout develop | |
export SMING_HOME=$(pwd) | |
- name: Save Sming Image | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sming-image | |
path: /tmp/Sming | |
install_toolchains_esp8266: | |
runs-on: ubuntu-latest | |
needs: install_sming | |
steps: | |
- name: Download Sming Image | |
uses: actions/download-artifact@v4 | |
with: | |
name: sming-image | |
path: /tmp/Sming | |
- name: Install ESP8266 Toolchain | |
run: | | |
export SMING_HOME=/tmp/Sming/Sming | |
$SMING_HOME/../Tools/install.sh Esp8266 | |
- name: Save ESP8266 Image | |
uses: actions/upload-artifact@v4 | |
with: | |
name: esp8266-image | |
path: /tmp/Sming | |
install_toolchains_esp32: | |
runs-on: ubuntu-latest | |
needs: install_sming | |
steps: | |
- name: Download Sming Image | |
uses: actions/download-artifact@v4 | |
with: | |
name: sming-image | |
path: /tmp/Sming | |
- name: Install ESP32 Toolchain | |
run: | | |
export SMING_HOME=/tmp/Sming/Sming | |
$SMING_HOME/../Tools/install.sh Esp32 | |
- name: Save ESP32 Image | |
uses: actions/upload-artifact@v4 | |
with: | |
name: esp32-image | |
path: /tmp/Sming | |
build_firmware_esp8266: | |
runs-on: ubuntu-latest | |
needs: install_toolchains_esp8266 | |
strategy: | |
matrix: | |
release: [0, 1] | |
steps: | |
- name: Download ESP8266 Image | |
uses: actions/download-artifact@v4 | |
with: | |
name: esp8266-image | |
path: /tmp/Sming | |
- name: Compile Application for ESP8266 | |
env: | |
SMING_HOME: /tmp/Sming/Sming | |
SMING_ARCH: Esp8266 | |
SMING_SOC: esp8266 | |
SMING_RELEASE: ${{ matrix.release }} | |
run: | | |
source $SMING_HOME/../Tools/export.sh | |
make | |
- name: Upload firmware artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-esp8266-${{ matrix.release }} | |
path: out/esp8266/release/firmware/ | |
build_firmware_esp32: | |
runs-on: ubuntu-latest | |
needs: install_toolchains_esp32 | |
strategy: | |
matrix: | |
soc: [esp32, esp32c3] | |
release: [0, 1] | |
steps: | |
- name: Download ESP32 Image | |
uses: actions/download-artifact@v4 | |
with: | |
name: esp32-image | |
path: /tmp/Sming | |
- name: Compile Application for ESP32 | |
env: | |
SMING_HOME: /tmp/Sming/Sming | |
SMING_SOC: ${{ matrix.soc }} | |
SMING_RELEASE: ${{ matrix.release }} | |
run: | | |
source $SMING_HOME/../Tools/export.sh | |
make | |
- name: Upload firmware artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-${{ matrix.soc }}-${{ matrix.release }} | |
path: out/${{ matrix.soc }}/release/firmware/ | |
create_download_page: | |
runs-on: ubuntu-latest | |
needs: [build_firmware_esp8266, build_firmware_esp32] | |
steps: | |
- name: Create download page | |
run: | | |
mkdir -p dist/download | |
echo "<html><body><h1>Download Firmware Artifacts</h1><ul>" > dist/download/index.html | |
for soc in esp8266 esp32 esp32c3; do | |
for release in 0 1; do | |
if [ $release -eq 1 ]; then | |
type="release" | |
else | |
type="debug" | |
fi | |
echo "<li><a href='firmware-${soc}-${release}.zip'>Download firmware for ${soc} (${type})</a></li>" >> dist/download/index.html | |
done | |
done | |
echo "</ul></body></html>" >> dist/download/index.html | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.pages_token }} | |
publish_dir: ./dist/download | |
publish_branch: gh-pages | |
force_orphan: true |