Skip to content

only installing Esp32 and Esp8266 #12

only installing Esp32 and Esp8266

only installing Esp32 and Esp8266 #12

name: Application CI
on:
push:
branches: [develop]
pull_request:
branches: [develop]
repository_dispatch:
types: [frontend-build-completed]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
soc: [esp8266, esp32, esp32c3]
release: [0, 1]
steps:
- uses: actions/checkout@v2
- name: Cache Sming Framework
uses: actions/cache@v3
with:
path: /tmp/Sming
key: ${{ runner.os }}-sming-${{ hashFiles('**/Sming/**') }}
restore-keys: |
${{ runner.os }}-sming-
- name: chache /opt directory
uses: actions/cache@v2
with:
path: /opt
key: ${{ runner.os }}-opt-${{ hashFiles('**/Sming/**') }}
restore-keys: |
${{ runner.os }}-opt-
- name: Install Sming Framework
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd /tmp
git clone https://github.com/SmingHub/Sming.git
cd Sming/Sming
git checkout develop
export SMING_HOME=$(pwd)
../Tools/install.sh Esp32
../Tools/install.sh Esp8266
- name: Download SPA files artifact
uses: actions/download-artifact@v4
with:
name: spa-files
path: ./webapp
repository: pljakobs/esp_rgb_webapp2
github_token: ${{ secrets.artifact_download_token }}
- name: Download fileList.h artifact
uses: actions/download-artifact@v4
with:
name: fileList.h
path: ./include
repository: pljakobs/esp_rgb_webapp2
github_token: ${{ secrets.artifact_download_token }}
- name: Check Coding Style
env:
SMING_HOME: /tmp/Sming/Sming
SMING_ARCH: Host
run: |
make cs
DIFFS=$(git diff)
if [ -n "$DIFFS" ]; then
echo "!!! Coding Style issues Found!!!"
echo " Run: 'make cs' to fix them. "
echo "$DIFFS"
exit 1
fi
- name: Compile Application
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/
- 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