Skip to content

Commit

Permalink
Update required CMake version to 3.24 and Conan to 2.5.0
Browse files Browse the repository at this point in the history
Fix README.md, GitHub workflows, Dockerfile, Python package release
scripts
  • Loading branch information
vsbogd committed Jul 29, 2024
1 parent 764d96b commit 28deddb
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
with:
python-version: "3.7"
os: "ubuntu-20.04"
cmake-version: "3.19.x"
cmake-version: "3.24.x"
2 changes: 1 addition & 1 deletion .github/workflows/ci-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -69,11 +69,11 @@ jobs:
- name: Install Conan
uses: turtlebrowser/[email protected]
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: |
Expand All @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/old_interpreter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ jobs:
- name: Install CMake
uses: jwlawson/[email protected]
with:
cmake-version: "3.19.x"
cmake-version: "3.24.x"

- name: Install Conan
uses: turtlebrowser/[email protected]
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: |
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions python/install-hyperonc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down

0 comments on commit 28deddb

Please sign in to comment.