diff --git a/package/ci/circleci.yml b/package/ci/circleci.yml index 8278e2ef0..d3b8d83eb 100644 --- a/package/ci/circleci.yml +++ b/package/ci/circleci.yml @@ -175,6 +175,25 @@ commands: ls -l /usr/bin/llvm-symbolizer-6.0 ln -s /usr/bin/llvm-symbolizer{-6.0,} + install-nodejs: + parameters: + version: + type: string + default: "18" + steps: + - run: + name: Install Node.js << parameters.version >> + # cd'ing to the home directory as otherwise it'd download into + # /root/project and a checkout would then fail because it's not empty. + # Also emsdk forces the PATH to prefer its own nodejs, so explicitly + # call /usr/bin/node. + command: | + cd ~ + curl -fsSL https://deb.nodesource.com/setup_<< parameters.version >>.x -o nodesource_setup.sh + bash nodesource_setup.sh + apt-get install -y nodejs + /usr/bin/node -v + install-cmake: parameters: version: @@ -650,8 +669,14 @@ jobs: environment: # STUPID yml interprets unquoted OFF as a boolean TARGET_GLES2: "OFF" + # emsdk forces the PATH to prefer its own nodejs, so explicitly force + # /usr/bin/node to be used by CMake + EXTRA_OPTS: > + -DNODEJS_EXECUTABLE=/usr/bin/node steps: - - install-base-linux + - install-base-linux: + extra: curl + - install-nodejs # With a Debug build, 8+ is causing OOMs. Release was fine with 24. - cap-ninja-jobs: count: 4 diff --git a/package/ci/emscripten.sh b/package/ci/emscripten.sh index 297e8b591..fb39888d0 100755 --- a/package/ci/emscripten.sh +++ b/package/ci/emscripten.sh @@ -12,6 +12,7 @@ cmake .. \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_INSTALL_PREFIX=$HOME/deps \ -DCORRADE_WITH_INTERCONNECT=OFF \ + $EXTRA_OPTS \ -G Ninja ninja install cd .. @@ -53,6 +54,7 @@ cmake .. \ -DMAGNUM_BUILD_AL_TESTS=ON \ -DMAGNUM_BUILD_GL_TESTS=ON \ -DMAGNUM_TARGET_GLES2=$TARGET_GLES2 \ + $EXTRA_OPTS \ -G Ninja ninja $NINJA_JOBS