Move node ci+release to self hosted Ubuntu arm64 (#873)

This commit is contained in:
Andrew Calcutt
2023-03-03 13:14:28 -05:00
committed by GitHub
parent 87025882ec
commit fb1572bcfb
4 changed files with 12 additions and 169 deletions

View File

@@ -55,6 +55,8 @@ jobs:
include:
- runs-on: ubuntu-20.04
arch: x86_64
- runs-on: [self-hosted, linux, ARM64]
arch: arm64
- runs-on: macos-12
arch: x86_64
- runs-on: macos-12-arm
@@ -64,7 +66,7 @@ jobs:
needs: bump_version
continue-on-error: true
env:
BUILDTYPE: ${{github.ref == 'refs/heads/main' && 'Release' || 'Debug'}}
BUILDTYPE: 'Release'
defaults:
run:
@@ -121,7 +123,9 @@ jobs:
libuv1-dev \
g++-10 \
libc++-9-dev \
libc++abi-9-dev
libc++abi-9-dev \
libjpeg-dev \
libpng-dev
/usr/sbin/update-ccache-symlinks
- name: Setup node
@@ -244,69 +248,3 @@ jobs:
npm publish --tag next --access public
env:
NPM_TOKEN: ${{ secrets.NPM_ORG_TOKEN }}
publish_binary_linux_arm64:
runs-on: ubuntu-latest
needs: bump_version
name: publish_binary (ubuntu-20.04, arm64)
env:
DOCKERTAG: node-build-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Get Latest Version
run: git pull
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64'
- name: Install dependencies macOS
if: runner.os == 'macOS'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: |
brew install docker docker-compose
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Create the docker build image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/arm64
file: platform/node/scripts/Dockerfile_Build
tags: ${{ env.DOCKERTAG }}
push: false
load: true
- name: Run the docker build image and create node libs
run: docker run --rm -v $(pwd):/data ${{ env.DOCKERTAG }}
- name: Clean up the docker build image
if: always()
run: docker rmi $(docker images | grep ${{ env.DOCKERTAG }} | tr -s ' ' | cut -d ' ' -f 3) --force
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: npm ci
run: npm ci --ignore-scripts
- name: Publish ARM Release to Github
env:
PUBLISH: true
BUILDTYPE: RelWithDebInfo
NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.NODE_PRE_GYP_GITHUB_TOKEN }}
run: |
./platform/node/scripts/publish.sh --target_platform=linux --target_arch=arm64