Actions: Also cache wasm (#11200)
This commit is contained in:
@@ -63,7 +63,7 @@ jobs:
|
|||||||
uses: actions/cache/restore@v6
|
uses: actions/cache/restore@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.platformio/.cache
|
path: ~/.platformio/.cache
|
||||||
key: pio-macos-${{ inputs.macos_ver }}-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini') }}
|
key: pio-macos-${{ inputs.macos_ver }}-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini', 'variants/native/portduino/platformio.ini') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
pio-macos-${{ inputs.macos_ver }}-
|
pio-macos-${{ inputs.macos_ver }}-
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ jobs:
|
|||||||
uses: actions/cache/save@v6
|
uses: actions/cache/save@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.platformio/.cache
|
path: ~/.platformio/.cache
|
||||||
key: pio-macos-${{ inputs.macos_ver }}-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini') }}
|
key: pio-macos-${{ inputs.macos_ver }}-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini', 'variants/native/portduino/platformio.ini') }}
|
||||||
|
|
||||||
- name: List output files
|
- name: List output files
|
||||||
run: ls -lah .pio/build/native-macos/
|
run: ls -lah .pio/build/native-macos/
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ jobs:
|
|||||||
build-wasm:
|
build-wasm:
|
||||||
name: Build PortDuino WASM
|
name: Build PortDuino WASM
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Only pushes to the default branch (develop) populate the cache; PR / merge_group runs
|
||||||
|
# restore it but never save, so they stop filling up the repo's Actions cache storage.
|
||||||
|
env:
|
||||||
|
SAVE_CACHE: ${{ github.event_name == 'push' && github.ref_name == github.event.repository.default_branch }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
with:
|
with:
|
||||||
@@ -34,9 +38,25 @@ jobs:
|
|||||||
version: 6.0.1
|
version: 6.0.1
|
||||||
actions-cache-folder: emsdk-cache
|
actions-cache-folder: emsdk-cache
|
||||||
|
|
||||||
|
- name: Restore PlatformIO cache
|
||||||
|
id: pio-cache
|
||||||
|
uses: actions/cache/restore@v6
|
||||||
|
with:
|
||||||
|
path: ~/.platformio/.cache
|
||||||
|
key: pio-wasm-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini', 'variants/native/portduino/platformio.ini') }}
|
||||||
|
restore-keys: |
|
||||||
|
pio-wasm-
|
||||||
|
|
||||||
- name: Build PortDuino WASM
|
- name: Build PortDuino WASM
|
||||||
run: platformio run -e native-wasm
|
run: platformio run -e native-wasm
|
||||||
|
|
||||||
|
- name: Save PlatformIO cache
|
||||||
|
if: env.SAVE_CACHE == 'true' && steps.pio-cache.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v6
|
||||||
|
with:
|
||||||
|
path: ~/.platformio/.cache
|
||||||
|
key: pio-wasm-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini', 'variants/native/portduino/platformio.ini') }}
|
||||||
|
|
||||||
- name: Assert WASM artifacts
|
- name: Assert WASM artifacts
|
||||||
run: |
|
run: |
|
||||||
OUT=.pio/build/native-wasm
|
OUT=.pio/build/native-wasm
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ jobs:
|
|||||||
uses: actions/cache/restore@v6
|
uses: actions/cache/restore@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.platformio/.cache
|
path: ~/.platformio/.cache
|
||||||
key: pio-windows-${{ inputs.windows_ver }}-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini') }}
|
key: pio-windows-${{ inputs.windows_ver }}-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini', 'variants/native/portduino/platformio.ini') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
pio-windows-${{ inputs.windows_ver }}-
|
pio-windows-${{ inputs.windows_ver }}-
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
uses: actions/cache/save@v6
|
uses: actions/cache/save@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.platformio/.cache
|
path: ~/.platformio/.cache
|
||||||
key: pio-windows-${{ inputs.windows_ver }}-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini') }}
|
key: pio-windows-${{ inputs.windows_ver }}-${{ hashFiles('platformio.ini', 'variants/native/portduino.ini', 'variants/native/portduino/platformio.ini') }}
|
||||||
|
|
||||||
- name: List output files
|
- name: List output files
|
||||||
run: ls -lah .pio/build/native-windows/
|
run: ls -lah .pio/build/native-windows/
|
||||||
|
|||||||
Reference in New Issue
Block a user