Move node ci+release to self hosted Ubuntu arm64 (#873)
This commit is contained in:
59
.github/workflows/node-ci.yml
vendored
59
.github/workflows/node-ci.yml
vendored
@@ -58,6 +58,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
|
||||
@@ -66,7 +68,7 @@ jobs:
|
||||
arch: x86_64
|
||||
continue-on-error: true
|
||||
env:
|
||||
BUILDTYPE: ${{github.ref == 'refs/heads/main' && 'Release' || 'Debug'}}
|
||||
BUILDTYPE: 'Release'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -120,7 +122,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
|
||||
@@ -225,54 +229,3 @@ jobs:
|
||||
run: |
|
||||
npm pack --dry-run
|
||||
|
||||
test_linux_arm:
|
||||
runs-on: ubuntu-latest
|
||||
name: test (ubuntu-20.04, arm64)
|
||||
env:
|
||||
DOCKERTAG: node-test-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- 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
|
||||
|
||||
# On PRs make sure that the npm package can be packaged.
|
||||
- name: Pack
|
||||
if: github.ref != 'refs/heads/main'
|
||||
run: |
|
||||
npm pack --dry-run
|
||||
|
||||
74
.github/workflows/node-release.yml
vendored
74
.github/workflows/node-release.yml
vendored
@@ -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
|
||||
Reference in New Issue
Block a user