From 01a96bb6de1ff00d20f7784469dd05286069e014 Mon Sep 17 00:00:00 2001 From: Akis Kesoglou Date: Thu, 21 Dec 2023 14:59:48 +0200 Subject: [PATCH] Use native ARM runner for Apple Silicon builds Change-type: minor --- .github/actions/publish/action.yml | 14 ++++++-------- .github/actions/test/action.yml | 4 ++-- .github/workflows/flowzone.yml | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/actions/publish/action.yml b/.github/actions/publish/action.yml index be559f1e..3d6bd23a 100644 --- a/.github/actions/publish/action.yml +++ b/.github/actions/publish/action.yml @@ -27,7 +27,7 @@ runs: - name: Download custom source artifact uses: actions/download-artifact@v4 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 @@ -122,29 +122,27 @@ runs: fi APPLICATION_VERSION="$(jq -r '.version' package.json)" + HOST_ARCH="$(echo "${RUNNER_ARCH}" | tr '[:upper:]' '[:lower:]')" if [[ "${RUNNER_OS}" == Linux ]]; then PLATFORM=Linux - BUILD_ARCHS="x64" SHA256SUM_BIN=sha256sum elif [[ "${RUNNER_OS}" == macOS ]]; then PLATFORM=Darwin - BUILD_ARCHS="x64,arm64" SHA256SUM_BIN='shasum -a 256' elif [[ "${RUNNER_OS}" == Windows ]]; then PLATFORM=Windows SHA256SUM_BIN=sha256sum - #BUILD_ARCHS="ia32,x64" -- distutils fails to build for ia32 - BUILD_ARCHS="x64" else echo "ERROR: unexpected runner OS: ${RUNNER_OS}" exit 1 fi - npx electron-forge make --arch="${BUILD_ARCHS}" + # Currently, we can only build for the host architecture. + npx electron-forge make echo "version=${APPLICATION_VERSION}" >> $GITHUB_OUTPUT @@ -162,7 +160,7 @@ runs: if [[ -n "${SHA256SUM_BIN}" ]]; then # Compute and save digests. cd dist/ - ${SHA256SUM_BIN} *.* >"SHA256SUMS.${PLATFORM}.txt" + ${SHA256SUM_BIN} *.* >"SHA256SUMS.${PLATFORM}.${HOST_ARCH}.txt" fi env: # ensure we sign the artifacts @@ -181,7 +179,7 @@ runs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: gh-release-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }} + name: gh-release-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }} path: dist retention-days: 1 if-no-files-found: error diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 4874faa1..0d50b21c 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@v4 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 bac8c673..0bf3b02f 100644 --- a/.github/workflows/flowzone.yml +++ b/.github/workflows/flowzone.yml @@ -18,7 +18,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","windows-2019","macos-12","macos-latest-xlarge"]' restrict_custom_actions: false github_prerelease: true cloudflare_website: "etcher"