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

Introduce version selection script for N-API testing #1597

Closed
mhdawson opened this issue Nov 23, 2018 · 6 comments
Closed

Introduce version selection script for N-API testing #1597

mhdawson opened this issue Nov 23, 2018 · 6 comments
Labels
ci-change PSA of configuration changes stale

Comments

@mhdawson
Copy link
Member

Link for CI job

https://ci.nodejs.org/job/node-test-node-addon-api/

Need to add back in testing so that it runs on VS2017 and will need version selector script so that it excludes running on V6.x

@refack refack added the ci-change PSA of configuration changes label Nov 23, 2018
@refack
Copy link
Contributor

refack commented Nov 24, 2018

@nodejs/n-api-admins PTAL

I've played with a copy of the job - https://ci.nodejs.org/job/refack-node-test-node-addon-api/25/

  1. Moved all git cloning to Jenkins
  2. Replaced MACHINES filter with matrix param and the version selector script
  3. Use NVS to download node

It think I got it to works on all platforms, and the whole script is now just:

#!bash -xe

ls
export NPM_CONFIG_USERCONFIG=$WORKSPACE/npmrc
export NPM_CONFIG_CACHE=$WORKSPACE/npm-cache

export npm_loglevel=error
export npm_progress=false

# 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

. ./build/jenkins/scripts/select-compiler.sh

cd node-addon-api
ls
node -v
npm -v

echo "################# ready to start ###########"

npm install

if [ ${NODEJS_MAJOR_VERSION} -gt "9" ]; then
  # These can run experimental tests
  npm test
else
  echo 'console.log(process.versions.napi)' >get_napi_version.js
  NAPI_VERSION_REPORTED=`node get_napi_version.js`
  npm test --NAPI_VERSION=$NAPI_VERSION_REPORTED
fi

@refack
Copy link
Contributor

refack commented Nov 24, 2018

Got only 2 infra failures

  • aix - tar -z doesn't work : tar: Not a recognized flag: z
  • smartOS16
    ld.so.1: node: fatal: relocation error: file /home/iojs/build/workspace/node-test-node-addon-api/temp_nvs/cache/node: symbol _ZTVNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE: referenced symbol not found

P.S. I converted those to ⚠️

@richardlau
Copy link
Member

Yes, -z is not a valid option for AIX's tar command: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.cmds5/tar.htm
Options are to either get GNU tar or pipe to gzip/gunzip.

The smartOS16 issue is #1519.

@refack
Copy link
Contributor

refack commented Nov 24, 2018

get GNU tar

I'd rather we have this so our Jenkins scripts would be simpler.

@github-actions
Copy link

github-actions bot commented Mar 6, 2020

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is remove or a comment is made.

@github-actions github-actions bot added the stale label Mar 6, 2020
@mhdawson
Copy link
Member Author

mhdawson commented Mar 6, 2020

Current job runs using the version selector script. This is done, closing.

@mhdawson mhdawson closed this as completed Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-change PSA of configuration changes stale
Projects
None yet
Development

No branches or pull requests

3 participants