cache electron and pnpm

This commit is contained in:
neil 2023-02-04 08:33:09 +08:00
parent 2c6ec8e7c6
commit 4161d86285

View file

@ -117,16 +117,28 @@ jobs:
- uses: actions/checkout@v3
- uses: teaxyz/setup@v0
- name: cache gui build
- name: cache node_modules build
# TODO: cache issue in our self-hosted macos runner ESPIPE: invalid seek, read
# but its ok to ignore, its still the fastest builder
# NOTE: enabling cache in the self hosted runner slows down the pipeline by 4m because post-cache builder error ^
if: startsWith(matrix.platform.name, 'linux') || matrix.platform.name == 'darwin+x86-64'
uses: actions/cache@v3
with:
key: ${{matrix.platform.name}}-pnpm-cargo
key: ${{matrix.platform.name}}-pnpm
path: |
./pnpm
./.pnpm-store
./node_modules
./modules/desktop/node_modules
./modules/ui/node_modules
- name: cache electron build
uses: actions/cache@v3
with:
key: ${{matrix.platform.name}}-electron
path: |
./modules/desktop/.svelte-kit
./modules/desktop/build
./modules/desktop/dist
- name: build
if: startsWith(matrix.platform.name, 'darwin')
@ -150,7 +162,7 @@ jobs:
path: artifacts.tgz
if-no-files-found: error
notorize_tauri:
notorize_app:
needs: [build_desktop]
# NOTE: atm notarization is only doable in gh macos-11 not in our self-hosted runner
runs-on: macos-11
@ -173,7 +185,7 @@ jobs:
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
upload:
needs: [notorize_tauri, changes]
needs: [notorize_app, changes]
runs-on: ubuntu-latest
strategy:
matrix: