feat: use (nice) toast instead of alert #247
Workflow file for this run
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: PlatformIO CI | |
on: [ push, pull_request ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Update NodeJS cache on every commit | |
uses: actions/cache@v4 | |
with: | |
path: node_modules/ | |
key: node_modules-${{ github.run_id }} | |
restore-keys: node_modules # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md# | |
- uses: browser-actions/setup-chrome@v1 | |
with: | |
chrome-version: stable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm install --force | |
- name: Build UI | |
run: npm run build | |
- name: Test UI with stable Chrome | |
run: npm run test:ci | |
- name: Check for lint errors | |
run: npm run lint | |
build: | |
runs-on: ubuntu-latest | |
needs: test | |
strategy: | |
matrix: | |
envs: | |
[ | |
SIM800L_IP5306_VERSION_20190610, | |
SIM800L_AXP192_VERSION_20200327, | |
SIM800C_AXP192_VERSION_20200609, | |
SIM800L_IP5306_VERSION_20200811, | |
T-A7670X, | |
T-Call-A7670X-V1-0, | |
T-Call-A7670X-V1-1, | |
T-A7608X | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Update PIP cache on every commit | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: pip-${{ github.run_id }}-${{ matrix.envs }} | |
restore-keys: pip # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache | |
- name: Update PlatformIO cache on every commit | |
uses: actions/cache@v4 | |
with: | |
path: ~/.platformio | |
key: platformio-${{ github.run_id }}-${{ matrix.envs }} | |
restore-keys: platformio # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache | |
- name: Update Build cache on every commit | |
uses: actions/cache@v4 | |
with: | |
path: .pio/ | |
key: build-${{ github.run_id }}-${{ matrix.envs }} | |
restore-keys: build # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache | |
- name: Update NodeJS cache on every commit | |
uses: actions/cache@v4 | |
with: | |
path: node_modules/ | |
key: node_modules-${{ github.run_id }} | |
restore-keys: node_modules # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md# | |
- name: Update generated-files cache on every commit | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.pio/build/${{ matrix.envs }}/firmware.bin | |
.pio/build/${{ matrix.envs }}/partitions.bin | |
.pio/build/${{ matrix.envs }}/bootloader.bin | |
.pio/build/${{ matrix.envs }}/littlefs.bin | |
key: generated-files-${{ github.run_id }}-${{ matrix.envs }} | |
restore-keys: generated-files # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install PlatformIO Core | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade platformio | |
- name: Clean old build files | |
run: pio run --target clean -e ${{ matrix.envs }} | |
- name: Build Firmware | |
run: pio run -e ${{ matrix.envs }} | |
- name: Build Filesystem | |
run: pio run --target buildfs -e ${{ matrix.envs }} | |
######################################################################################### | |
## Build Package | |
######################################################################################### | |
package: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
envs: | |
[ | |
SIM800L_IP5306_VERSION_20190610, | |
SIM800L_AXP192_VERSION_20200327, | |
SIM800C_AXP192_VERSION_20200609, | |
SIM800L_IP5306_VERSION_20200811, | |
T-A7670X, | |
T-Call-A7670X-V1-0, | |
T-Call-A7670X-V1-1, | |
T-A7608X | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update PlatformIO cache on every commit | |
uses: actions/cache@v4 | |
with: | |
path: ~/.platformio | |
key: platformio-${{ github.run_id }}-${{ matrix.envs }} | |
restore-keys: platformio # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache | |
- name: Update generated-files cache on every commit | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.pio/build/${{ matrix.envs }}/firmware.bin | |
.pio/build/${{ matrix.envs }}/partitions.bin | |
.pio/build/${{ matrix.envs }}/bootloader.bin | |
.pio/build/${{ matrix.envs }}/littlefs.bin | |
key: generated-files-${{ github.run_id }}-${{ matrix.envs }} | |
restore-keys: generated-files # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache | |
- name: Update package cache on every commit | |
uses: actions/cache@v4 | |
with: | |
path: package | |
key: package-${{ github.run_id }}-${{ matrix.envs }} | |
restore-keys: package # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache | |
- name: Set Variables | |
id: vars | |
run: | | |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
echo "branch=$(echo ${{ github.ref_name }} | tr / __)" >> $GITHUB_OUTPUT | |
- name: Prepare package*.zip artifact | |
run: | | |
rm -rf package | |
mkdir -p package | |
rm -rf package/*.zip | |
cp -f ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin "package/boot_app0.bin" | |
cp -f ".pio/build/${{ matrix.envs }}/firmware.bin" "package/firmware.bin" | |
cp -f ".pio/build/${{ matrix.envs }}/bootloader.bin" "package/bootloader.bin" | |
cp -f ".pio/build/${{ matrix.envs }}/partitions.bin" "package/partitions.bin" | |
cp -f ".pio/build/${{ matrix.envs }}/littlefs.bin" "package/littlefs.bin" | |
cd ./package | |
- name: Upload package.zip artifact (Firmware + Bootloader + Partitions + LittleFS) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "OBD2-MQTT-${{ matrix.envs }}-${{ steps.vars.outputs.branch }}_(${{ steps.vars.outputs.sha_short }})" | |
path: ./package |