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 73c7d4d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
cd $(mktemp -d)
git clone "https://github.com/ndsev/mapget.git" -b use-conan
cd mapget
conan create . -s compiler.cppstd=20 -b missing \
conan create . -s compiler.cppstd=20 -s build_type=Release -b missing \
-pr:b default -pr:h "$GITHUB_WORKSPACE/conan-profiles/emscripten.profile" \
-o with_httplib=False \
-o with_service=False \
Expand Down
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 73c7d4d

Please sign in to comment.