Fix linux arm64 builds (#160)
This commit is contained in:
parent
c4b099462f
commit
8cb4107664
|
|
@ -15,14 +15,14 @@ jobs:
|
||||||
os: [ ubuntu-20.04, macos-latest, windows-latest ]
|
os: [ ubuntu-20.04, macos-latest, windows-latest ]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
timeout-minutes: 360
|
timeout-minutes: 360
|
||||||
|
env:
|
||||||
|
BUILD_ID: ${{ github.run_number }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout OpenLens
|
- name: Checkout OpenLens
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Export version to variable
|
- name: Export version to variable
|
||||||
run: |
|
run: echo "LENS_VERSION=$(cat version)" >> $GITHUB_ENV
|
||||||
export LENS_VERSION=$(cat version)
|
|
||||||
echo "LENS_VERSION=$LENS_VERSION" >> $GITHUB_ENV
|
|
||||||
echo "BUILD_NUMBER=${{ github.run_number }}" >> $GITHUB_ENV
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
|
|
@ -38,15 +38,14 @@ jobs:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Patch Upstream Lens
|
- name: Patch Upstream Lens
|
||||||
run: |
|
run: node update.js
|
||||||
node update.js
|
|
||||||
|
|
||||||
- name: Build Lens
|
- name: Build Lens
|
||||||
run: |
|
run: |
|
||||||
npm run all:install
|
npm run all:install
|
||||||
# Avoid npm install from electron-builder
|
# Avoid npm install from electron-builder
|
||||||
# ref: https://github.com/electron-userland/electron-builder/blob/80a3ae857b9305aff1774e1b2b932601af50231b/packages/app-builder-lib/src/util/yarn.ts#L11-L16
|
# ref: https://github.com/electron-userland/electron-builder/blob/80a3ae857b9305aff1774e1b2b932601af50231b/packages/app-builder-lib/src/util/yarn.ts#L11-L16
|
||||||
mkdir open-lens/node_modules
|
mkdir -p open-lens/node_modules
|
||||||
|
|
||||||
if [ "${CSC_LINK}" = "" ] || [ "${CSC_KEY_PASSWORD}" = "" ]; then
|
if [ "${CSC_LINK}" = "" ] || [ "${CSC_KEY_PASSWORD}" = "" ]; then
|
||||||
unset CSC_LINK
|
unset CSC_LINK
|
||||||
|
|
@ -55,8 +54,21 @@ jobs:
|
||||||
|
|
||||||
if [ "$RUNNER_OS" == "Windows" ]; then
|
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||||
npx nx run open-lens:build:app --win nsis msi portable
|
npx nx run open-lens:build:app --win nsis msi portable
|
||||||
|
elif [ "$RUNNER_OS" == "Linux" ]; then
|
||||||
|
npx nx run open-lens:build:app
|
||||||
|
npm run all:reinstall
|
||||||
|
npx nx reset
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y
|
||||||
|
export CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++
|
||||||
|
mkdir -p open-lens/node_modules
|
||||||
|
|
||||||
|
npx nx run open-lens:build:app --arm64
|
||||||
|
find . -name '*pty.node' -print0 | xargs -0 file
|
||||||
else
|
else
|
||||||
npx nx run open-lens:build:app --x64 --arm64
|
npx nx run open-lens:build:app --x64 --arm64
|
||||||
|
find . -name '*pty.node' -print0 | xargs -0 file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f open-lens/dist/*blockmap{,*}
|
rm -f open-lens/dist/*blockmap{,*}
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,12 @@ packageJsonOpenLens.build.publish = [{
|
||||||
provider: "generic"
|
provider: "generic"
|
||||||
}];
|
}];
|
||||||
|
|
||||||
packageJsonOpenLens.version = `${packageJsonOpenLens.version}-${process.env.BUILD_NUMBER}`;
|
packageJsonOpenLens.version = `${packageJsonOpenLens.version}-${process.env.BUILD_ID}`;
|
||||||
packageJsonOpenLens.build.npmRebuild = true;
|
packageJsonOpenLens.build.npmRebuild = true;
|
||||||
packageJsonOpenLens.build.detectUpdateChannel = false;
|
packageJsonOpenLens.build.detectUpdateChannel = false;
|
||||||
|
|
||||||
|
delete packageJsonOpenLens.scripts.postinstall;
|
||||||
|
|
||||||
packageJsonOpenLens.copyright = [
|
packageJsonOpenLens.copyright = [
|
||||||
packageJsonOpenLens.copyright,
|
packageJsonOpenLens.copyright,
|
||||||
'',
|
'',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue