From 043bca7aec2a0279d91b8e5b81273454e6dfbabb Mon Sep 17 00:00:00 2001 From: Shlok Amin Date: Mon, 1 Jul 2024 14:43:17 -0400 Subject: [PATCH 1/2] ci(app-shell): update macos github runner version (#15559) --- .github/workflows/app-test-build-deploy.yaml | 6 +++--- app-shell/Makefile | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/app-test-build-deploy.yaml b/.github/workflows/app-test-build-deploy.yaml index 4cc3754ace6..79a234eba14 100644 --- a/.github/workflows/app-test-build-deploy.yaml +++ b/.github/workflows/app-test-build-deploy.yaml @@ -96,7 +96,7 @@ jobs: backend-unit-test: strategy: matrix: - os: ['windows-2022', 'ubuntu-22.04', 'macos-11'] + os: ['windows-2022', 'ubuntu-22.04', 'macos-latest'] name: 'opentrons app backend unit tests on ${{matrix.os}}' runs-on: ${{ matrix.os }} steps: @@ -228,13 +228,13 @@ jobs: if: needs.determine-build-type.outputs.variants != '[]' strategy: matrix: - os: ['windows-2022', 'ubuntu-22.04', 'macos-11'] + os: ['windows-2022', 'ubuntu-22.04', 'macos-latest'] variant: ${{fromJSON(needs.determine-build-type.outputs.variants)}} target: ['desktop', 'odd'] exclude: - os: 'windows-2022' target: 'odd' - - os: 'macos-11' + - os: 'macos-latest' target: 'odd' runs-on: ${{ matrix.os }} diff --git a/app-shell/Makefile b/app-shell/Makefile index ec86ee924ff..32c8b7ce01e 100644 --- a/app-shell/Makefile +++ b/app-shell/Makefile @@ -145,9 +145,6 @@ dist-ot3: package-deps .PHONY: dist-macos-latest dist-macos-latest: dist-osx -.PHONY: dist-macos-11 -dist-macos-11: dist-osx - .PHONY: dist-ubuntu-latest dist-ubuntu-latest: dist-linux From a77ffd7a091e3c1a603ea0bcf9c67ecda94bb9a5 Mon Sep 17 00:00:00 2001 From: Josh McVey Date: Thu, 11 Jul 2024 14:32:05 -0500 Subject: [PATCH 2/2] RQA-2830 fix mac dmg to be x64 binary and use x64 bundled python to pip install (#15624) ## Replaces #15618 with PR against branch name ending in `app-build-internal` to trigger a build ## Overview - - `macos-11` GitHub runner was intel and now we use macos-latest that is arm [doc](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories) - specify --x64 argument to electron-builder - ~~per [doc](https://github.com/actions/setup-python?tab=readme-ov-file#supported-architectures) x64 python should be installed so the pip install will be the right platform. I'm not confident in this.~~ - see comment in #15618 - we need to use the python we download on mac to do the pip install so the installed packages match the platform correctly ## Test Plan - [x] build locally and see that it works - [x] watch CI and install the built package - [x] validate that once the package dmg is x64 that analysis works (python has packages with the right arch) # Review requests - This the right approach? # Risk assessment High because our .dmg currently cannot analyze protocols 2.0.0-alpha.0 internal release build. --- app-shell/Makefile | 2 +- app-shell/scripts/before-pack.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app-shell/Makefile b/app-shell/Makefile index 32c8b7ce01e..9624aa1a54e 100644 --- a/app-shell/Makefile +++ b/app-shell/Makefile @@ -122,7 +122,7 @@ dist-posix: package-deps .PHONY: dist-osx dist-osx: package-deps - $(builder) --mac + $(builder) --mac --x64 $(MAKE) _dist-collect-artifacts .PHONY: dist-linux diff --git a/app-shell/scripts/before-pack.js b/app-shell/scripts/before-pack.js index 6e96609786f..bb5e2d45485 100644 --- a/app-shell/scripts/before-pack.js +++ b/app-shell/scripts/before-pack.js @@ -118,7 +118,16 @@ module.exports = function beforeBuild(context) { // TODO(mc, 2022-05-16): explore virtualenvs for a more reliable // implementation of this install - return execa(HOST_PYTHON, [ + console.log( + `Installing python native deps using ${path.join( + PYTHON_DESTINATION, + 'python3.10' + )}` + ) + const invokablePython = platformName.includes('darwin') + ? path.join(PYTHON_DESTINATION, 'python/bin/python3.10') + : HOST_PYTHON + return execa(invokablePython, [ '-m', 'pip', 'install',