mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[build] Provide ARM build of RE2 (#84163)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
parent
6ef6c0fa4d
commit
e892b03173
1 changed files with 19 additions and 4 deletions
|
@ -46,15 +46,30 @@ const packages: Package[] = [
|
|||
destinationPath: 'node_modules/re2/build/Release/re2.node',
|
||||
extractMethod: 'gunzip',
|
||||
archives: {
|
||||
darwin: {
|
||||
'darwin-x64': {
|
||||
url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/darwin-x64-72.gz',
|
||||
sha256: '983106049bb86e21b7f823144b2b83e3f1408217401879b3cde0312c803512c9',
|
||||
},
|
||||
linux: {
|
||||
'linux-x64': {
|
||||
url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/linux-x64-72.gz',
|
||||
sha256: '8b6692037f7b0df24dabc9c9b039038d1c3a3110f62121616b406c482169710a',
|
||||
},
|
||||
win32: {
|
||||
|
||||
// ARM build is currently done manually as Github Actions used in upstream project
|
||||
// do not natively support an ARM target.
|
||||
|
||||
// From a AWS Graviton instance:
|
||||
// * checkout the node-re2 project,
|
||||
// * install Node using the same minor used by Kibana
|
||||
// * npm install, which will also create a build
|
||||
// * gzip -c build/Release/re2.node > linux-arm64-72.gz
|
||||
// * upload to kibana-ci-proxy-cache bucket
|
||||
'linux-arm64': {
|
||||
url:
|
||||
'https://storage.googleapis.com/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.15.4/linux-arm64-72.gz',
|
||||
sha256: '5942353ec9cf46a39199818d474f7af137cfbb1bc5727047fe22f31f36602a7e',
|
||||
},
|
||||
'win32-x64': {
|
||||
url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/win32-x64-72.gz',
|
||||
sha256: '0a6991e693577160c3e9a3f196bd2518368c52d920af331a1a183313e0175604',
|
||||
},
|
||||
|
@ -84,7 +99,7 @@ async function patchModule(
|
|||
`Can't patch ${pkg.name}'s native module, we were expecting version ${pkg.version} and found ${installedVersion}`
|
||||
);
|
||||
}
|
||||
const platformName = platform.getName();
|
||||
const platformName = platform.getNodeArch();
|
||||
const archive = pkg.archives[platformName];
|
||||
const archiveName = path.basename(archive.url);
|
||||
const downloadPath = config.resolveFromRepo(DOWNLOAD_DIRECTORY, pkg.name, archiveName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue