Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-compliling addon for napi benchmark on Raspberry Pi #2382

Closed
Trott opened this issue Jul 12, 2020 · 2 comments
Closed

Cross-compliling addon for napi benchmark on Raspberry Pi #2382

Trott opened this issue Jul 12, 2020 · 2 comments

Comments

@Trott
Copy link
Member

Trott commented Jul 12, 2020

I'm adding benchmark tests to CI in nodejs/node#34288. The napi benchmark fails on Raspberry Pi because the result of the bench-addons-build task in Makefile needs to be available to the machine executing the test.

@rvagg
Copy link
Member

rvagg commented Jul 21, 2020

So what files need to be included? This should all be possible by fixing up https://ci.nodejs.org/view/All/job/node-cross-compile/ and adding in whatever files are needed. Currently it goes like this:

BINARY_FILES="config.gypi icu_config.gypi node out/Release/node out/Release/openssl-cli"
if [ -f out/Release/libnode_test_engine.so ]; then
  BINARY_FILES="${BINARY_FILES} out/Release/libnode_test_engine.so"
fi

md5sum out/Release/node
rm -rf binary
mkdir -p binary
tar cf binary/binary.tar ${BINARY_FILES}
xz -9v binary/binary.tar

The binary/binary.tar.xz gets added to a git pack and pushed to the shared git repo. Then on the Pi side it gets fetched from that repo and unpacked. So whatever's in it gets unpacked into a raw source checkout. We could just add more if [ -f ... blocks if you have other files to include and it'll always attempt to include those whenever a cross is run.

@Trott
Copy link
Member Author

Trott commented Jul 24, 2020

Looks like it just needed some Makefile changes that have happened. (@richardlau pointed out that the prerequisite build step and the test itself should have been added to the native suites job and not the JS suites job. WIth that change, everything seems to be working.) It's passing in CI now. Sorry for the noise.

@Trott Trott closed this as completed Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants