From 28deddb5bb68df830ebf5215dbef8a32455de53f Mon Sep 17 00:00:00 2001 From: Vitaly Bogdanov Date: Mon, 29 Jul 2024 12:45:45 +0300 Subject: [PATCH] Update required CMake version to 3.24 and Conan to 2.5.0 Fix README.md, GitHub workflows, Dockerfile, Python package release scripts --- .github/workflows/ci-auto.yml | 2 +- .github/workflows/ci-manual.yml | 2 +- .github/workflows/common.yml | 10 +++++----- .github/workflows/old_interpreter.yml | 10 +++++----- Dockerfile | 4 ++-- README.md | 18 ++++++++---------- python/install-hyperonc.sh | 5 +++-- python/pyproject.toml | 2 +- 8 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci-auto.yml b/.github/workflows/ci-auto.yml index 0cbcb1b11..70955ca89 100644 --- a/.github/workflows/ci-auto.yml +++ b/.github/workflows/ci-auto.yml @@ -14,4 +14,4 @@ jobs: with: python-version: "3.7" os: "ubuntu-20.04" - cmake-version: "3.19.x" + cmake-version: "3.24.x" diff --git a/.github/workflows/ci-manual.yml b/.github/workflows/ci-manual.yml index 2a176af0f..26d3b34a1 100644 --- a/.github/workflows/ci-manual.yml +++ b/.github/workflows/ci-manual.yml @@ -21,7 +21,7 @@ on: cmake-version: description: 'JSON array of CMake versions to be checked' required: true - default: "[\"3.19.x\"]" + default: "[\"3.24.x\"]" type: string jobs: diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 81ed5ab42..1545dec96 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -21,7 +21,7 @@ on: type: string cmake-version: description: "CMake version to use" - default: "3.19.x" + default: "3.24.x" required: false type: string @@ -69,11 +69,11 @@ jobs: - name: Install Conan uses: turtlebrowser/get-conan@v1.2 with: - version: "1.64" + version: "2.5.0" - name: Setup Conan profile run: | - conan profile new --detect default + conan profile detect --force - name: Print environment run: | @@ -97,8 +97,8 @@ jobs: echo "conan Python: $conan_python" echo -n "conan Python platform: " $conan_python -c "import platform; print(platform.platform())" - echo "conan profile show default" - conan profile show default + echo "conan profile show" + conan profile show echo "gcc --version" gcc --version echo "g++ --version" diff --git a/.github/workflows/old_interpreter.yml b/.github/workflows/old_interpreter.yml index 4a18c7374..3a60554f2 100644 --- a/.github/workflows/old_interpreter.yml +++ b/.github/workflows/old_interpreter.yml @@ -54,16 +54,16 @@ jobs: - name: Install CMake uses: jwlawson/actions-setup-cmake@v1.14.1 with: - cmake-version: "3.19.x" + cmake-version: "3.24.x" - name: Install Conan uses: turtlebrowser/get-conan@v1.2 with: - version: "1.64" + version: "2.5.0" - name: Setup Conan profile run: | - conan profile new --detect default + conan profile detect --force - name: Print environment run: | @@ -87,8 +87,8 @@ jobs: echo "conan Python: $conan_python" echo -n "conan Python platform: " $conan_python -c "import platform; print(platform.platform())" - echo "conan profile show default" - conan profile show default + echo "conan profile show" + conan profile show echo "gcc --version" gcc --version echo "g++ --version" diff --git a/Dockerfile b/Dockerfile index 526fbb58b..3c7496d26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,9 +21,9 @@ RUN sh /tmp/rustup.sh -y && rm /tmp/rustup.sh ENV PATH="${PATH}:${HOME}/.cargo/bin" RUN cargo install cbindgen -RUN python3 -m pip install conan==1.64 pip==23.1.2 +RUN python3 -m pip install conan==2.5.0 pip==23.1.2 ENV PATH="${PATH}:${HOME}/.local/bin" -RUN conan profile new --detect default +RUN conan profile detect --force ADD --chown=user:users . ${HOME}/hyperon-experimental diff --git a/README.md b/README.md index 9107ee162..ccdff5787 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Rust (see the Notes at the installation page). * Python3 and Python3-dev (3.7 or later) * Pip (23.1.2 or later) * GCC (7.5 or later) - * CMake (3.19 or later) + * CMake (3.24 or later) To support Git based modules (enabled by default): * OpenSSL library @@ -99,8 +99,8 @@ cargo install --force cbindgen * Install Conan and make default Conan profile: ``` -python3 -m pip install conan==1.64 -conan profile new --detect default +python3 -m pip install conan==2.5.0 +conan profile detect --force ``` * Upgrade Pip to the required version: @@ -233,21 +233,19 @@ If you see the following `cmake` output: ``` ERROR: Not able to automatically detect '/usr/bin/cc' version ERROR: Unable to find a working compiler -WARN: Remotes registry file missing, creating default one in /root/.conan/remotes.json -ERROR: libcheck/0.15.2: 'settings.compiler' value not defined ``` Try to create the default Conan profile manually: ``` -conan profile new --detect default +conan profile detect --force ``` If it doesn't help, then try to manually add `compiler`, `compiler.version` and `compiler.libcxx` values in the default Conan profile -(`~/.conan/profiles/default`). +(`~/.conan2/profiles/default`). For example: ``` -conan profile update settings.compiler=gcc default -conan profile update settings.compiler.version=7 default -conan profile update settings.compiler.libcxx=libstdc++ default +compiler=gcc +compiler.version=7 +compiler.libcxx=libstdc++ ``` ### Rust compiler shows errors diff --git a/python/install-hyperonc.sh b/python/install-hyperonc.sh index f9fcd7d9b..5f784a22c 100755 --- a/python/install-hyperonc.sh +++ b/python/install-hyperonc.sh @@ -32,9 +32,9 @@ sh /tmp/rustup.sh -y && rm /tmp/rustup.sh export PATH="${PATH}:${HOME}/.cargo/bin" cargo install cbindgen -python3 -m pip install conan==1.64 pip==23.1.2 +python3 -m pip install cmake==3.24 conan==2.5.0 pip==23.1.2 PATH="${PATH}:${HOME}/.local/bin" -conan profile new --detect default +conan profile detect --force mkdir -p ${HOME}/hyperonc cd ${HOME}/hyperonc @@ -51,6 +51,7 @@ CMAKE_ARGS="$CMAKE_ARGS -DBUILD_SHARED_LIBS=ON" # Local prefix is used to support MacOSX Apple Silicon GitHub actions environment. CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${HOME}/.local" CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release" +CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=${HOME}/hyperonc/conan_provider.cmake" echo "hyperonc CMake arguments: $CMAKE_ARGS" cmake $CMAKE_ARGS .. make diff --git a/python/pyproject.toml b/python/pyproject.toml index 276dc944c..0ef0eb3c4 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools==65.6.3", "conan==1.64", "cmake==3.26.4", "setuptools_scm[toml]==7.1.0"] +requires = ["setuptools==65.6.3", "conan==2.5.0", "cmake==3.26.4", "setuptools_scm[toml]==7.1.0"] build-backend = "setuptools.build_meta" [project]