diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 421a433..13a7fd8 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -39,6 +39,7 @@ functions: - '.evergreen/run-tests.sh' env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + NODE_LTS_VERSION: ${NODE_LTS_VERSION} run tests ubuntu: - command: subprocess.exec type: test @@ -47,6 +48,7 @@ functions: working_dir: src env: PROJECT_DIRECTORY: ${PROJECT_DIRECTORY} + NODE_LTS_VERSION: ${NODE_LTS_VERSION} PROJECT: ${project} GYP_DEFINES: ${GYP_DEFINES|} args: @@ -64,6 +66,10 @@ functions: - DRIVERS_TOOLS=/drivers-tools - '--env' - GYP_DEFINES + - '--env' + - NODE_LTS_VERSION=${NODE_LTS_VERSION} + - '--env' + - NPM_VERSION=${NPM_VERSION} - 'ubuntu:22.04' - /bin/bash - /app/.evergreen/run-tests-ubuntu.sh @@ -114,23 +120,93 @@ tasks: - func: run prebuild buildvariants: - - name: ubuntu2204-64 - display_name: 'Ubuntu 22.04 64-bit' + - name: ubuntu2204-x64-node-16 + display_name: 'Ubuntu 22.04 x64 - Node 16' + run_on: ubuntu2204-small + expansions: + has_packages: true + packager_distro: ubuntu2204 + packager_arch: x86_64 + NODE_LTS_VERSION: "16" + NPM_VERSION: "9" + tasks: + - run-tests-ubuntu + - run-tests-ubuntu-rtld + - name: ubuntu2204-x64-node-18 + display_name: 'Ubuntu 22.04 x64 - Node 18' + run_on: ubuntu2204-small + expansions: + has_packages: true + packager_distro: ubuntu2204 + packager_arch: x86_64 + NODE_LTS_VERSION: "18" + tasks: + - run-tests-ubuntu + - run-tests-ubuntu-rtld + - name: ubuntu2204-x64-node-20 + display_name: 'Ubuntu 22.04 x64 - Node 20' + run_on: ubuntu2204-small + expansions: + has_packages: true + packager_distro: ubuntu2204 + packager_arch: x86_64 + NODE_LTS_VERSION: "20" + tasks: + - run-tests-ubuntu + - run-tests-ubuntu-rtld + - name: ubuntu2204-x64-node-22 + display_name: 'Ubuntu 22.04 x64 - Node 22' run_on: ubuntu2204-small expansions: has_packages: true packager_distro: ubuntu2204 packager_arch: x86_64 + NODE_LTS_VERSION: "22" + tasks: + - run-tests-ubuntu + - run-tests-ubuntu-rtld + - name: ubuntu2204-arm64-node-16 + display_name: 'Ubuntu 22.04 arm64 - Node 16' + run_on: ubuntu2204-arm64-small + expansions: + has_packages: true + packager_distro: ubuntu2204 + packager_arch: arm64 + NODE_LTS_VERSION: "16" + NPM_VERSION: "9" + tasks: + - run-tests-ubuntu + - run-tests-ubuntu-rtld + - name: ubuntu2204-arm64-node-18 + display_name: 'Ubuntu 22.04 arm64 - Node 18' + run_on: ubuntu2204-arm64-small + expansions: + has_packages: true + packager_distro: ubuntu2204 + packager_arch: arm64 + NODE_LTS_VERSION: "18" + tasks: + - run-tests-ubuntu + - run-tests-ubuntu-rtld + - name: ubuntu2204-arm64-node-20 + display_name: 'Ubuntu 22.04 arm64 - Node 20' + run_on: ubuntu2204-arm64-small + expansions: + has_packages: true + packager_distro: ubuntu2204 + packager_arch: arm64 + NODE_LTS_VERSION: "20" tasks: - run-tests-ubuntu - run-tests-ubuntu-rtld - - name: ubuntu2204-arm64 - display_name: 'Ubuntu 22.04 arm64' + - name: ubuntu2204-arm64-node-22 + display_name: 'Ubuntu 22.04 arm64 - Node 22' run_on: ubuntu2204-arm64-small expansions: has_packages: true packager_distro: ubuntu2204 packager_arch: arm64 + NODE_LTS_VERSION: "22" tasks: - run-tests-ubuntu - run-tests-ubuntu-rtld diff --git a/.evergreen/install-dependencies.sh b/.evergreen/install-dependencies.sh index aac2abd..0870c94 100644 --- a/.evergreen/install-dependencies.sh +++ b/.evergreen/install-dependencies.sh @@ -10,6 +10,8 @@ export NODE_LTS_VERSION=${NODE_LTS_VERSION:-14} # a version lower than latest to support EOL Node versions. export NPM_VERSION=${NPM_VERSION:-latest} +echo "Installing Node.js $NODE_LTS_VERSION with npm@$NPM_VERSION" + source $DRIVERS_TOOLS/.evergreen/install-node.sh npm install --build-from-source diff --git a/.evergreen/run-tests-ubuntu.sh b/.evergreen/run-tests-ubuntu.sh index 92d0f4a..23b0fba 100755 --- a/.evergreen/run-tests-ubuntu.sh +++ b/.evergreen/run-tests-ubuntu.sh @@ -14,6 +14,8 @@ export KERBEROS_PORT="80" export KERBEROS_HOSTNAME=$HOSTNAME.$KERBEROS_REALM export DEBIAN_FRONTEND=noninteractive +export NODE_LTS_VERSION=$NODE_LTS_VERSION + echo "Installing all the packages required in this test" apt-get update apt-get -y -qq install \ @@ -123,8 +125,7 @@ else echo -e "SUCCESS: Apache site built and set for Kerberos auth\nActual Output:\n$CURL_OUTPUT" fi -echo "Run: install Node.js 20" -export NODE_LTS_VERSION=20 +echo "Run: install Node.js" source "${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh" npm test