Skip to content

Commit

Permalink
update instructions for building arm versions of re2
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Mar 3, 2022
1 parent 969313e commit 6293382
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions src/dev/build/tasks/patch_native_modules_task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,34 @@ const packages: Package[] = [
sha256: '4d06747b266c75b6f7ced93977692c0586ce6a52924cabb569bd966378941aa1',
},

// ARM build is currently done manually as Github Actions used in upstream project
// ARM builds are 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
// * git submodule update --init --recursive to download re2
// * npm install, which will also create a build
// * gzip -c build/Release/re2.node > linux-arm64-83.gz
// * upload to kibana-ci-proxy-cache bucket
// From a AWS Graviton instance running Ubuntu:
// * install build-essential package
// * install nvm and the node version used by the Kibana repository
// * `npm install [email protected]`
// * re2 will build itself on install
// * `cp node_modules/re2/build/Release/re2.node > linux-arm64-$(node -e "console.log(process.versions.modules)")
// * `gzip linux-arm64-*`
// * capture the sha256 with: `shasum -a 256 linux-arm64-*`
// * upload the `linux-arm64-*.gz` artifact to the `yarn-prebuilt-assets` bucket in GCS using the correct version number
'linux-arm64': {
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.4/linux-arm64-93.gz',
sha256: '25409584f76f3d6ed85463d84adf094eb6e256ed1cb0b754b95bcbda6691fc26',
},

// A similar process is necessary for building on ARM macs:
// * bootstrap and re2 will build itself on install
// * `cp node_modules/re2/build/Release/re2.node > darwin-arm64-$(node -e "console.log(process.versions.modules)")
// * `gzip darwin-arm64-*`
// * capture the sha256 with: `shasum -a 256 darwin-arm64-*`
// * upload the `darwin-arm64-*.gz` artifact to the `yarn-prebuilt-assets` bucket in GCS using the correct version number
'darwin-arm64': {
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.4/darwin-arm64-93.gz',
sha256: 'd4b708749ddef1c87019f6b80e051ed0c29ccd1de34f233c47d8dcaddf803872',
},

'win32-x64': {
url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.4/win-x64-93.gz',
sha256: '0320d0c0385432944c6fb3c8c8fcd78d440ce5626f7618f9ec71d88e44820674',
Expand Down

0 comments on commit 6293382

Please sign in to comment.