mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-20 22:48:26 +03:00
use cache
This commit is contained in:
41
.github/workflows/build.yaml
vendored
41
.github/workflows/build.yaml
vendored
@@ -158,6 +158,18 @@ jobs:
|
|||||||
name: "update__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
|
name: "update__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
|
||||||
path: ./dist/*
|
path: ./dist/*
|
||||||
|
|
||||||
|
- name: Store generated files in 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
|
||||||
|
./dist
|
||||||
|
key: ${{ github.run_number }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
@@ -182,19 +194,38 @@ jobs:
|
|||||||
key: ${{ github.run_number }}
|
key: ${{ github.run_number }}
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
## Prepare release
|
## Prepare and create release
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: pack-for-OTA-v2
|
||||||
|
|
||||||
|
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
|
||||||
|
./dist
|
||||||
|
key: ${{ github.run_number }}
|
||||||
|
|
||||||
- name: Set Variables
|
- name: Set Variables
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
||||||
|
|
||||||
|
|
||||||
- name: Prepare artifacts for release
|
- name: Prepare artifacts for release
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
run: |
|
run: |
|
||||||
mkdir -p release
|
mkdir -p firmware
|
||||||
# copy builds to release folder
|
mkdir -p firmware
|
||||||
|
# copy builds to firmware folder
|
||||||
cp -f "./code/.pio/build/esp32cam/firmware.bin" "release/firmware.bin"
|
cp -f "./code/.pio/build/esp32cam/firmware.bin" "release/firmware.bin"
|
||||||
cp -f "./code/.pio/build/esp32cam/bootloader.bin" "release/bootloader.bin"
|
cp -f "./code/.pio/build/esp32cam/bootloader.bin" "release/bootloader.bin"
|
||||||
cp -f "./code/.pio/build/esp32cam/partitions.bin" "release/partitions.bin"
|
cp -f "./code/.pio/build/esp32cam/partitions.bin" "release/partitions.bin"
|
||||||
@@ -206,11 +237,11 @@ jobs:
|
|||||||
zip -r ../release/update.zip .
|
zip -r ../release/update.zip .
|
||||||
|
|
||||||
|
|
||||||
- name: Upload initial_esp32_setup.zip artifact (Firmware + Bootloader + Partitions + Web UI + CNN)
|
- name: Upload initial_esp32_setup.zip artifact (Firmware + Bootloader + Partitions + Web UI)
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: "initial_esp32_setup__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
|
name: "initial_esp32_setup__${{ github.ref_name }}_(${{ steps.vars.outputs.sha_short }})"
|
||||||
path: ./firmware
|
path: ./release
|
||||||
|
|
||||||
|
|
||||||
# extract the version used in next step
|
# extract the version used in next step
|
||||||
|
|||||||
Reference in New Issue
Block a user