From a309ecb6bcd55b026ff203fe5903f02c49f1beb5 Mon Sep 17 00:00:00 2001 From: Edwin Joassart Date: Tue, 5 Dec 2023 16:18:06 +0100 Subject: [PATCH] patch: add arm64 mac runner & build on node 18.18 --- .github/actions/publish/action.yml | 21 +++++++++++++++------ .github/actions/test/action.yml | 4 ++-- .github/workflows/flowzone.yml | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/actions/publish/action.yml b/.github/actions/publish/action.yml index d4aa3dc7..23a1e5b0 100644 --- a/.github/actions/publish/action.yml +++ b/.github/actions/publish/action.yml @@ -12,7 +12,9 @@ inputs: # --- custom environment NODE_VERSION: type: string - default: "18.x" + # Beware that node native modules will be built for that version, which might no be compatible with the one used by pkg (see forge.sidecar.ts) + # https://github.com/vercel/pkg-fetch/releases + default: "18.18" VERBOSE: type: string default: "true" @@ -24,7 +26,7 @@ runs: - name: Download custom source artifact uses: actions/download-artifact@v3 with: - name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }} + name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }} path: ${{ runner.temp }} - name: Extract custom source artifact @@ -57,7 +59,7 @@ runs: # we update to npm 10+. uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4 with: - python-version: '3.11' + python-version: "3.11" # https://www.electron.build/code-signing.html # https://dev.to/rwwagner90/signing-electron-apps-with-github-actions-4cof @@ -95,7 +97,7 @@ runs: id: import_win_signing_cert uses: timheuer/base64-to-file@v1 with: - fileName: 'win-cert.pfx' + fileName: "win-cert.pfx" encodedString: ${{ fromJSON(inputs.secrets).WINDOWS_SIGNING }} - name: Package release @@ -115,7 +117,14 @@ runs: elif [[ "${RUNNER_OS}" == macOS ]]; then PLATFORM=Darwin - BUILD_ARCHS="x64,arm64" + if [[ "${RUNNER_ARCH}" == "X64" ]]; then + BUILD_ARCHS="x64" + elif [[ "${RUNNER_ARCH}" == "ARM64" ]]; then + BUILD_ARCHS="arm64" + else + echo "ERROR: unexpected runner arch: ${RUNNER_ARCH}" + exit 1 + fi SHA256SUM_BIN='shasum -a 256' elif [[ "${RUNNER_OS}" == Windows ]]; then @@ -153,7 +162,7 @@ runs: NODE_ENV: production # analytics tokens SENTRY_TOKEN: https://739bbcfc0ba4481481138d3fc831136d@o95242.ingest.sentry.io/4504451487301632 - AMPLITUDE_TOKEN: 'balena-etcher' + AMPLITUDE_TOKEN: "balena-etcher" # Apple notarization XCODE_APP_LOADER_EMAIL: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_EMAIL }} XCODE_APP_LOADER_PASSWORD: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_PASSWORD }} diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 75e9be9b..921033d0 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -12,7 +12,7 @@ inputs: # --- custom environment NODE_VERSION: type: string - default: "18.x" + default: "18.18" VERBOSE: type: string default: "true" @@ -77,6 +77,6 @@ runs: - name: Upload custom artifact uses: actions/upload-artifact@v3 with: - name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }} + name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }} path: ${{ runner.temp }}/custom.tgz retention-days: 1 diff --git a/.github/workflows/flowzone.yml b/.github/workflows/flowzone.yml index 1193e1f7..dbf45d8e 100644 --- a/.github/workflows/flowzone.yml +++ b/.github/workflows/flowzone.yml @@ -20,7 +20,7 @@ jobs: (github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target') secrets: inherit with: - tests_run_on: '["ubuntu-20.04","macos-12","windows-2019"]' + tests_run_on: '["ubuntu-20.04","macos-12","windows-2019","macos-latest-xlarge"]' restrict_custom_actions: false github_prerelease: true repo_config: true