Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Add scripts for linux-arm64 prebuilds
Browse files Browse the repository at this point in the history
ARM is a common platform, especially if you are building Docker images
on Apple Silicon using Docker Desktop.

This requires the `openssl_fips` variable to be set to the empty string
in a few gyp files.
  • Loading branch information
sds committed Feb 3, 2023
1 parent 29c9d9f commit 39af086
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 46 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Release
on:
push:
tags: ['*']
on: [pull_request] # TODO: Remove after testing
jobs:
build:
permissions:
contents: read
strategy:
matrix:
include:
- os: ubuntu-latest
build-group: linux-arm64
- os: ubuntu-latest
build-group: linux-x64
# At the time of writing macos-latest is mac 10; we need 11 to build a universal binary.
Expand Down
80 changes: 40 additions & 40 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: Test
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
strategy:
matrix:
# At the time of writing macos-latest is mac 10; we need 11 to build a universal binary.
os: [ubuntu-latest, macos-11, windows-latest]
node: [10, 12, 14]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / Node ${{ matrix.node }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Use node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
architecture: x64
- name: Install
run: npm install
- name: Test
run: npm test
- name: Coverage
run: npm run coverage
- name: Codecov
uses: codecov/codecov-action@v3
with:
file: coverage/lcov.info
- name: Test Electron
if: ${{ matrix.node == '14' }}
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test-electron
- name: Test GC
run: npm run test-gc
#name: Test
#on: [push, pull_request]
#permissions:
# contents: read
#jobs:
# test:
# strategy:
# matrix:
# # At the time of writing macos-latest is mac 10; we need 11 to build a universal binary.
# os: [ubuntu-latest, macos-11, windows-latest]
# node: [10, 12, 14]
# runs-on: ${{ matrix.os }}
# name: ${{ matrix.os }} / Node ${{ matrix.node }}
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# submodules: recursive
# - name: Use node ${{ matrix.node }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node }}
# architecture: x64
# - name: Install
# run: npm install
# - name: Test
# run: npm test
# - name: Coverage
# run: npm run coverage
# - name: Codecov
# uses: codecov/codecov-action@v3
# with:
# file: coverage/lcov.info
# - name: Test Electron
# if: ${{ matrix.node == '14' }}
# uses: GabrielBB/xvfb-action@v1
# with:
# run: npm run test-electron
# - name: Test GC
# run: npm run test-gc
5 changes: 4 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,8 @@
, "sources": [
"binding.cc"
]
}]
}],
"variables": {
"openssl_fips": ""
}
}
6 changes: 5 additions & 1 deletion deps/rocksdb/rocksdb.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -472,4 +472,8 @@

, 'build_version.cc'
]
}]}
}],
'variables': {
'openssl_fips': ''
}
}
6 changes: 5 additions & 1 deletion deps/snappy/snappy.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,8 @@
, 'snappy-1.1.7/snappy.cc'
, 'snappy-1.1.7/snappy.h'
]
}]}
}],
'variables': {
'openssl_fips': ''
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"coverage": "nyc report -r lcovonly",
"rebuild": "npm run install --build-from-source",
"prebuild": "prebuildify -t 8.14.0 --napi --strip",
"prebuild-linux-arm64": "prebuildify-cross -i linux-arm64 -t 8.14.0 --napi --strip",
"prebuild-linux-x64": "prebuildify-cross -i centos7-devtoolset7 -i alpine -t 8.14.0 --napi --strip",
"prebuild-darwin-x64+arm64": "prebuildify -t 8.14.0 --napi --strip --arch x64+arm64",
"prebuild-win32-x64": "prebuildify -t 8.14.0 --napi --strip",
Expand Down

0 comments on commit 39af086

Please sign in to comment.