Skip to content

Commit

Permalink
conan: Override node.js via conan profile
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf committed Mar 15, 2024
1 parent 942d410 commit c8668c2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
10 changes: 0 additions & 10 deletions build-ui.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env bash
set -eu

NODE_VERSION="21"
SOURCE_LOC="$1"
BUILD_DIR="${SOURCE_LOC}/build"

Expand All @@ -13,15 +12,6 @@ fi
echo "Using source dir @ $SOURCE_LOC."
cd "$SOURCE_LOC"

echo "Installing nvm"
export NVM_DIR="$(mktemp -d)"
git clone https://github.com/nvm-sh/nvm.git "${NVM_DIR}" -b v0.39.7
. "${NVM_DIR}/nvm.sh"

echo "Setting up Node.js ${NODE_VERSION}"
nvm install "${NODE_VERSION}"
nvm use "${NODE_VERSION}"

echo "Collecting npm modules."
npm -g install --force --include=dev
npm install
Expand Down
16 changes: 11 additions & 5 deletions ci/00_linux_setup.bash
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/usr/bin/env bash
set -eu
rm -rf build
mkdir -p build/deps
mkdir -p build/assets

conan install . -pr:b default -pr:h conan-profiles/emscripten.profile \
BUILD_DIR="./build"
PROFILE_DIR="./conan-profiles"

rm -rf "$BUILD_DIR"
mkdir -p "$BUILD_DIR/deps"
mkdir -p "$BUILD_DIR/assets"

conan install . \
-pr:b "$PROFILE_DIR/build.profile" \
-pr:h "$PROFILE_DIR/emscripten.profile" \
-s build_type=Release -s compiler.cppstd=20 -b missing -b editable \
-of build
-of "$BUILD_DIR"
7 changes: 7 additions & 0 deletions conan-profiles/build.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include(default)

[settings]
compiler.cppstd=20

[replace_requires]
nodejs/*: nodejs/18.15.0
4 changes: 0 additions & 4 deletions conan-profiles/emscripten.profile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ compiler=clang
compiler.version=15
compiler.libcxx=libc++
compiler.cppstd=20
build_type=Release

[tool_requires]
emsdk/3.1.50

[replace_tool_requires]
nodejs/*: nodejs/16.20.2

0 comments on commit c8668c2

Please sign in to comment.