Skip to content

Commit

Permalink
Alpine arm64 and rename linux-arm to linux-armhf (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne authored Apr 24, 2023
1 parent 9ac441c commit 8403a08
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
4 changes: 4 additions & 0 deletions build/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ parameters:

steps:

- bash: |
ls -LR
workingDirectory: zeromq.js

- bash: |
node -r '$(Build.SourcesDirectory)/zeromq.js/prebuilds/${{ parameters.prebuild_folder_name }}/${{ parameters.output_node_file }}' -e 'console.log(1)'
displayName: Test Node Module
Expand Down
41 changes: 38 additions & 3 deletions build/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:

# The build configurations have been taken from here:
# https://github.com/zeromq/zeromq.js/blob/47bb35c1941cb4fa8b510fb7da4d40b37cfa2e5f/.travis.yml#L94
- job: linux_arm_glibc
- job: linux_armhf_glibc
pool:
vmImage: 'ubuntu-latest'
steps:
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
- template: artifacts.yml
parameters:
artifact_name: linux-arm-glibc
artifact_name: linux-armhf-glibc
prebuild_folder_name: 'linux-arm'
output_node_file: 'node.napi.glibc.node'
test: false
Expand Down Expand Up @@ -185,6 +185,40 @@ jobs:
output_node_file: 'node.napi.musl.node'
test: false


- job: alpine_arm64_musl
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
build: false
test: false

- task: DockerInstaller@0
inputs:
dockerVersion: '17.09.0-ce'

- task: Bash@3
displayName: Build
env:
CURRENDIR: $(Build.SourcesDirectory)
DOCKERCMD: apk add --no-cache pkgconfig curl tar python3 make gcc g++ cmake musl-dev && npm i -g pnpm cross-env && cross-env ARCH=arm64 npm_config_arch=arm64 ARCHIVE_SUFFIX=-armv8 pnpm install && cross-env ARCH=arm64 npm_config_arch=arm64 ARCHIVE_SUFFIX=-armv8 pnpm run prebuild
inputs:
targetType: 'inline'
workingDirectory: zeromq.js
script: |
docker pull node:18-alpine
docker tag node:18-alpine builder
docker run --volume $CURRENDIR/zeromq.js:/app --workdir /app --privileged builder sh -c "$DOCKERCMD"
- template: artifacts.yml
parameters:
artifact_name: alpine-arm64-musl
prebuild_folder_name: 'linux-arm64'
output_node_file: 'node.napi.musl.node'
test: false

- job: publish
pool:
vmImage: 'ubuntu-latest'
Expand All @@ -196,8 +230,9 @@ jobs:
- darwin_arm64
- linux_x64_glibc
- linux_arm64_glibc
- linux_arm_glibc
- linux_armhf_glibc
- alpine_x64_musl
- alpine_arm64_musl
steps:
- template: publish.yml
parameters:
Expand Down

0 comments on commit 8403a08

Please sign in to comment.