Skip to content

Commit

Permalink
remove win-arm64 experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
ab77 committed Jan 5, 2023
1 parent b24ce85 commit c62ffbe
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 108 deletions.
25 changes: 6 additions & 19 deletions .github/actions/publish/action.yml
Expand Up @@ -15,10 +15,10 @@ inputs:
default: "accounts+apple@balena.io"
NODE_VERSION:
type: string
default: "16.19.0"
default: "16.x"
VERBOSE:
type: string
default: "true"
default: "false"

runs:
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
Expand Down Expand Up @@ -91,8 +91,6 @@ runs:
run: |
set -ea
[[ '${{ inputs.VERBOSE }}' =~ on|On|Yes|yes|true|True ]] && set -x
branch="$(echo '${{ github.event.pull_request.head.ref }}' | sed 's/[^[:alnum:]]/-/g')"
stdout="$(resinci-deploy store sentry \
Expand All @@ -102,6 +100,7 @@ runs:
--org="$(yq e '.sentry.org' repo.yml)" \
--type="$(yq e '.sentry.type' repo.yml)")"
echo "::add-mask::${stdout}"
echo "dsn=$(echo "${stdout}" | tail -n 1)" >> $GITHUB_OUTPUT
env:
Expand Down Expand Up @@ -180,22 +179,13 @@ runs:
for arch in ${archs[*]}; do
# (re)build|pack for all non-x64 architectures
if ! [[ "$arch" =~ x64 ]]; then
# FIXME: remove when Node.js win-arm64 support ships
# https://github.com/nodejs/build/issues/2450#issuecomment-1367786829
if [[ "$runner_os" =~ win ]] && [[ "$arch" =~ arm64 ]]; then
find "$(dirname $(which node))/.." -type f -name node-gyp.js \
| xargs -I{} node {} install \
--dist-url=https://unofficial-builds.nodejs.org/download/release
fi
npm ci
find node_modules -type d \( -name 'prebuilds' -o -name 'deps' \) \
| xargs -L1 -I{} find {} -type f
npm run build
fi
find node_modules -type d \( -name 'prebuilds' -o -name 'deps' \) \
| xargs -L1 -I{} find {} -type f
electron-builder "--${ELECTRON_BUILDER_OS}" "${target}" "--${arch}" \
--c.extraMetadata.analytics.sentry.token='${{ steps.sentry.outputs.dsn }}' \
--c.extraMetadata.analytics.mixpanel.token='balena-etcher' \
Expand All @@ -214,9 +204,6 @@ runs:
# https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/#improvements-for-public-repository-forks
# https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks#about-workflow-runs-from-public-forks
CSC_FOR_PULL_REQUEST: true
# https://www.electron.build/#debug
DEBUG: electron-builder
NPM_CONFIG_loglevel: verbose

# https://www.electron.build/auto-update.html#staged-rollouts
- name: Configure staged rollout(s)
Expand Down
5 changes: 2 additions & 3 deletions .github/actions/test/action.yml
Expand Up @@ -12,10 +12,10 @@ inputs:
# --- custom environment
NODE_VERSION:
type: string
default: "16.19.0"
default: "16.x"
VERBOSE:
type: string
default: "true"
default: "false"

runs:
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
Expand Down Expand Up @@ -54,7 +54,6 @@ runs:
env:
# https://www.electronjs.org/docs/latest/api/environment-variables
ELECTRON_NO_ATTACH_CONSOLE: true
NPM_CONFIG_loglevel: verbose

- name: Compress custom source
shell: pwsh
Expand Down
21 changes: 11 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions package.json
Expand Up @@ -22,9 +22,8 @@
"lint-ts": "balena-lint --fix --typescript typings lib tests scripts/clean-shrinkwrap.ts webpack.config.ts",
"lint": "npm run lint-ts && npm run lint-css",
"postinstall": "bash scripts/ci/postinstall.sh",
"preinstall": "bash scripts/ci/preinstall.sh",
"sanity-checks": "bash scripts/ci/ensure-all-file-extensions-in-gitattributes.sh",
"start": "node_modules/.bin/electron .",
"start": "npx electron .",
"test-gui": "electron-mocha --recursive --reporter spec --require ts-node/register/transpile-only --require-main tests/gui/allow-renderer-process-reuse.ts --full-trace --no-sandbox --renderer tests/gui/**/*.ts",
"test-linux": "npm run lint && xvfb-run --auto-servernum npm run test-gui && xvfb-run --auto-servernum npm run test-shared && xvfb-run --auto-servernum npm run test-spectron && npm run sanity-checks",
"test-macos": "npm run lint && npm run test-gui && npm run test-shared && npm run test-spectron && npm run sanity-checks",
Expand Down Expand Up @@ -82,7 +81,7 @@
"electron-rebuild": "3.2.9",
"electron-updater": "5.3.0",
"esbuild-loader": "2.20.0",
"etcher-sdk": "7.4.7-build-ab77-operational-6f10344d887bcf306b3bf897a5451666f6590ae9-1",
"etcher-sdk": "7.5.0-build-ab77-operational-35e295db2fa5fb99723c20a68b3b72ddec42a40c-1",
"file-loader": "6.2.0",
"husky": "4.3.8",
"i18next": "21.10.0",
Expand Down Expand Up @@ -182,15 +181,13 @@
{
"target": "nsis",
"arch": [
"x64",
"arm64"
"x64"
]
},
{
"target": "portable",
"arch": [
"x64",
"arm64"
"x64"
]
}
]
Expand Down
47 changes: 0 additions & 47 deletions patches/lzma-native+8.0.6.patch

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/ci/ensure-all-file-extensions-in-gitattributes.sh
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

###
# Copyright 2017 balena.io
Expand Down
12 changes: 0 additions & 12 deletions scripts/ci/postinstall.sh
Expand Up @@ -7,18 +7,6 @@ set -ea
# use specified or fallback to platform architecture
arch="${arch:-$(node -e 'console.log(os.arch())')}"

# FIXME: remove when lzma-native ships with win-arm64 suport
# https://github.com/addaleax/lzma-native/issues/132
pushd node_modules/lzma-native
# https://docs.npmjs.com/cli/v9/using-npm/config#environment-variables
NPM_CONFIG_arch="${arch}" \
NPM_CONFIG_target_arch="${NPM_CONFIG_arch}" npm i

# https://github.com/prebuild/prebuildify#options
# https://www.npmjs.com/package/node-gyp-build
PREBUILD_ARCH="${NPM_CONFIG_arch}" npm run prebuild
popd

# FIXME: (re)build for the latest version of electron, since v13.x uses ancient node-gyp
# https://releases.electronjs.org/releases/stable
electron_version="${ELECTRON_VERSION:-$(npm view electron --json | jq -r '.version')}"
Expand Down
9 changes: 0 additions & 9 deletions scripts/ci/preinstall.sh

This file was deleted.

0 comments on commit c62ffbe

Please sign in to comment.