I'm trying to migrate node-test-node-addon-api to use NVS (instead of the hand rolled scripts it uses now.
I was able to remove ~100 lines, and get much better flexibility, but I've hit some edge cases:
- smartOS -
uname -m says 'i86pc' when we want need x64
- AIX -
uname -m spits out some UID instead of ppc64
- ppc-be - supported only by node <= 7 - so NVS can't bootstrap
- AIX - tar doesn't like
-z
Example trying to test with:
node6 - https://ci.nodejs.org/job/refack-node-test-node-addon-api/23/
node12 - https://ci.nodejs.org/job/refack-node-test-node-addon-api/22/
This is my current monkey patch part on the bootstraping:
# Use NVS for cross platform node install
NODEJS_VERSION="$NODEJS_MAJOR_VERSION"
if [ ${NODEJS_MAJOR_VERSION} -gt "11" ]; then
NODEJS_VERSION="nightly/$NODEJS_VERSION"
fi
echo "######### solve edge cases for nvs #########"
case $nodes in
*s390x)
export LD_LIBRARY_PATH=/data/gcc-4.9/lib64
;;
aix*)
# we mock uname since the native one with '-m' gives some guid
echo '#\!bash -xe' > uname
echo 'if [[ "$1" == "-m" ]]; then echo "ppc64"; else echo "AIX"; fi' >> uname
chmod 755 uname
export PATH=$PWD:$PATH
;;
smart*)
# we mock uname since the native with '-m' one says 'i86pc'
echo '#\!bash -xe' > uname
echo 'if [[ "$1" == "-m" ]]; then echo "x64"; else echo "SunOS"; fi' >> uname
chmod 755 uname
export PATH=$PWD:$PATH
;;
esac
export NVS_USE_XZ=0
export NVS_HOME="$PWD/temp_nvs"
. $NVS_HOME/nvs.sh add $NODEJS_VERSION
nvs use $NODEJS_VERSION
P.S. Had to github-search to find the ability to NVS_USE_XZ=0. Couldn't find documentation for that.
I'm trying to migrate
node-test-node-addon-apito use NVS (instead of the hand rolled scripts it uses now.I was able to remove ~100 lines, and get much better flexibility, but I've hit some edge cases:
uname -msays 'i86pc' when we want needx64uname -mspits out some UID instead ofppc64-zExample trying to test with:
node6 - https://ci.nodejs.org/job/refack-node-test-node-addon-api/23/
node12 - https://ci.nodejs.org/job/refack-node-test-node-addon-api/22/
This is my current monkey patch part on the bootstraping:
P.S. Had to github-search to find the ability to
NVS_USE_XZ=0. Couldn't find documentation for that.