mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-16 15:56:33 +00:00
Use native ARM runner for Apple Silicon builds
Change-type: minor
This commit is contained in:
parent
2e3a75e685
commit
01a96bb6de
14
.github/actions/publish/action.yml
vendored
14
.github/actions/publish/action.yml
vendored
@ -27,7 +27,7 @@ runs:
|
|||||||
- name: Download custom source artifact
|
- name: Download custom source artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
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 }}
|
path: ${{ runner.temp }}
|
||||||
|
|
||||||
- name: Extract custom source artifact
|
- name: Extract custom source artifact
|
||||||
@ -122,29 +122,27 @@ runs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
APPLICATION_VERSION="$(jq -r '.version' package.json)"
|
APPLICATION_VERSION="$(jq -r '.version' package.json)"
|
||||||
|
HOST_ARCH="$(echo "${RUNNER_ARCH}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
|
||||||
if [[ "${RUNNER_OS}" == Linux ]]; then
|
if [[ "${RUNNER_OS}" == Linux ]]; then
|
||||||
PLATFORM=Linux
|
PLATFORM=Linux
|
||||||
BUILD_ARCHS="x64"
|
|
||||||
SHA256SUM_BIN=sha256sum
|
SHA256SUM_BIN=sha256sum
|
||||||
|
|
||||||
elif [[ "${RUNNER_OS}" == macOS ]]; then
|
elif [[ "${RUNNER_OS}" == macOS ]]; then
|
||||||
PLATFORM=Darwin
|
PLATFORM=Darwin
|
||||||
BUILD_ARCHS="x64,arm64"
|
|
||||||
SHA256SUM_BIN='shasum -a 256'
|
SHA256SUM_BIN='shasum -a 256'
|
||||||
|
|
||||||
elif [[ "${RUNNER_OS}" == Windows ]]; then
|
elif [[ "${RUNNER_OS}" == Windows ]]; then
|
||||||
PLATFORM=Windows
|
PLATFORM=Windows
|
||||||
SHA256SUM_BIN=sha256sum
|
SHA256SUM_BIN=sha256sum
|
||||||
#BUILD_ARCHS="ia32,x64" -- distutils fails to build for ia32
|
|
||||||
BUILD_ARCHS="x64"
|
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "ERROR: unexpected runner OS: ${RUNNER_OS}"
|
echo "ERROR: unexpected runner OS: ${RUNNER_OS}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
echo "version=${APPLICATION_VERSION}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
@ -162,7 +160,7 @@ runs:
|
|||||||
if [[ -n "${SHA256SUM_BIN}" ]]; then
|
if [[ -n "${SHA256SUM_BIN}" ]]; then
|
||||||
# Compute and save digests.
|
# Compute and save digests.
|
||||||
cd dist/
|
cd dist/
|
||||||
${SHA256SUM_BIN} *.* >"SHA256SUMS.${PLATFORM}.txt"
|
${SHA256SUM_BIN} *.* >"SHA256SUMS.${PLATFORM}.${HOST_ARCH}.txt"
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
# ensure we sign the artifacts
|
# ensure we sign the artifacts
|
||||||
@ -181,7 +179,7 @@ runs:
|
|||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
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
|
path: dist
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
4
.github/actions/test/action.yml
vendored
4
.github/actions/test/action.yml
vendored
@ -12,7 +12,7 @@ inputs:
|
|||||||
# --- custom environment
|
# --- custom environment
|
||||||
NODE_VERSION:
|
NODE_VERSION:
|
||||||
type: string
|
type: string
|
||||||
default: "18.x"
|
default: "18.18"
|
||||||
VERBOSE:
|
VERBOSE:
|
||||||
type: string
|
type: string
|
||||||
default: "true"
|
default: "true"
|
||||||
@ -77,6 +77,6 @@ runs:
|
|||||||
- name: Upload custom artifact
|
- name: Upload custom artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
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
|
path: ${{ runner.temp }}/custom.tgz
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
2
.github/workflows/flowzone.yml
vendored
2
.github/workflows/flowzone.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
(github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target')
|
(github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target')
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
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
|
restrict_custom_actions: false
|
||||||
github_prerelease: true
|
github_prerelease: true
|
||||||
cloudflare_website: "etcher"
|
cloudflare_website: "etcher"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user