Skip to content

Commit

Permalink
[PM-7646][PM-5506] Rust IPC changes: Episode 2 (#11122)
Browse files Browse the repository at this point in the history
* Revert "[PM-7646][PM-5506] Revert IPC changes (#10946)"

This reverts commit ed4d481.

* Ensure tmp dir gets created on MacOS

* Remove client reconnections

* Improve client error handling and process exiting
  • Loading branch information
dani-garcia authored Oct 1, 2024
1 parent 2b78ac5 commit 9aeb412
Show file tree
Hide file tree
Showing 33 changed files with 1,354 additions and 348 deletions.
45 changes: 28 additions & 17 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,20 +174,21 @@ jobs:
with:
path: |
apps/desktop/desktop_native/napi/*.node
apps/desktop/desktop_native/dist/*
${{ env.RUNNER_TEMP }}/.cargo/registry
${{ env.RUNNER_TEMP }}/.cargo/git
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}

- name: Build Native Module
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native/napi
working-directory: apps/desktop/desktop_native
env:
PKG_CONFIG_ALLOW_CROSS: true
PKG_CONFIG_ALL_STATIC: true
TARGET: musl
run: |
rustup target add x86_64-unknown-linux-musl
npm run build:cross-platform
node build.js cross-platform
- name: Build application
run: npm run dist:lin
Expand Down Expand Up @@ -301,13 +302,15 @@ jobs:
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache
with:
path: apps/desktop/desktop_native/napi/*.node
path: |
apps/desktop/desktop_native/napi/*.node
apps/desktop/desktop_native/dist/*
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}

- name: Build Native Module
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native/napi
run: npm run build:cross-platform
working-directory: apps/desktop/desktop_native
run: node build.js cross-platform

- name: Build & Sign (dev)
env:
Expand Down Expand Up @@ -584,13 +587,15 @@ jobs:
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache
with:
path: apps/desktop/desktop_native/napi/*.node
path: |
apps/desktop/desktop_native/napi/*.node
apps/desktop/desktop_native/dist/*
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}

- name: Build Native Module
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native/napi
run: npm run build:cross-platform
working-directory: apps/desktop/desktop_native
run: node build.js cross-platform

- name: Build application (dev)
run: npm run build
Expand Down Expand Up @@ -748,13 +753,15 @@ jobs:
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache
with:
path: apps/desktop/desktop_native/napi/*.node
path: |
apps/desktop/desktop_native/napi/*.node
apps/desktop/desktop_native/dist/*
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}

- name: Build Native Module
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native/napi
run: npm run build:cross-platform
working-directory: apps/desktop/desktop_native
run: node build.js cross-platform

- name: Build
if: steps.build-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -972,13 +979,15 @@ jobs:
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache
with:
path: apps/desktop/desktop_native/napi/*.node
path: |
apps/desktop/desktop_native/napi/*.node
apps/desktop/desktop_native/dist/*
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}

- name: Build Native Module
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native/napi
run: npm run build:cross-platform
working-directory: apps/desktop/desktop_native
run: node build.js cross-platform

- name: Build
if: steps.build-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -1205,13 +1214,15 @@ jobs:
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache
with:
path: apps/desktop/desktop_native/napi/*.node
path: |
apps/desktop/desktop_native/napi/*.node
apps/desktop/desktop_native/dist/*
key: rust-${{ runner.os }}-${{ hashFiles('apps/desktop/desktop_native/**/*') }}

- name: Build Native Module
if: steps.cache.outputs.cache-hit != 'true'
working-directory: apps/desktop/desktop_native/napi
run: npm run build:cross-platform
working-directory: apps/desktop/desktop_native
run: node build.js cross-platform

- name: Build
if: steps.build-cache.outputs.cache-hit != 'true'
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/desktop_native/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ index.node
**/.DS_Store
npm-debug.log*
*.node
dist
Loading

0 comments on commit 9aeb412

Please sign in to comment.