Skip to content
Snippets Groups Projects
Commit 1e05af1e authored by Michael Schwarzbach's avatar Michael Schwarzbach
Browse files

Merge branch 'bugfix/fix-conan-file' into 'main'

Bugfix/fix conan file

See merge request eclipse/scm/scm!12
parents d589215f c603b196
No related branches found
No related tags found
No related merge requests found
......@@ -35,14 +35,14 @@ class ScmRecipe(ConanFile):
exports_sources = "CMakeLists.txt", "src/*", "include/*", "module/*", "cmake/*", "doc/*", "tests/*", "dllExport/*"
def requirements(self):
self.requires("stochastics/0.7.2@scm/testing")
self.requires("stochastics/0.8.0@scm/testing")
self.requires("osiquerylibrary/1.1.2@scm/testing")
self.requires("libxml2/2.11.5@opsimulation/testing")
self.requires("libiconv/1.17@opsimulation/testing")
self.requires("units/2.3.3@opsimulation/testing")
self.requires("gtest/1.14.0@opsimulation/testing")
self.requires("open-simulation-interface/3.6.0@opsimulation/testing")
self.requires("protobuf/3.20.0@opsimulation/testing")
self.requires("libxml2/2.11.5")
self.requires("libiconv/1.17")
self.requires("units/2.3.3@scm/testing")
self.requires("gtest/1.14.0")
self.requires("open-simulation-interface/3.6.0@scm/testing")
self.requires("protobuf/3.20.0")
def configure(self):
# We can control the options of our dependencies based on current options
......
......@@ -22,19 +22,12 @@ Download the project::
Most needed dependencies are handled with ``Conan``.
To install Conan, follow the official guide https://docs.conan.io/2/installation.html.
#. Navigate into repository and checkout main branch
If you don't already have a conan profile, you can let Conan detect and create a suitable default profile for your current environment with::
conan profile detect
or use one of the provided profiles in `utils/conan`.
The easiest way to get started is to call a script::
cd utils/ci/scripts && ./15_prepare-thirdParty.sh
This script checks out needed third party dependencies and if they're not already present in local cache or available in the conancenter it builds them one after the other.
.. code-block::
cd scm
git checkout main
Additionally, download ``boost`` and all packages needed for your operating system to build C++ programs.
......@@ -67,3 +60,32 @@ Additionally, download ``boost`` and all packages needed for your operating syst
pacman -S mingw-w64-x86_64-graphviz
pacman -S mingw-w64-x86_64-gtest
pacman -S mingw-w64-x86_64-make
#. The essential packages necessary for SCM are listed in the file ``utils/ci/conan/Conanfile.txt``.
If a required package is available on ConanCenter, they will be used directly.
For packages not available on ConanCenter, the respective recipes are stored in the ``utils/ci/conan/recipe`` folder.
.. note::
It is important to have conancenter remote enabled. To check the status of conancenter and to enable, if it is disabled, execute the following commands
.. code-block::
conan remote list
conan remote enable conancenter
#. There are two Conan profiles ``conanprofile_linux`` and ``conanprofile_windows`` available in the ``utils/ci/conan/`` folder.
The compiler version and the path to the MSYS installation in these profiles can be adjusted to suit your specific environment, if necessary.
.. note::
The recommended compiler is GCC. Usage of other compilers may lead to unexpected outcomes.
#. To build and install the dependencies, run the script ``15_prepare_thirdParty.sh`` located in ``utils/ci/scripts``.
cd utils/ci/scripts && ./15_prepare-thirdParty.sh
This script checks out needed third party dependencies and if they're not already present in local cache or available in the conancenter it builds them one after the other.
#. Upon successful execution of the script, the dependencies will be installed under ``C:\deps`` on Windows and ``~/deps`` on Linux.
......@@ -112,11 +112,11 @@ spec:
tty: true
resources:
limits:
memory: "16Gi"
cpu: "4"
memory: "8Gi"
cpu: "2"
requests:
memory: "16Gi"
cpu: "4"
memory: "8Gi"
cpu: "2"
- name: jnlp
volumeMounts:
- name: volume-known-hosts
......@@ -172,11 +172,11 @@ spec:
tty: true
resources:
limits:
memory: "16Gi"
cpu: "4"
memory: "8Gi"
cpu: "2"
requests:
memory: "16Gi"
cpu: "4"
memory: "8Gi"
cpu: "2"
- name: jnlp
volumeMounts:
- name: volume-known-hosts
......
......@@ -6,7 +6,7 @@ open-simulation-interface/3.6.0@scm/testing
osiquerylibrary/1.1.2@scm/testing
protobuf/3.20.0
stochastics/0.8.0@scm/testing
units/2.3.3@openpass/testing
units/2.3.3@scm/testing
[options]
protobuf/*:shared=False
......
......@@ -14,3 +14,5 @@
versions:
"3.5.0":
folder: "all"
"3.6.0":
folder: "all"
......@@ -12,5 +12,5 @@
# config file for building OsiQueryLibrary with Conan
################################################################################
versions:
"0.1.0":
"1.1.2":
folder: "all"
\ No newline at end of file
......@@ -16,4 +16,9 @@ sources:
"default":
url_https: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git
url_ssh: git@gitlab.eclipse.org:eclipse/openpass/stochastics-library.git
\ No newline at end of file
url_ssh: git@gitlab.eclipse.org:eclipse/openpass/stochastics-library.git
"0.8.0":
url_https: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git
url_ssh: git@gitlab.eclipse.org:eclipse/openpass/stochastics-library.git
sha256: b6d331a00c8569df7fe27f600eff59780c0b5cab
\ No newline at end of file
......@@ -38,21 +38,24 @@ class StochasticsLibraryRecipe(ConanFile):
if self.settings.os == "Windows":
del self.options.fPIC
def _get_url(self):
def _get_url_sha(self):
if self.version in self.conan_data["sources"]:
url_https = self.conan_data["sources"][self.version]["url_https"]
url_ssh = self.conan_data["sources"][self.version]["url_ssh"]
sha256 = self.conan_data["sources"][self.version]["sha256"]
else:
url_https = self.conan_data["sources"]["default"]["url_https"]
url_ssh = self.conan_data["sources"]["default"]["url_ssh"]
return url_https, url_ssh
sha256 = self.version
return url_https, url_ssh, sha256
def source(self):
url_https, url_ssh = self._get_url()
url_https, url_ssh, sha256 = self._get_url_sha()
git = Git(self)
url = url_https
git.clone(url=url, target=self.name)
git.folder=self.name
git.checkout(commit=sha256)
def layout(self):
cmake_layout(self)
......
......@@ -12,5 +12,5 @@
# config file for building stochastics library with Conan
################################################################################
versions:
"0.1.0":
"0.8.0":
folder: "all"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment