mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-11 14:07:00 +03:00
pack for fresh install now cleaner part of build
This commit is contained in:
76
.github/workflows/build.yaml
vendored
76
.github/workflows/build.yaml
vendored
@@ -171,12 +171,63 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#########################################################################################
|
||||||
|
## Pack for a fresh install (USB flashing) (initial_esp32_setup)
|
||||||
|
#########################################################################################
|
||||||
|
pack-for-fresh-install:
|
||||||
|
# creates old style binaries for fresh installation (backward compatible to wiki)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get generated files from cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
./code/.pio/build/esp32cam/firmware.bin
|
||||||
|
./code/.pio/build/esp32cam/partitions.bin
|
||||||
|
./code/.pio/build/esp32cam/bootloader.bin
|
||||||
|
./sd-card/html/version.txt
|
||||||
|
key: ${{ github.run_number }}
|
||||||
|
|
||||||
|
- name: Prepare artifacts for release
|
||||||
|
run: |
|
||||||
|
mkdir -p firmware
|
||||||
|
rm -rf firmware/*
|
||||||
|
mkdir -p release
|
||||||
|
# copy builds to firmware folder
|
||||||
|
cp -f "./code/.pio/build/esp32cam/firmware.bin" "firmware/firmware.bin"
|
||||||
|
cp -f "./code/.pio/build/esp32cam/bootloader.bin" "firmware/bootloader.bin"
|
||||||
|
cp -f "./code/.pio/build/esp32cam/partitions.bin" "firmware/partitions.bin"
|
||||||
|
zip -r ./firmware/sd-card.zip sd-card
|
||||||
|
cd ../firmware
|
||||||
|
zip -r ../release/initial_esp32_setup.zip .
|
||||||
|
|
||||||
|
- name: Upload initial_esp32_setup.zip artifact (Firmware + Bootloader + Partitions + Web UI)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: "initial_esp32_setup__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
|
||||||
|
path: ./firmware
|
||||||
|
|
||||||
|
- name: Store generated files in cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
./firmware
|
||||||
|
key: ${{ github.run_number }}-pack-for-fresh-install
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
## Prepare and create release
|
## Prepare and create release
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: pack-for-OTA-v2
|
needs: [pack-for-OTA-v2, pack-for-fresh-install]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -192,6 +243,14 @@ jobs:
|
|||||||
./dist
|
./dist
|
||||||
key: ${{ github.run_number }}-pack-for-OTA-v2
|
key: ${{ github.run_number }}-pack-for-OTA-v2
|
||||||
|
|
||||||
|
# import cached artifacts from pack-for-fresh-install
|
||||||
|
- name: Get generated files from cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
./firmware
|
||||||
|
key: ${{ github.run_number }}-pack-for-fresh-install
|
||||||
|
|
||||||
- name: Set Variables
|
- name: Set Variables
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
@@ -200,15 +259,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Prepare artifacts for release
|
- name: Prepare artifacts for release
|
||||||
run: |
|
run: |
|
||||||
ls -la ./dist
|
|
||||||
mkdir -p firmware
|
|
||||||
rm -rf firmware/*
|
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
# copy builds to firmware folder
|
|
||||||
cp -f "./code/.pio/build/esp32cam/firmware.bin" "firmware/firmware.bin"
|
|
||||||
cp -f "./code/.pio/build/esp32cam/bootloader.bin" "firmware/bootloader.bin"
|
|
||||||
cp -f "./code/.pio/build/esp32cam/partitions.bin" "firmware/partitions.bin"
|
|
||||||
zip -r ./firmware/sd-card.zip sd-card
|
|
||||||
# create a update.zip like "update__rolling"
|
# create a update.zip like "update__rolling"
|
||||||
cd ./dist
|
cd ./dist
|
||||||
zip -r ../release/update.zip .
|
zip -r ../release/update.zip .
|
||||||
@@ -216,13 +267,6 @@ jobs:
|
|||||||
zip -r ../release/initial_esp32_setup.zip .
|
zip -r ../release/initial_esp32_setup.zip .
|
||||||
|
|
||||||
|
|
||||||
- name: Upload initial_esp32_setup.zip artifact (Firmware + Bootloader + Partitions + Web UI)
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: "initial_esp32_setup__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
|
|
||||||
path: ./firmware
|
|
||||||
|
|
||||||
|
|
||||||
# extract the version used in next step
|
# extract the version used in next step
|
||||||
- id: get_version
|
- id: get_version
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
|||||||
Reference in New Issue
Block a user