Migrate to Conan 2.x

This commit is contained in:
Siarhei Fedartsou 2024-09-29 11:24:12 +02:00
parent e67e9ea808
commit 3af3b11c7d

View File

@ -23,36 +23,49 @@ concurrency:
cancel-in-progress: true
jobs:
# windows-release-node:
# needs: format-taginfo-docs
# runs-on: windows-2022
# continue-on-error: false
# env:
# BUILD_TYPE: Release
# steps:
# - uses: actions/checkout@v4
# - run: pip install "conan<2.0.0"
# - run: conan --version
# - run: cmake --version
# - uses: actions/setup-node@v4
# with:
# node-version: 18
# - run: node --version
# - run: npm --version
# - name: Prepare environment
# shell: bash
# run: |
# PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")
# echo PUBLISH=$([[ "${GITHUB_REF:-}" == "refs/tags/v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") >> $GITHUB_ENV
# - run: npm install --ignore-scripts
# - run: npm link --ignore-scripts
# - name: Build
# shell: bash
# run: |
# mkdir build
# cd build
# cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON ..
# cmake --build . --config Release
windows-release-node:
needs: format-taginfo-docs
runs-on: windows-2022
continue-on-error: false
env:
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v4
- run: pip install "conan<2.0.0"
- run: conan --version
- run: cmake --version
- uses: actions/setup-node@v4
with:
node-version: 18
- run: node --version
- run: npm --version
- name: Prepare environment
shell: bash
run: |
PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")
echo PUBLISH=$([[ "${GITHUB_REF:-}" == "refs/tags/v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") >> $GITHUB_ENV
- run: npm install --ignore-scripts
- run: npm link --ignore-scripts
- name: Build
shell: bash
run: |
mkdir build
cd build
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install conan==2.7.1
conan profile detect --force
cat ~/.conan2/profiles/default
if [[ "${ENABLE_CONAN}" == "ON" ]]; then
conan install .. --output-folder=. --build=missing --settings compiler.cppstd=20
fi
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON -DCMAKE_TOOLCHAIN_FILE=./conan_toolchain.cmake ..
cmake --build . --config Release
# # TODO: MSVC goes out of memory when building our tests
# # - name: Run tests
@ -311,16 +324,16 @@ jobs:
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
# - name: conan-linux-debug-node
# build_node_package: true
# continue-on-error: false
# node: 20
# runs-on: ubuntu-24.04
# BUILD_TYPE: Debug
# CCOMPILER: clang-16
# CXXCOMPILER: clang++-16
# ENABLE_CONAN: ON
# NODE_PACKAGE_TESTS_ONLY: ON
- name: conan-linux-debug-node
build_node_package: true
continue-on-error: false
node: 20
runs-on: ubuntu-24.04
BUILD_TYPE: Debug
CCOMPILER: clang-16
CXXCOMPILER: clang++-16
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
# - name: conan-macos-x64-release-node
# build_node_package: true