diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae25d6b..89f0942 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,6 +36,13 @@ jobs: - uses: actions/checkout@v3 with: persist-credentials: false + - name: cache gui linux + uses: actions/cache@v3 + with: + key: linux+x86-64-20-pnpm-cargo-main + path: | + ./pnpm + ./target - name: build tauri for Linux if: startsWith(matrix.platform.name, 'linux') uses: docker://getneil/tea-builder:latest @@ -59,11 +66,22 @@ jobs: - uses: actions/checkout@v3 - uses: teaxyz/setup@v0 if: startsWith(matrix.platform.name, 'darwin') - + - name: cache gui 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-main + path: | + ./pnpm + ./target - name: build tauri for MacOS if: startsWith(matrix.platform.name, 'darwin') run: tea -ES xc build env: + CARGO_TARGET_DIR: ${{ github.workspace }}/target GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ENABLE_CODE_SIGNING: ${{ secrets.GUI_APPLE_CERTIFICATE }} APPLE_CERTIFICATE: ${{ secrets.GUI_APPLE_CERTIFICATE }} @@ -73,9 +91,9 @@ jobs: - name: build tauri for Linux if: startsWith(matrix.platform.name, 'linux') # TODO: https://tauri.app/v1/guides/distribution/sign-linux - uses: docker://getneil/tea-builder:latest + uses: ./devops/linux-builder - - run: tar -czvf artifacts.tgz -C ./modules/gui/src-tauri/target/release/bundle . + - run: tar -czvf artifacts.tgz -C ./target/release/bundle . - name: upload artifacts uses: actions/upload-artifact@v3