From 6da3a993b431d10ad60a3b8d6e4b45a605b1ead6 Mon Sep 17 00:00:00 2001 From: jmkerloch <53606373+jmkerloch@users.noreply.github.com> Date: Fri, 12 Nov 2021 10:21:54 +0100 Subject: [PATCH] review INSTALL procedure (#421) * review INSTALL procedure * update devtoolset version to 9 --- INSTALL-centos.md | 212 ---------------------- INSTALL-ubuntu.md | 187 ------------------- INSTALL-windows.md | 211 ---------------------- INSTALL.md | 47 +---- README.md | 4 +- docs/build/0-INSTALL.md | 71 ++------ docs/build/1-Development-requirements.md | 104 +++++++++++ docs/build/2-Dependencies-install.md | 85 +++++++++ docs/build/3-Build.md | 70 ++++++++ docs/build/4-Tests.md | 47 +++++ docs/build/5-Installer-creation.md | 53 ++++++ docs/build/INSTALL-centos.md | 216 ---------------------- docs/build/INSTALL-ubuntu.md | 191 -------------------- docs/build/INSTALL-windows.md | 219 ----------------------- docs/index.md | 60 ++----- mkdocs.yml | 10 +- 16 files changed, 402 insertions(+), 1385 deletions(-) delete mode 100644 INSTALL-centos.md delete mode 100644 INSTALL-ubuntu.md delete mode 100644 INSTALL-windows.md create mode 100644 docs/build/1-Development-requirements.md create mode 100644 docs/build/2-Dependencies-install.md create mode 100644 docs/build/3-Build.md create mode 100644 docs/build/4-Tests.md create mode 100644 docs/build/5-Installer-creation.md delete mode 100644 docs/build/INSTALL-centos.md delete mode 100644 docs/build/INSTALL-ubuntu.md delete mode 100644 docs/build/INSTALL-windows.md diff --git a/INSTALL-centos.md b/INSTALL-centos.md deleted file mode 100644 index 6cb6b939e5..0000000000 --- a/INSTALL-centos.md +++ /dev/null @@ -1,212 +0,0 @@ -# Antares Simulator CMake Build Instructions - -[Environnement](#environment) | [CMake version](#cmake-version) | [GCC version](#gcc-version) | [Python version](#python-version) | [Dependencies](#dependencies) | [Building](#building-antares-solution) | [Tests](#tests) | [Installer creation](#installer-creation) - -## C/I status -[![Status][centos_precompiled_svg]][centos_precompiled_link] [![Status][centos_deps_build_svg]][centos_deps_build_link] - -## [CMake version](#cmake-version) -CMake 3.x must be used. -``` -sudo yum install epel-release -sudo yum install cmake3 -``` -Note: -> All ``cmake`` command must be replaced by ``cmake3``. - -## [GCC version](#gcc-version) -By default, GCC version of Centos7 is 4.8.5. -The compilation of *ANTARES* requires C++17 support. - -You can use a more recent version of GCC by enabling `devtoolset-7` : -``` -sudo yum install centos-release-scl -sudo yum install devtoolset-7 -``` - -Before compiling *ANTARES* we must launch a new shell with `scl` tool : -``` -scl enable devtoolset-7 bash -``` - -## [Python version](#python-version) -Python 3.x must be used. - -``` -sudo yum install python3 python3-pip -``` - -Required python modules can be installed with : -``` -pip3 install -r src/tests/examples/requirements.txt -``` - -## [Dependencies](#deps) - ANTARES depends on several mandatory libraries. - - [Sirius Solver](https://github.com/AntaresSimulatorTeam/sirius-solver/tree/Antares_VCPKG) (fork from [RTE](https://github.com/rte-france/sirius-solver/tree/Antares_VCPKG)) - - [OR-Tools](https://github.com/AntaresSimulatorTeam/or-tools/tree/rte_dev_sirius) (fork from [RTE](https://github.com/rte-france/or-tools/tree/rte_dev_sirius) based on official OR-Tools github) - - [wxWidgets](https://github.com/wxWidgets/wxWidgets) - (Only for the complete Antares Simulator solution with GUI) - - Boost libraries : test (Only for unit tests) - -This section describes the install procedures for the third-party Open source libraries used by ANTARES. -The install procedure can be done -- by compiling the sources after cloning the official git repository -- by using a package manager -- by using pre-compiled external libraries provided by [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.2.0) - -#### Yum commands -``` -sudo yum install redhat-lsb-core wxGTK3-devel boost-test boost-devel unzip -``` -### [Automatic librairies compilation from git](#git_compil) -[Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps) is used as a git submodule for automatic librairies compilation from git. - -All dependencies can be built at configure time using the option `-DBUILD_ALL=ON` (`OFF` by default). -For a list of available option see [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps). - -Some dependencies can't be installed with a package manager. -They can be built at configure step with a cmake option : `-DBUILD_not_system=ON` (`ON` by default). - -#### Defining dependency install directory -It can be useful to have a common dependency install directory, when using multiple directories for antares development -with multiple branches. - -The dependency-install-directory can be specified with `DEPS_INSTALL_DIR`. -By default the install directory is `/../rte-antares-deps-` - -Note : -> `DEPS_INSTALL_DIR` is added to `CMAKE_PREFIX_PATH` - -> If the dependency install directory contains CURL, or wxWidgets pre-compiled libraries an additionnal option must be used at configure time `-DUSE_PRECOMPILED_EXT=ON` - -### Pre-compiled libraries download : release version only -You can download pre-compiled antares-deps archive from [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.1.0). Only release version are available. - -There are still some system libraries that must be installed : - -``` -sudo yum install libuuid-devel libidn2-devel gtk2-devel redhat-lsb-core -``` - -## [Building Antares Solution](#build) - -Antares source directory is named `[antares_src]` in all following commands. - -### 1 - Update git submodule for dependency build - -First you need to update git submodule for dependency build : -``` -git submodule update --init [antares_src]/antares-deps -``` - -### 2 - Enable `devtoolset-7` - -``` -scl enable devtoolset-7 bash -``` - -### 3 - CMake configure - -Here is a list of available CMake configure option : - -|Option | Description | -|:-------|-------| -|`CMAKE_BUILD_TYPE` | Define build type. Available values are `release` and `debug` | -|`BUILD_UI`|Enable or disable Antares Simulator UI compilation (default `ON`)| -|`BUILD_not_system`|Enable build of external librairies not available on system package manager (default `ON`)| -|`BUILD_ALL`|Enable build of ALL external librairies (default `OFF`)| -|`DEPS_INSTALL_DIR`|Define dependencies libraries install directory| -|`USE_PRECOMPILED_EXT`| This option must be set if you use precompiled external librairies (default `OFF`)| -|`BUILD_TESTING`| Enable test build (default `OFF`)| -|`BUILD_OUTPUT_TEST`| Enable test with output compare build (default `OFF`)| - - -``` -cmake3 -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release -``` - -### 4 - Build - ``` -cmake3 --build _build --config release -j8 -``` -Note : -> Compilation can be done on several processor with ```-j``` option. - -## [Tests](#tests) - -Tests compilation can be enabled at configure time using the option `-DBUILD_TESTING=ON` (`OFF` by default) - -After build, tests can be run with ``ctest`` : - ``` -cd _build -ctest3 -C Release --output-on-failure -``` -Note: -> Tests with output comparison must be enabled using the option `-DBUILD_OUTPUT_TEST=ON` (`OFF` by default) - -All tests are associated to a label and multiple labels can be defined. You can choose which tests will be executed at ctest run. - -This is the list of the available labels : - -| Label | Description | -|:-------|-----| -| `units` | Units tests| -| `end-to-end` | End to end tests with antares study creation| -| `short-examples` | Short duration pytest with antares solver call and objective function result check| -| `medium-examples` | Medium duration pytest with antares solver call and objective function result check| -| `long-examples` | Long duration pytest with antares solver call and objective function result check| -| `short-output` | Short duration pytest with antares solver call and simulation output comparison| -| `sirius` | Sirius related pytest| -| `coin` | coin related pytest| -| `ortools` | OR-Tools related pytest| - -Note : -> Use `ctest -N` to see all available tests -Here is an example for running only units tests: -``` -ctest3 -C Release --output-on-failure -L units -```` - -Here is an example for running only sirius tests without OR-Tools used: -``` -ctest3 -C Release --output-on-failure -L sirius -LE ortools -```` - -Here is an example for running only short sirius tests without OR-Tools used: -``` -ctest3 -C Release --output-on-failure -R "short-examples.*sirius" -LE "ortools" -```` -Note : -> In this case the regex is on name (`-R`) so only short-examples are executed. -For more information on `ctest` call see [documentation](https://cmake.org/cmake/help/latest/manual/ctest.1.html) - -## [Installer creation](#installer) -CPack can be used to create the installer after the build phase. - -## RHEL .rpm (Experimental) - ``` -cd _build -cpack3 -G RPM . -``` -Note : -> `rpm-build` must be installed for RPM creation : `sudo yum install rpm-build ` - -## Linux .tar.gz - ``` -cd _build -cpack3 -G TGZ . -``` - -There are still some system libraries that must be installed if you want to use *ANTARES*: - -``` -sudo yum install epel-release -sudo yum install curl wxGTK3 -``` - -[centos_deps_build_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(deps.%20compilation)/badge.svg -[centos_deps_build_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(deps.%20compilation)" - -[centos_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(pre-compiled)/badge.svg -[centos_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(pre-compiled)" diff --git a/INSTALL-ubuntu.md b/INSTALL-ubuntu.md deleted file mode 100644 index ebfb0881b8..0000000000 --- a/INSTALL-ubuntu.md +++ /dev/null @@ -1,187 +0,0 @@ -# Antares Simulator CMake Build Instructions - -[Environnement](#environment) | [Build tools](#build-tools) | [Environnement build install](#env-build-install) | [Python version](#python-version) | [Dependencies](#dependencies) | [Building](#building-antares-solution) | [Tests](#tests) | [Installer creation](#installer-creation) - -## C/I status -[![Status][ubuntu_precompiled_svg]][ubuntu_precompiled_link] [![Status][ubuntu_deps_build_svg]][ubuntu_deps_build_link] - -## [Build tools](#build-tools) - -``` -sudo apt install build-essential libssl-dev cmake -``` - -## [Python version](#python-version) -Python 3.x must be used. - -``` -sudo apt install python3 python3-pip -``` -Required python modules can be installed with : -``` -pip3 install -r src/src/tests/examples/requirements.txt -``` - -## [Dependencies](#deps) - ANTARES depends on several mandatory libraries. - - [Sirius Solver](https://github.com/AntaresSimulatorTeam/sirius-solver/tree/Antares_VCPKG) (fork from [RTE](https://github.com/rte-france/sirius-solver/tree/Antares_VCPKG)) - - [OR-Tools](https://github.com/AntaresSimulatorTeam/or-tools/tree/rte_dev_sirius) (fork from [RTE](https://github.com/rte-france/or-tools/tree/rte_dev_sirius) based on official OR-Tools github) - - [wxWidgets](https://github.com/wxWidgets/wxWidgets) - (Only for the complete Antares Simulator solution with GUI) - - Boost libraries : test (Only for unit tests) - -This section describes the install procedures for the third-party Open source libraries used by ANTARES. -The install procedure can be done -- by compiling the sources after cloning the official git repository -- by using a package manager. -- by using pre-compiled external libraries provided by [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.2.0) - -#### Command to install dependencies -``` -sudo apt install uuid-dev libwxgtk3.0-gtk3-dev libboost-test-dev -``` - -### [Automatic librairies compilation from git](#git_compil) -[Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps) is used as a git submodule for automatic librairies compilation from git. - -All dependencies can be built at configure time using the option `-DBUILD_ALL=ON` (`OFF` by default). -For a list of available option see [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps). - -Some dependencies can't be installed with a package manager. -They can be built at configure step with a cmake option : `-DBUILD_not_system=ON` (`ON` by default). - -#### Defining dependency install directory -It can be useful to have a common dependency install directory, when using multiple directories for antares development -with multiple branches. - -The dependency-install-directory can be specified with `DEPS_INSTALL_DIR`. -By default the install directory is `/../rte-antares-deps-` - -Note : -> `DEPS_INSTALL_DIR` is added to `CMAKE_PREFIX_PATH` - -> If the dependency install directory contains wxWidgets pre-compiled libraries an additionnal option must be used at configure time `-DUSE_PRECOMPILED_EXT=ON` - -### Pre-compiled libraries download : release version only -You can download pre-compiled antares-deps archive from [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.1.0). Only release version are available. - -There are still some system libraries that must be installed : - -``` -sudo apt-get install libuuid1 uuid-dev libssh2-1 libssh2-1-dev libidn2-0 libidn2-dev libidn11 libidn11-dev gtk2.0 libb64-dev libjpeg-dev libtiff-dev libsecret-1-dev -``` - -## [Building Antares Solution](#build) - -Antares source directory is named `[antares_src]` in all following commands. - -### 1 - Update git submodule for dependency build - -First you need to update git submodule for dependency build : -``` -git submodule update --init [antares_src]/antares-deps -``` - -### 2 - CMake configure - -#### Configure options - -Here is a list of available CMake configure option : - -|Option | Description | -|:-------|-------| -|`CMAKE_BUILD_TYPE` | Define build type. Available values are `release` and `debug` | -|`BUILD_UI`|Enable or disable Antares Simulator UI compilation (default `ON`)| -|`BUILD_not_system`|Enable build of external librairies not available on system package manager (default `ON`)| -|`BUILD_ALL`|Enable build of ALL external librairies (default `OFF`)| -|`DEPS_INSTALL_DIR`|Define dependencies libraries install directory| -|`USE_PRECOMPILED_EXT`| This option must be set if you use precompiled external librairies (default `OFF`)| -|`BUILD_TESTING`| Enable test build (default `OFF`)| -|`BUILD_OUTPUT_TEST`| Enable test with output compare build (default `OFF`)| - -#### Configure - -``` -cmake -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release -``` - -### 3 - Build - ``` -cmake --build _build --config release -j8 -``` -Note : -> Compilation can be done on several processor with ```-j``` option. - -## [Tests](#tests) - -Tests compilation can be enabled at configure time using the option `-DBUILD_TESTING=ON` (`OFF` by default) - -After build, tests can be run with ``ctest`` : - ``` -cd _build -ctest -C Release --output-on-failure -``` -Note: -> Tests with output comparison must be enabled using the option `-DBUILD_OUTPUT_TEST=ON` (`OFF` by default) - -All tests are associated to a label and multiple labels can be defined. You can choose which tests will be executed at ctest run. - -This is the list of the available labels : - -| Label | Description | -|:-------|-----| -| `units` | Units tests| -| `end-to-end` | End to end tests with antares study creation| -| `short-examples` | Short duration pytest with antares solver call and objective function result check| -| `medium-examples` | Medium duration pytest with antares solver call and objective function result check| -| `long-examples` | Long duration pytest with antares solver call and objective function result check| -| `short-output` | Short duration pytest with antares solver call and simulation output comparison| -| `sirius` | Sirius related pytest| -| `coin` | coin related pytest| -| `ortools` | OR-Tools related pytest| - -Note : -> Use `ctest -N` to see all available tests -Here is an example for running only units tests: -``` -ctest -C Release --output-on-failure -L units -```` - -Here is an example for running only sirius tests without OR-Tools used: -``` -ctest -C Release --output-on-failure -L sirius -LE ortools -```` - -Here is an example for running only short sirius tests without OR-Tools used: -``` -ctest -C Release --output-on-failure -R "short-examples.*sirius" -LE "ortools" -```` -Note : -> In this case the regex is on name (`-R`) so only short-examples are executed. -For more information on `ctest` call see [documentation](https://cmake.org/cmake/help/latest/manual/ctest.1.html) - -## [Installer creation](#installer) -CPack can be used to create the installer after the build phase. - -## Ubuntu .deb (Experimental) - ``` -cd _build -cpack -G DEB . -``` - -## Linux .tar.gz - ``` -cd _build -cpack -G TGZ . -``` -There are still some system libraries that must be installed if you want to use *ANTARES*: - -``` -sudo apt-get install libwxgtk3.0-gtk3-0v5 -``` - -[ubuntu_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Ubuntu%20CI%20(pre-compiled)/badge.svg -[ubuntu_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Ubuntu%20CI%20(pre-compiled)" - -[ubuntu_deps_build_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Ubuntu%20CI%20(deps.%20compilation)/badge.svg -[ubuntu_deps_build_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Ubuntu%20CI%20(deps.%20compilation)" diff --git a/INSTALL-windows.md b/INSTALL-windows.md deleted file mode 100644 index 38ea816af4..0000000000 --- a/INSTALL-windows.md +++ /dev/null @@ -1,211 +0,0 @@ -# Antares Simulator CMake Build Instructions - -[CMake version](#cmake-version) | [Python version](#python-version) | [Dependencies](#dependencies) | [Building](#building-antares-solution) | [Tests](#tests) | [Installer creation](#installer-creation) - -## C/I status -[![Status][windows_precompiled_svg]][windows_precompiled_link] [![Status][windows_precompiled_only_svg]][windows_precompiled_only_link] - -## [CMake version](#cmake-version) -CMake 3.x must be used. - -You can download latest Windows version directly from [CMake website](https://cmake.org/download/). - -## [Python version](#python-version) -Python 3.x must be used. - -You can download latest Windows version directly from [Python website](https://www.python.org/downloads/windows/). - -Required python modules can be installed with : -``` -pip install -r src/tests/examples/requirements.txt -``` - -## [Dependencies](#deps) - ANTARES depends on several mandatory libraries. - - [Sirius Solver](https://github.com/AntaresSimulatorTeam/sirius-solver/tree/Antares_VCPKG) (fork from [RTE](https://github.com/rte-france/sirius-solver/tree/Antares_VCPKG)) - - [OR-Tools](https://github.com/AntaresSimulatorTeam/or-tools/tree/rte_dev_sirius) (fork from [RTE](https://github.com/rte-france/or-tools/tree/rte_dev_sirius) based on official OR-Tools github) - - [wxWidgets](https://github.com/wxWidgets/wxWidgets) - (Only for the complete Antares Simulator solution with GUI) - - Boost libraries : test (Only for unit tests) - -This section describes the install procedures for the third-party Open source libraries used by ANTARES. -The install procedure can be done -- by compiling the sources after cloning the official git repository -- by using VCPKG -- by using pre-compiled external libraries provided by [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.2.0) - -### VCPKG - -For Windows we will use [vcpkg](https://github.com/microsoft/vcpkg) to download and compile the librairies. - -You must install the corresponding [vcpkg-triplet](https://vcpkg.readthedocs.io/en/latest/users/integration/#triplet-selection) depending on Antares version and libraries load: - -- ``x64-windows`` : 64 bits version with dynamic librairies load -- ``x64-windows-static`` : 64 bits version with static librairies load - -The vcpkg-triplet used will be named [vcpg-triplet] later in this document. - -#### 1 Install vcpkg - -vcpkg can be installed anywhere on your computer : - -``` -git clone https://github.com/Microsoft/vcpkg.git -cd vcpkg -.\bootstrap-vcpkg.bat -``` - -Note : -> all vcpkg further described commands must be run from the vcpkg folder. This folder will be named [vcpkg_root] later in this document. - - -#### 2 Install dependencies -``` -cd [vcpkg_root] -vcpkg install wxwidgets:[vcpg-triplet] -vcpkg install boost-test:[vcpg-triplet] -``` -### [Automatic librairies compilation from git](#git_compil) -[Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps) is used as a git submodule for automatic librairies compilation from git. - -All dependencies can be built at configure time using the option `-DBUILD_ALL=ON` (`OFF` by default). -For a list of available option see [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps). - -Some dependencies can't be installed with a package manager. -They can be built at configure step with a cmake option : `-DBUILD_not_system=ON` (`ON` by default). - -#### Defining dependency install directory -It can be useful to have a common dependency install directory, when using multiple directories for antares development -with multiple branches. - -The dependency-install-directory can be specified with `DEPS_INSTALL_DIR`. -By default the install directory is `/../rte-antares-deps-` - -Note : -> `DEPS_INSTALL_DIR` is added to `CMAKE_PREFIX_PATH` - -> If the dependency install directory contains wxWidgets pre-compiled libraries an additionnal option must be used at configure time `-DUSE_PRECOMPILED_EXT=ON` - -### Pre-compiled libraries download : release version only -You can download pre-compiled antares-deps archive from [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.1.0). Only release version are available. - -Note: -> You must you use a MSVC version compatible with MSVC version used in GitHub Action. - -## [Building Antares Solution](#build) - -Antares source directory is named `[antares_src]` in all following commands. - -### 1 - Update git submodule for dependency build - -First you need to update git submodule for dependency build : -``` -git submodule update --init [antares_src]/antares-deps -``` - -### 2 - CMake configure - -Note : -> cpack NSIS installer creation need an 'out of source build'. The build directory must be outside `[antares_src]` directory - -#### Configure options - -Here is a list of available CMake configure option : - -|Option | Description | -|:-------|-------| -|`CMAKE_BUILD_TYPE` | Define build type. Available values are `release` and `debug` | -|`BUILD_UI`|Enable or disable Antares Simulator UI compilation (default `ON`)| -|`BUILD_not_system`|Enable build of external librairies not available on system package manager (default `ON`)| -|`BUILD_ALL`|Enable build of ALL external librairies (default `OFF`)| -|`DEPS_INSTALL_DIR`|Define dependencies libraries install directory| -|`USE_PRECOMPILED_EXT`| This option must be set if you use precompiled external librairies (default `OFF`)| -|`VCPKG_ROOT`| Define [vcpkg_root] | -|`VCPKG_TARGET_TRIPLET`| Define [vcpkg-triplet] | -|`BUILD_TESTING`| Enable test build (default `OFF`)| -|`BUILD_OUTPUT_TEST`| Enable test with output compare build (default `OFF`)| - - -#### Configure using vcpkg (recommended) - -``` -cmake -B _build -S [antares_src] -DVCPKG_ROOT=[vcpkg_root] -DVCPKG_TARGET_TRIPLET=[vcpkg-triplet] -DCMAKE_BUILD_TYPE=release -``` - - -#### Configure withouth VCPKG - -``` -cmake -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release -``` - -### 3 - Build - ``` -cmake --build _build --config release -j8 -``` -Note : -> Compilation can be done on several processor with ```-j``` option. - -## [Tests](#tests) - -Tests compilation can be enabled at configure time using the option `-DBUILD_TESTING=ON` (`OFF` by default) - -After build, tests can be run with ``ctest`` : - ``` -cd _build -ctest -C Release --output-on-failure -``` -Note: -> Tests with output comparison must be enabled using the option `-DBUILD_OUTPUT_TEST=ON` (`OFF` by default) - -All tests are associated to a label and multiple labels can be defined. You can choose which tests will be executed at ctest run. - -This is the list of the available labels : - -| Label | Description | -|:-------|-----| -| `units` | Units tests| -| `end-to-end` | End to end tests with antares study creation| -| `short-examples` | Short duration pytest with antares solver call and objective function result check| -| `medium-examples` | Medium duration pytest with antares solver call and objective function result check| -| `long-examples` | Long duration pytest with antares solver call and objective function result check| -| `short-output` | Short duration pytest with antares solver call and simulation output comparison| -| `sirius` | Sirius related pytest| -| `coin` | coin related pytest| -| `ortools` | OR-Tools related pytest| - -Note : -> Use `ctest -N` to see all available tests -Here is an example for running only units tests: -``` -ctest -C Release --output-on-failure -L units -```` - -Here is an example for running only sirius tests without OR-Tools used: -``` -ctest -C Release --output-on-failure -L sirius -LE ortools -```` - -Here is an example for running only short sirius tests without OR-Tools used: -``` -ctest -C Release --output-on-failure -R "short-examples.*sirius" -LE "ortools" -```` -Note : -> In this case the regex is on name (`-R`) so only short-examples are executed. -For more information on `ctest` call see [documentation](https://cmake.org/cmake/help/latest/manual/ctest.1.html) - -## [Installer creation](#installer) -CPack can be used to create the installer after the build phase. - -``` -cd _build -cpack -GNSIS -``` -Currently missing in NSIS installer : -- External libraries sources - -[windows_precompiled_only_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(pre-compiled%20only)/badge.svg -[windows_precompiled_only_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(pre-compiled%20only)" - -[windows_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(VCPKG%20and%20pre-compiled)/badge.svg -[windows_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(VCPKG%20and%20pre-compiled)" diff --git a/INSTALL.md b/INSTALL.md index ed4293f4fa..3f848b99cd 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,46 +1,5 @@ -# Antares Simulator CMake Build Instructions +For build instruction see [doc/build/0-INSTALL.md](docs/build/0-INSTALL.md) -[Supported OS](#supported-os) | [CMake version](#cmake-version) | [Python version](#python-version) | [Git version](#git-version) | [Dependencies](#dependencies) +For better readability see [readthedocs documentation](readthedocs-antares) -## C/I status -| OS | Status | -|:-------|--------| -| Ubuntu | [![Status][ubuntu_precompiled_svg]][ubuntu_precompiled_link] | -| Windows | [![Status][windows_precompiled_svg]][windows_precompiled_link] | -| Centos7 | [![Status][centos_precompiled_svg]][centos_precompiled_link] | - - -## [Supported OS](#supported-os) -*ANTARES* compilation is tested on : -- Windows see [INSTALL-windows.md](INSTALL-windows.md) -- Ubuntu see [INSTALL-ubuntu.md](INSTALL-ubuntu.md) -- Centos7 see [INSTALL-centos.md](INSTALL-centos.md) - -## [CMake version](#cmake-version) -CMake 3.x must be used. -On some OS it is not available by default on the system. - -## [Python version](#python-version) -Python 3.x is used for end-to-end test. - -## [Git version](#git-version) -Git version must be above 2.15 for external dependencies build because `--ignore-whitespace` is not used by default and this option is needed during the OR-Tools compilation of ZLib to apply a patch on Windows (see https://github.com/google/or-tools/issues/1193). - -## [Dependencies](#deps) - *ANTARES* depends on severals mandatory libraries. - - [Sirius Solver](https://github.com/AntaresSimulatorTeam/sirius-solver/tree/Antares_VCPKG) (fork from [RTE](https://github.com/rte-france/sirius-solver/tree/Antares_VCPKG)) - - [OR-Tools](https://github.com/AntaresSimulatorTeam/or-tools/tree/rte_dev_sirius) (fork from [RTE](https://github.com/rte-france/or-tools/tree/rte_dev_sirius) based on official OR-Tools github) - - [wxWidgets](https://github.com/wxWidgets/wxWidgets) - (Only for the complete Antares Simulator solution with GUI) - - Boost librairies : test process filesystem regex dll (Only for unit tests) - - Installation of these dependencies is described in OS specific *ANTARES* install procedure. - -[ubuntu_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Ubuntu%20CI%20(pre-compiled)/badge.svg -[ubuntu_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Ubuntu%20CI%20(pre-compiled)" - -[windows_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(VCPKG%20and%20pre-compiled)/badge.svg -[windows_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(VCPKG%20and%20pre-compiled)" - -[centos_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(pre-compiled)/badge.svg -[centos_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(pre-compiled)" +[readthedocs-antares]: https://antares-doc.readthedocs.io/ \ No newline at end of file diff --git a/README.md b/README.md index 99bf39a72f..4a2656860c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Antares Simulator -[![Status][ubuntu_precompiled_svg]][ubuntu_precompiled_link] [![Status][windows_precompiled_svg]][windows_precompiled_link] [![Status][centos_precompiled_svg]][centos_precompiled_link] +[![Status][ubuntu_precompiled_svg]][ubuntu_precompiled_link] [![Status][windows_precompiled_svg]][windows_precompiled_link] [![Status][centos_precompiled_svg]][centos_precompiled_link] [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=AntaresSimulatorTeam_Antares_Simulator&metric=alert_status)](https://sonarcloud.io/dashboard?id=AntaresSimulatorTeam_Antares_Simulator) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) @@ -82,4 +82,4 @@ For installation instructions, please visit [INSTALL.md](INSTALL.md) [windows_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(VCPKG%20and%20pre-compiled)" [centos_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(pre-compiled)/badge.svg -[centos_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(pre-compiled)" \ No newline at end of file +[centos_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(pre-compiled)" diff --git a/docs/build/0-INSTALL.md b/docs/build/0-INSTALL.md index 91ee46dc8e..11c67ac123 100644 --- a/docs/build/0-INSTALL.md +++ b/docs/build/0-INSTALL.md @@ -1,61 +1,28 @@ -# Antares Simulator CMake Build Instructions +# Introduction -[Supported OS](#supported-os) | [CMake version](#cmake-version) | [Python version](#python-version) | [Git version](#git-version) | [Dependencies](#dependencies) +*ANTARES* is developed mainly in **C++** -## C/I status -| OS | System librairies | Built in libraries | -|:-------|--------|------| -| Ubuntu | [![Status][linux_system_svg]][linux_system_link] | [![Status][linux_deps_build_svg]][linux_deps_build_link] | -| Windows | [![Status][windows_vcpkg_svg]][windows_vcpkg_link] | [![Status][windows_deps_build_svg]][windows_deps_build_link] | -| Centos7 | [![Status][centos_system_svg]][centos_system_link] | [![Status][centos_deps_build_svg]][centos_deps_build_link] | +This software suite has been tested under: -## [Supported OS](#supported-os) -*ANTARES* compilation is tested on : -- Windows see [INSTALL-windows.md](INSTALL-windows.md) -- Ubuntu see [INSTALL-ubuntu.md](INSTALL-ubuntu.md) -- Centos7 see [INSTALL-centos.md](INSTALL-centos.md) +* Ubuntu 20.04 [![Status][ubuntu_precompiled_svg]][ubuntu_precompiled_link] +* Microsoft Windows with Visual Studio 2019 (64-bit) [![Status][windows_precompiled_svg]][windows_precompiled_link] +* Centos 7 [![Status][centos_precompiled_svg]][centos_precompiled_link] -## [CMake version](#cmake-version) -CMake 3.x must be used. -On some OS it is not available by default on the system. +*ANTARES* is built using CMake. -## [Python version](#python-version) -Python 3.x is used for end-to-end test. +## Build and installation details -## [Git version](#git-version) -Git version must be above 2.15 for external dependencies build because `--ignore-whitespace` is not used by default and this option is needed during the OR-Tools compilation of ZLib to apply a patch on Windows (see https://github.com/google/or-tools/issues/1193). +- [Development requirements](1-Development-requirements.md) +- [Dependencies](2-Dependencies-install.md) +- [Build](3-Build.md) +- [Tests](4-Tests.md) +- [Installer creation](5-Installer-creation.md) -## [Dependencies](#deps) -*ANTARES* depends on severals mandatory libraries. -- [Sirius Solver](https://github.com/AntaresSimulatorTeam/sirius-solver/tree/Antares_VCPKG) (fork from [RTE](https://github.com/rte-france/sirius-solver/tree/Antares_VCPKG)) -- [OR-Tools](https://github.com/AntaresSimulatorTeam/or-tools/tree/rte_dev_sirius) (fork from [RTE](https://github.com/rte-france/or-tools/tree/rte_dev_sirius) based on official OR-Tools github) -- [wxWidgets](https://github.com/wxWidgets/wxWidgets) - (Only for the complete Antares Simulator solution with GUI) -- Boost librairies : test process filesystem regex dll (Only for unit tests) +[ubuntu_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Ubuntu%20CI%20(pre-compiled)/badge.svg +[ubuntu_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Ubuntu%20CI%20(pre-compiled)" -Installation of these dependencies is described in OS specific *ANTARES* install procedure. +[windows_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(VCPKG%20and%20pre-compiled)/badge.svg +[windows_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(VCPKG%20and%20pre-compiled)" - -[linux_system_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Linux%20CI%20(system%20libs)/badge.svg - -[linux_system_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Linux%20CI%20(system%20libs)" - -[linux_deps_build_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Linux%20CI%20(deps.%20compilation)/badge.svg - -[linux_deps_build_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Linux%20CI%20(deps.%20compilation)" - -[windows_deps_build_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(deps.%20compilation)/badge.svg - -[windows_deps_build_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(deps.%20compilation)" - -[windows_vcpkg_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(VCPKG)/badge.svg - -[windows_vcpkg_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(VCPKG)" - -[centos_deps_build_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(deps.%20compilation)/badge.svg - -[centos_deps_build_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(deps.%20compilation)" - -[centos_system_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(system%20libs)/badge.svg - -[centos_system_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(system%20libs)" +[centos_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(pre-compiled)/badge.svg +[centos_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(pre-compiled)" diff --git a/docs/build/1-Development-requirements.md b/docs/build/1-Development-requirements.md new file mode 100644 index 0000000000..891cbe9cc4 --- /dev/null +++ b/docs/build/1-Development-requirements.md @@ -0,0 +1,104 @@ +# Development requirements + +## [C++ version](#c++-version) +The compilation of *antares-xpansion* requires C++17 support. + +=== "Windows" + + Compilation is tested on MSVC 2019 + +=== "Centos" + + By default, GCC version of Centos7 is 4.8.5. + + Some external repositories must be enabled + + === "Centos 7 (EPEL)" + ``` + sudo yum install epel-release + sudo yum install centos-release-scl + ``` + + === "Centos 8 (PowerTools)" + ``` + sudo yum install dnf-plugins-core + sudo yum config-manager --set-enabled PowerTools + ``` + + You can then use a more recent version of GCC by enabling `devtoolset-9` : + ``` + sudo yum install devtoolset-9 + ``` + + Before compiling *antares-xpansion* we must launch a new shell with `scl` tool : + ``` + scl enable devtoolset-9 bash + ``` +=== "Ubuntu" + + ``` + sudo apt install build-essential + ``` +## [CMake version](#cmake-version) +CMake 3.x must be used. + +=== "Windows" + + You can download latest Windows version directly from [CMake website](https://cmake.org/download/). +=== "Centos" + + ``` + sudo yum install epel-release + sudo yum install cmake3 + ``` +=== "Ubuntu" + + ``` + sudo apt install cmake + ``` + +## [Python version](#python-version) +Python 3.x is used for end-to-end test. + +=== "Windows" + + You can download latest Windows version directly from [Python website](https://www.python.org/downloads/windows/). +=== "Centos" + + ``` + sudo yum install python3 python3-pip + ``` +=== "Ubuntu" + + ``` + sudo apt-get install python3 python3-pip + ``` + +Required python modules can be installed with : +``` +pip install -r requirements-tests.txt +``` + +## [Git version](#git-version) +Git version must be above 2.15 for external dependencies build because `--ignore-whitespace` is not used by default and we have an issue with OR-Tools compilation of ZLib and application of patch on Windows (see https://github.com/google/or-tools/issues/1193). + +=== "Windows" + + You can download latest Windows version directly from [Git website](https://gitforwindows.org/). +=== "Centos" + + ``` + sudo yum install rh-git227-git + sudo yum install git + ``` + + Sometimes we need a 2.x version of git. To enable git 2.27 : + ``` + source /opt/rh/rh-git227/enable + ``` + +=== "Ubuntu" + + ``` + sudo apt-get install git + ``` diff --git a/docs/build/2-Dependencies-install.md b/docs/build/2-Dependencies-install.md new file mode 100644 index 0000000000..4b55cab376 --- /dev/null +++ b/docs/build/2-Dependencies-install.md @@ -0,0 +1,85 @@ +# Dependencies install + +*ANTARES* depends on severals mandatory libraries. + +- [Sirius Solver](https://github.com/AntaresSimulatorTeam/sirius-solver/tree/Antares_VCPKG) (fork from [RTE](https://github.com/rte-france/sirius-solver/tree/Antares_VCPKG)) +- [OR-Tools](https://github.com/AntaresSimulatorTeam/or-tools/tree/rte_dev_sirius) (fork from [RTE](https://github.com/rte-france/or-tools/tree/rte_dev_sirius) based on official OR-Tools github) +- [wxWidgets](https://github.com/wxWidgets/wxWidgets) + (Only for the complete Antares Simulator solution with GUI) +- Boost librairies : test (Only for unit tests) + +This section describes the install procedures for the third-party Open source libraries used by *ANTARES*. +The install procedure can be done + +- by compiling the sources after cloning the official git repository +- by using a package manager + +## Install with package manager + +=== "Windows (VCPKG)" + + For Windows we will use [vcpkg](https://github.com/microsoft/vcpkg) to download and compile the libraries. vcpkg is available as a submodule in *ANTARES*. + + You must install the corresponding [vcpkg-triplet](https://vcpkg.readthedocs.io/en/latest/users/integration/#triplet-selection) depending on Antares version and libraries load: + + - ``x64-windows`` : 64 bits version with dynamic libraries load + - ``x86-windows`` : 32 bits version with dynamic libraries load + - ``x64-windows-static`` : 64 bits version with static libraries load + - ``x86-windows-static`` : 32 bits version with static libraries load + + The vcpkg-triplet used will be named [vcpg-triplet] later in this document. + + - Init submodule and install vcpkg + + ``` + git submodule update --init vcpkg + cd vcpkg + .\bootstrap-vcpkg.bat + ``` + + Note : + > all vcpkg command further described must be run from vcpkg folder. This folder will be named [vcpkg_root] later in this document. + + + - Install dependencies + ``` + cd vcpkg + vcpkg install wxwidgets boost-test --triplet [vcpg-triplet] + ``` +=== "Centos (yum)" + + ``` + sudo yum install git redhat-lsb-core gcc gcc-c++ make wget centos-release-scl scl-utils rpm-build + sudo yum install cmake3 devtoolset-9 + sudo yum install libuuid-devel unzip wxGTK3-devel boost-test boost-devel + ``` +=== "Ubuntu (apt-get)" + + ``` + sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev + sudo apt-get install libboost-test-dev + ``` + +## Automatic libraries compilation from git +[Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps) is used as a git submodule for automatic libraries compilation from git. + +ALL dependency can be built at configure time using the option `-DBUILD_ALL=ON` (`OFF` by default). For a list of available option see [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps). + +Some dependencies can't be installed with a package manager. They can be built at configure step with a cmake option : `-DBUILD_not_system=ON` (`ON` by default): + +### Defining dependency install directory +When using multiple directories for antares development with multiple branches it can be useful to have a common dependency install directory. + +Dependency install directory can be specified with `DEPS_INSTALL_DIR`. By default install directory is `/../rte-antares-deps-` + +Note : +> `DEPS_INSTALL_DIR` is added to `CMAKE_PREFIX_PATH` + +### Pre-compiled libraries download : release version only +You can download pre-compiled antares-deps archive from [Antares dependencies compilation repository][antares-deps-url]. Only release versions are available. + +Note: +> For windows, you must you use a MSVC version compatible with MSVC version used in GitHub Action. + +[antares-deps-url]: https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v2.0.0-rc2 + diff --git a/docs/build/3-Build.md b/docs/build/3-Build.md new file mode 100644 index 0000000000..426683cc1d --- /dev/null +++ b/docs/build/3-Build.md @@ -0,0 +1,70 @@ +# Build +Before build, make sure that dependencies are installed (see [here](2-Dependencies-install.md) for more informations) + +## Environnement settings +On Centos enable `devtoolset-9` and `rh-git227`: +``` +scl enable devtoolset-9 bash +source /opt/rh/rh-git227/enable +``` +## Update git submodule +``` +git submodule update --init src/antares-deps +``` +## Configure build with CMake +=== "Windows" + Note : + > cpack NSIS installer creation need an 'out of source build'. The build directory must be outside `[antares_src]` directory + + ``` + cmake -B _build -S [antares_src] -DVCPKG_ROOT=[vcpkg_root] -DVCPKG_TARGET_TRIPLET=[vcpkg-triplet] -DCMAKE_BUILD_TYPE=release + ``` +=== "Centos" + + ``` + cmake3 -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release + ``` +=== "Ubuntu" + + ``` + cmake -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release + ``` + +Here is a list of available CMake configure option : + +|Option | Description | +|:-------|-------| +|`CMAKE_BUILD_TYPE` | Define build type. Available values are `release` and `debug` | +|`BUILD_UI`|Enable or disable Antares Simulator UI compilation (default `ON`)| +|`BUILD_not_system`|Enable build of external libraries not available on system package manager (default `ON`)| +|`BUILD_ALL`|Enable build of ALL external libraries (default `OFF`)| +|`DEPS_INSTALL_DIR`|Define dependencies libraries install directory| +|`USE_PRECOMPILED_EXT`| This option must be set if you use wxWidget as precompiled external library (default `OFF`)| +|`BUILD_TESTING`| Enable test build (default `OFF`)| +|`BUILD_OUTPUT_TEST`| Enable test with output compare build (default `OFF`)| + +Additionnal options for windows + +|Option |Description | +|:-------|-------| +|`VCPKG_ROOT`|Define vcpkg directory | +|`VCPKG_TARGET_TRIPLET`|Define [vcpkg-triplet] | + +## Build +=== "Windows" + + ``` + cmake --build _build --config release -j8 + ``` +=== "Centos" + + ``` + cmake3 --build _build --config release -j8 + ``` +=== "Ubuntu" + + ``` + cmake --build _build --config release -j8 + ``` +Note : +> Compilation can be done on several processor with ```-j``` option. diff --git a/docs/build/4-Tests.md b/docs/build/4-Tests.md new file mode 100644 index 0000000000..e0a6fac832 --- /dev/null +++ b/docs/build/4-Tests.md @@ -0,0 +1,47 @@ +# Tests + +Tests compilation can be enabled at configure time using the option `-DBUILD_TESTING=ON` (`OFF` by default) + +After build, tests can be run with ``ctest`` : + +``` +cd _build +ctest -C Release --output-on-failure +``` +Note: +> Tests with output comparison must be enabled using the option `-DBUILD_OUTPUT_TEST=ON` (`OFF` by default) + +All tests are associated to a label and multiple labels can be defined. You can choose which tests will be executed at ctest run. + +This is the list of the available labels : + +| Label | Description | +|:-------|-----| +| `units` | Units tests| +| `end-to-end` | End to end tests with antares study creation| +| `short-examples` | Short duration pytest with antares solver call and objective function result check| +| `medium-examples` | Medium duration pytest with antares solver call and objective function result check| +| `long-examples` | Long duration pytest with antares solver call and objective function result check| +| `short-output` | Short duration pytest with antares solver call and simulation output comparison| +| `sirius` | Sirius related pytest| +| `coin` | coin related pytest| +| `ortools` | OR-Tools related pytest| + +Note : +> Use `ctest -N` to see all available tests + +Here is an example for running only units tests: +``` +ctest -C Release --output-on-failure -L units +``` +Here is an example for running only sirius tests without OR-Tools used: +``` +ctest -C Release --output-on-failure -L sirius -LE ortools +``` +Here is an example for running only short sirius tests without OR-Tools used: +``` +ctest -C Release --output-on-failure -R "short-examples.*sirius" -LE "ortools" +``` +Note : +> In this case the regex is on name (`-R`) so only short-examples are executed. +For more information on `ctest` call see [documentation](https://cmake.org/cmake/help/latest/manual/ctest.1.html) diff --git a/docs/build/5-Installer-creation.md b/docs/build/5-Installer-creation.md new file mode 100644 index 0000000000..2d888ff768 --- /dev/null +++ b/docs/build/5-Installer-creation.md @@ -0,0 +1,53 @@ +# Installer creation +CPack can be used to create the installer after the build phase : + +=== "Windows" + ``` + cd _build + cpack -GNSIS + ``` + Currently missing in NSIS installer : + - External libraries sources + +=== "Centos" + + ### RHEL .rpm (Experimental) + ``` + cd _build + cpack3 -G RPM . + ``` + Note : + > `rpm-build` must be installed for RPM creation : `sudo yum install rpm-build` + + ### Linux .tar.gz + ``` + cd _build + cpack3 -G TGZ + ``` + + ### Required system libraries + There are still some system libraries that must be installed if you want to use *ANTARES*: + + ``` + sudo yum install epel-release + sudo yum install wxGTK3 + ``` + +=== "Ubuntu" + + ### Ubuntu .deb (Experimental) + ``` + cd _build + cpack -G DEB . + ``` + ### Linux .tar.gz + ``` + cd _build + cpack -G TGZ + ``` + + ### Required system libraries + There are still some system libraries that must be installed if you want to use *ANTARES*: + ``` + sudo apt-get install libwxgtk3.0-gtk3-0v5 + ``` \ No newline at end of file diff --git a/docs/build/INSTALL-centos.md b/docs/build/INSTALL-centos.md deleted file mode 100644 index 62dad211ed..0000000000 --- a/docs/build/INSTALL-centos.md +++ /dev/null @@ -1,216 +0,0 @@ -# Antares Simulator CMake Build Instructions - -[Environnement](#environment) | [CMake version](#cmake-version) | [GCC version](#gcc-version) | [Python version](#python-version) | [Dependencies](#dependencies) | [Building](#building-antares-solution) | [Tests](#tests) | [Installer creation](#installer-creation) - -## C/I status -| OS | System librairies | Built in libraries | -|:-------|--------|------| -| Centos7 | [![Status][centos_system_svg]][centos_system_link] | [![Status][centos_deps_build_svg]][centos_deps_build_link] | - -[centos_deps_build_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(deps.%20compilation)/badge.svg - -[centos_deps_build_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(deps.%20compilation)" - -[centos_system_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(system%20libs)/badge.svg - -[centos_system_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(system%20libs)" - -## [CMake version](#cmake-version) -CMake 3.x must be used. -``` -sudo yum install epel-release -sudo yum install cmake3 -``` -Note: -> All ``cmake`` command must be replaced by ``cmake3``. - -## [GCC version](#gcc-version) -By default, GCC version of Centos7 is 4.8.5. -The compilation of *ANTARES* requires C++17 support. - -You can use a more recent version of GCC by enabling `devtoolset-7` : -``` -sudo yum install centos-release-scl -sudo yum install devtoolset-7 -``` - -Before compiling *ANTARES* we must launch a new shell with `scl` tool : -``` -scl enable devtoolset-7 bash -``` - -## [Python version](#python-version) -Python 3.x must be used. - -``` -sudo yum install python3 python3-pip -``` - -Required python modules can be installed with : -``` -pip3 install -r src/tests/examples/requirements.txt -``` - -## [Dependencies](#deps) - ANTARES depends on several mandatory libraries. - - [Sirius Solver](https://github.com/AntaresSimulatorTeam/sirius-solver/tree/Antares_VCPKG) (fork from [RTE](https://github.com/rte-france/sirius-solver/tree/Antares_VCPKG)) - - [OR-Tools](https://github.com/AntaresSimulatorTeam/or-tools/tree/rte_dev_sirius) (fork from [RTE](https://github.com/rte-france/or-tools/tree/rte_dev_sirius) based on official OR-Tools github) - - [wxWidgets](https://github.com/wxWidgets/wxWidgets) - (Only for the complete Antares Simulator solution with GUI) - - Boost libraries : test process filesystem regex dll (Only for unit tests) - -This section describes the install procedures for the third-party Open source libraries used by ANTARES. -The install procedure can be done -- by compiling the sources after cloning the official git repository -- by using a package manager -- by using pre-compiled external libraries provided by [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.2.0) - -#### Yum commands -``` -sudo yum install redhat-lsb-core curl-devel wxGTK3-devel boost-test boost-filesystem boost-regex boost-devel unzip -``` -### [Automatic librairies compilation from git](#git_compil) -[Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps) is used as a git submodule for automatic librairies compilation from git. - -All dependencies can be built at configure time using the option `-DBUILD_ALL=ON` (`OFF` by default). -For a list of available option see [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps). - -Some dependencies can't be installed with a package manager. -They can be built at configure step with a cmake option : `-DBUILD_not_system=ON` (`ON` by default). - -#### Defining dependency install directory -It can be useful to have a common dependency install directory, when using multiple directories for antares development -with multiple branches. - -The dependency-install-directory can be specified with `DEPS_INSTALL_DIR`. -By default the install directory is `/../rte-antares-deps-` - -Note : -> `DEPS_INSTALL_DIR` is added to `CMAKE_PREFIX_PATH` - -> If the dependency install directory contains CURL, or wxWidgets pre-compiled libraries an additionnal option must be used at configure time `-DUSE_PRECOMPILED_EXT=ON` - -### Pre-compiled libraries download : release version only -You can download pre-compiled antares-deps archive from [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.1.0). Only release version are available. - -There are still some system libraries that must be installed : - -``` -sudo yum install libuuid-devel libidn2-devel gtk2-devel redhat-lsb-core -``` - -## [Building Antares Solution](#build) - -Antares source directory is named `[antares_src]` in all following commands. - -### 1 - Update git submodule for dependency build - -First you need to update git submodule for dependency build : -``` -git submodule update --init [antares_src]/antares-deps -``` - -### 2 - Enable `devtoolset-7` - -``` -scl enable devtoolset-7 bash -``` - -### 3 - CMake configure - -Here is a list of available CMake configure option : - -|Option | Description | -|:-------|-------| -|`CMAKE_BUILD_TYPE` | Define build type. Available values are `release` and `debug` | -|`BUILD_UI`|Enable or disable Antares Simulator UI compilation (default `ON`)| -|`BUILD_not_system`|Enable build of external librairies not available on system package manager (default `ON`)| -|`BUILD_ALL`|Enable build of ALL external librairies (default `OFF`)| -|`DEPS_INSTALL_DIR`|Define dependencies libraries install directory| -|`USE_PRECOMPILED_EXT`| This option must be set if you use precompiled external librairies (default `OFF`)| -|`BUILD_TESTING`| Enable test build (default `OFF`)| -|`BUILD_OUTPUT_TEST`| Enable test with output compare build (default `OFF`)| - - -``` -cmake3 -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release -``` - -### 4 - Build - ``` -cmake3 --build _build --config release -j8 -``` -Note : -> Compilation can be done on several processor with ```-j``` option. - -## [Tests](#tests) - -Tests compilation can be enabled at configure time using the option `-DBUILD_TESTING=ON` (`OFF` by default) - -After build, tests can be run with ``ctest`` : - ``` -cd _build -ctest3 -C Release --output-on-failure -``` -Note: -> Tests with output comparison must be enabled using the option `-DBUILD_OUTPUT_TEST=ON` (`OFF` by default) - -All tests are associated to a label and multiple labels can be defined. You can choose which tests will be executed at ctest run. - -This is the list of the available labels : - -| Label | Description | -|:-------|-----| -| `units` | Units tests| -| `end-to-end` | End to end tests with antares study creation| -| `short-examples` | Short duration pytest with antares solver call and objective function result check| -| `medium-examples` | Medium duration pytest with antares solver call and objective function result check| -| `long-examples` | Long duration pytest with antares solver call and objective function result check| -| `short-output` | Short duration pytest with antares solver call and simulation output comparison| -| `sirius` | Sirius related pytest| -| `coin` | coin related pytest| -| `ortools` | OR-Tools related pytest| - -Note : -> Use `ctest -N` to see all available tests -Here is an example for running only units tests: -``` -ctest3 -C Release --output-on-failure -L units -```` - -Here is an example for running only sirius tests without OR-Tools used: -``` -ctest3 -C Release --output-on-failure -L sirius -LE ortools -```` - -Here is an example for running only short sirius tests without OR-Tools used: -``` -ctest3 -C Release --output-on-failure -R "short-examples.*sirius" -LE "ortools" -```` -Note : -> In this case the regex is on name (`-R`) so only short-examples are executed. -For more information on `ctest` call see [documentation](https://cmake.org/cmake/help/latest/manual/ctest.1.html) - -## [Installer creation](#installer) -CPack can be used to create the installer after the build phase. - -## RHEL .rpm (Experimental) - ``` -cd _build -cpack3 -G RPM . -``` -Note : -> `rpm-build` must be installed for RPM creation : `sudo yum install rpm-build ` - -## Linux .tar.gz - ``` -cd _build -cpack3 -G TGZ . -``` - -There are still some system libraries that must be installed if you want to use *ANTARES*: - -``` -sudo yum install epel-release -sudo yum install curl wxGTK3 -``` diff --git a/docs/build/INSTALL-ubuntu.md b/docs/build/INSTALL-ubuntu.md deleted file mode 100644 index 7033b02fd1..0000000000 --- a/docs/build/INSTALL-ubuntu.md +++ /dev/null @@ -1,191 +0,0 @@ -# Antares Simulator CMake Build Instructions - -[Environnement](#environment) | [Build tools](#build-tools) | [Environnement build install](#env-build-install) | [Python version](#python-version) | [Dependencies](#dependencies) | [Building](#building-antares-solution) | [Tests](#tests) | [Installer creation](#installer-creation) - -## C/I status -| OS | System librairies | Built in libraries | -|:-------|--------|------| -| Ubuntu | [![Status][linux_system_svg]][linux_system_link] | [![Status][linux_deps_build_svg]][linux_deps_build_link] | - -[linux_system_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Linux%20CI%20(system%20libs)/badge.svg - -[linux_system_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Linux%20CI%20(system%20libs)" - -[linux_deps_build_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Linux%20CI%20(deps.%20compilation)/badge.svg - -[linux_deps_build_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Linux%20CI%20(deps.%20compilation)" - -## [Build tools](#build-tools) - -``` -sudo apt install build-essential libssl-dev cmake -``` - -## [Python version](#python-version) -Python 3.x must be used. - -``` -sudo apt install python3 python3-pip -``` -Required python modules can be installed with : -``` -pip3 install -r src/src/tests/examples/requirements.txt -``` - -## [Dependencies](#deps) - ANTARES depends on several mandatory libraries. - - [Sirius Solver](https://github.com/AntaresSimulatorTeam/sirius-solver/tree/Antares_VCPKG) (fork from [RTE](https://github.com/rte-france/sirius-solver/tree/Antares_VCPKG)) - - [OR-Tools](https://github.com/AntaresSimulatorTeam/or-tools/tree/rte_dev_sirius) (fork from [RTE](https://github.com/rte-france/or-tools/tree/rte_dev_sirius) based on official OR-Tools github) - - [wxWidgets](https://github.com/wxWidgets/wxWidgets) - (Only for the complete Antares Simulator solution with GUI) - - Boost libraries : test process filesystem regex dll (Only for unit tests) - -This section describes the install procedures for the third-party Open source libraries used by ANTARES. -The install procedure can be done -- by compiling the sources after cloning the official git repository -- by using a package manager. -- by using pre-compiled external libraries provided by [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.2.0) - -#### Command to install dependencies -``` -sudo apt install uuid-dev libwxgtk3.0-gtk3-dev libboost-test-dev libboost-filesystem-dev libboost-regex-dev libboost-dev -``` - -### [Automatic librairies compilation from git](#git_compil) -[Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps) is used as a git submodule for automatic librairies compilation from git. - -All dependencies can be built at configure time using the option `-DBUILD_ALL=ON` (`OFF` by default). -For a list of available option see [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps). - -Some dependencies can't be installed with a package manager. -They can be built at configure step with a cmake option : `-DBUILD_not_system=ON` (`ON` by default). - -#### Defining dependency install directory -It can be useful to have a common dependency install directory, when using multiple directories for antares development -with multiple branches. - -The dependency-install-directory can be specified with `DEPS_INSTALL_DIR`. -By default the install directory is `/../rte-antares-deps-` - -Note : -> `DEPS_INSTALL_DIR` is added to `CMAKE_PREFIX_PATH` - -> If the dependency install directory contains wxWidgets pre-compiled libraries an additionnal option must be used at configure time `-DUSE_PRECOMPILED_EXT=ON` - -### Pre-compiled libraries download : release version only -You can download pre-compiled antares-deps archive from [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.1.0). Only release version are available. - -There are still some system libraries that must be installed : - -``` -sudo apt-get install libuuid1 uuid-dev libssh2-1 libssh2-1-dev libidn2-0 libidn2-dev libidn11 libidn11-dev gtk2.0 libb64-dev libjpeg-dev libtiff-dev libsecret-1-dev -``` - -## [Building Antares Solution](#build) - -Antares source directory is named `[antares_src]` in all following commands. - -### 1 - Update git submodule for dependency build - -First you need to update git submodule for dependency build : -``` -git submodule update --init [antares_src]/antares-deps -``` - -### 2 - CMake configure - -#### Configure options - -Here is a list of available CMake configure option : - -|Option | Description | -|:-------|-------| -|`CMAKE_BUILD_TYPE` | Define build type. Available values are `release` and `debug` | -|`BUILD_UI`|Enable or disable Antares Simulator UI compilation (default `ON`)| -|`BUILD_not_system`|Enable build of external librairies not available on system package manager (default `ON`)| -|`BUILD_ALL`|Enable build of ALL external librairies (default `OFF`)| -|`DEPS_INSTALL_DIR`|Define dependencies libraries install directory| -|`USE_PRECOMPILED_EXT`| This option must be set if you use precompiled external librairies (default `OFF`)| -|`BUILD_TESTING`| Enable test build (default `OFF`)| -|`BUILD_OUTPUT_TEST`| Enable test with output compare build (default `OFF`)| - -#### Configure - -``` -cmake -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release -``` - -### 3 - Build - ``` -cmake --build _build --config release -j8 -``` -Note : -> Compilation can be done on several processor with ```-j``` option. - -## [Tests](#tests) - -Tests compilation can be enabled at configure time using the option `-DBUILD_TESTING=ON` (`OFF` by default) - -After build, tests can be run with ``ctest`` : - ``` -cd _build -ctest -C Release --output-on-failure -``` -Note: -> Tests with output comparison must be enabled using the option `-DBUILD_OUTPUT_TEST=ON` (`OFF` by default) - -All tests are associated to a label and multiple labels can be defined. You can choose which tests will be executed at ctest run. - -This is the list of the available labels : - -| Label | Description | -|:-------|-----| -| `units` | Units tests| -| `end-to-end` | End to end tests with antares study creation| -| `short-examples` | Short duration pytest with antares solver call and objective function result check| -| `medium-examples` | Medium duration pytest with antares solver call and objective function result check| -| `long-examples` | Long duration pytest with antares solver call and objective function result check| -| `short-output` | Short duration pytest with antares solver call and simulation output comparison| -| `sirius` | Sirius related pytest| -| `coin` | coin related pytest| -| `ortools` | OR-Tools related pytest| - -Note : -> Use `ctest -N` to see all available tests -Here is an example for running only units tests: -``` -ctest -C Release --output-on-failure -L units -```` - -Here is an example for running only sirius tests without OR-Tools used: -``` -ctest -C Release --output-on-failure -L sirius -LE ortools -```` - -Here is an example for running only short sirius tests without OR-Tools used: -``` -ctest -C Release --output-on-failure -R "short-examples.*sirius" -LE "ortools" -```` -Note : -> In this case the regex is on name (`-R`) so only short-examples are executed. -For more information on `ctest` call see [documentation](https://cmake.org/cmake/help/latest/manual/ctest.1.html) - -## [Installer creation](#installer) -CPack can be used to create the installer after the build phase. - -## Ubuntu .deb (Experimental) - ``` -cd _build -cpack -G DEB . -``` - -## Linux .tar.gz - ``` -cd _build -cpack -G TGZ . -``` -There are still some system libraries that must be installed if you want to use *ANTARES*: - -``` -sudo apt-get install libwxgtk3.0-gtk3-0v5 -``` diff --git a/docs/build/INSTALL-windows.md b/docs/build/INSTALL-windows.md deleted file mode 100644 index beac77ca9c..0000000000 --- a/docs/build/INSTALL-windows.md +++ /dev/null @@ -1,219 +0,0 @@ -# Antares Simulator CMake Build Instructions - -[CMake version](#cmake-version) | [Python version](#python-version) | [Dependencies](#dependencies) | [Building](#building-antares-solution) | [Tests](#tests) | [Installer creation](#installer-creation) - -## C/I status -| OS | System librairies | Built in libraries | -|:-------|--------|------| -| Windows | [![Status][windows_vcpkg_svg]][windows_vcpkg_link] | [![Status][windows_deps_build_svg]][windows_deps_build_link] | - -[windows_deps_build_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(deps.%20compilation)/badge.svg - -[windows_deps_build_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(deps.%20compilation)" - -[windows_vcpkg_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(VCPKG)/badge.svg - -[windows_vcpkg_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(VCPKG)" - -## [CMake version](#cmake-version) -CMake 3.x must be used. - -You can download latest Windows version directly from [CMake website](https://cmake.org/download/). - -## [Python version](#python-version) -Python 3.x must be used. - -You can download latest Windows version directly from [Python website](https://www.python.org/downloads/windows/). - -Required python modules can be installed with : -``` -pip install -r src/tests/examples/requirements.txt -``` - -## [Dependencies](#deps) - ANTARES depends on several mandatory libraries. - - [Sirius Solver](https://github.com/AntaresSimulatorTeam/sirius-solver/tree/Antares_VCPKG) (fork from [RTE](https://github.com/rte-france/sirius-solver/tree/Antares_VCPKG)) - - [OR-Tools](https://github.com/AntaresSimulatorTeam/or-tools/tree/rte_dev_sirius) (fork from [RTE](https://github.com/rte-france/or-tools/tree/rte_dev_sirius) based on official OR-Tools github) - - [wxWidgets](https://github.com/wxWidgets/wxWidgets) - (Only for the complete Antares Simulator solution with GUI) - - Boost libraries : test process filesystem regex dll (Only for unit tests) - -This section describes the install procedures for the third-party Open source libraries used by ANTARES. -The install procedure can be done -- by compiling the sources after cloning the official git repository -- by using VCPKG -- by using pre-compiled external libraries provided by [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.2.0) - -### VCPKG - -For Windows we will use [vcpkg](https://github.com/microsoft/vcpkg) to download and compile the librairies. - -You must install the corresponding [vcpkg-triplet](https://vcpkg.readthedocs.io/en/latest/users/integration/#triplet-selection) depending on Antares version and libraries load: - -- ``x64-windows`` : 64 bits version with dynamic librairies load -- ``x64-windows-static`` : 64 bits version with static librairies load - -The vcpkg-triplet used will be named [vcpg-triplet] later in this document. - -#### 1 Install vcpkg - -vcpkg can be installed anywhere on your computer : - -``` -git clone https://github.com/Microsoft/vcpkg.git -cd vcpkg -.\bootstrap-vcpkg.bat -``` - -Note : -> all vcpkg further described commands must be run from the vcpkg folder. This folder will be named [vcpkg_root] later in this document. - - -#### 2 Install dependencies -``` -cd [vcpkg_root] -vcpkg install wxwidgets:[vcpg-triplet] -vcpkg install boost-test:[vcpg-triplet] -vcpkg install boost-filesystem:[vcpg-triplet] -vcpkg install boost-process[vcpg-triplet] -vcpkg install boost-dll:[vcpg-triplet] -vcpkg install boost-regex:[vcpg-triplet] -``` -### [Automatic librairies compilation from git](#git_compil) -[Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps) is used as a git submodule for automatic librairies compilation from git. - -All dependencies can be built at configure time using the option `-DBUILD_ALL=ON` (`OFF` by default). -For a list of available option see [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps). - -Some dependencies can't be installed with a package manager. -They can be built at configure step with a cmake option : `-DBUILD_not_system=ON` (`ON` by default). - -#### Defining dependency install directory -It can be useful to have a common dependency install directory, when using multiple directories for antares development -with multiple branches. - -The dependency-install-directory can be specified with `DEPS_INSTALL_DIR`. -By default the install directory is `/../rte-antares-deps-` - -Note : -> `DEPS_INSTALL_DIR` is added to `CMAKE_PREFIX_PATH` - -> If the dependency install directory contains wxWidgets pre-compiled libraries an additionnal option must be used at configure time `-DUSE_PRECOMPILED_EXT=ON` - -### Pre-compiled libraries download : release version only -You can download pre-compiled antares-deps archive from [Antares dependencies compilation repository](https://github.com/AntaresSimulatorTeam/antares-deps/releases/tag/v1.1.0). Only release version are available. - -Note: -> You must you use a MSVC version compatible with MSVC version used in GitHub Action. - -## [Building Antares Solution](#build) - -Antares source directory is named `[antares_src]` in all following commands. - -### 1 - Update git submodule for dependency build - -First you need to update git submodule for dependency build : -``` -git submodule update --init [antares_src]/antares-deps -``` - -### 2 - CMake configure - -Note : -> cpack NSIS installer creation need an 'out of source build'. The build directory must be outside `[antares_src]` directory - -#### Configure options - -Here is a list of available CMake configure option : - -|Option | Description | -|:-------|-------| -|`CMAKE_BUILD_TYPE` | Define build type. Available values are `release` and `debug` | -|`BUILD_UI`|Enable or disable Antares Simulator UI compilation (default `ON`)| -|`BUILD_not_system`|Enable build of external librairies not available on system package manager (default `ON`)| -|`BUILD_ALL`|Enable build of ALL external librairies (default `OFF`)| -|`DEPS_INSTALL_DIR`|Define dependencies libraries install directory| -|`USE_PRECOMPILED_EXT`| This option must be set if you use precompiled external librairies (default `OFF`)| -|`VCPKG_ROOT`| Define [vcpkg_root] | -|`VCPKG_TARGET_TRIPLET`| Define [vcpkg-triplet] | -|`BUILD_TESTING`| Enable test build (default `OFF`)| -|`BUILD_OUTPUT_TEST`| Enable test with output compare build (default `OFF`)| - - -#### Configure using vcpkg (recommended) - -``` -cmake -B _build -S [antares_src] -DVCPKG_ROOT=[vcpkg_root] -DVCPKG_TARGET_TRIPLET=[vcpkg-triplet] -DCMAKE_BUILD_TYPE=release -``` - - -#### Configure withouth VCPKG - -``` -cmake -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release -``` - -### 3 - Build - ``` -cmake --build _build --config release -j8 -``` -Note : -> Compilation can be done on several processor with ```-j``` option. - -## [Tests](#tests) - -Tests compilation can be enabled at configure time using the option `-DBUILD_TESTING=ON` (`OFF` by default) - -After build, tests can be run with ``ctest`` : - ``` -cd _build -ctest -C Release --output-on-failure -``` -Note: -> Tests with output comparison must be enabled using the option `-DBUILD_OUTPUT_TEST=ON` (`OFF` by default) - -All tests are associated to a label and multiple labels can be defined. You can choose which tests will be executed at ctest run. - -This is the list of the available labels : - -| Label | Description | -|:-------|-----| -| `units` | Units tests| -| `end-to-end` | End to end tests with antares study creation| -| `short-examples` | Short duration pytest with antares solver call and objective function result check| -| `medium-examples` | Medium duration pytest with antares solver call and objective function result check| -| `long-examples` | Long duration pytest with antares solver call and objective function result check| -| `short-output` | Short duration pytest with antares solver call and simulation output comparison| -| `sirius` | Sirius related pytest| -| `coin` | coin related pytest| -| `ortools` | OR-Tools related pytest| - -Note : -> Use `ctest -N` to see all available tests -Here is an example for running only units tests: -``` -ctest -C Release --output-on-failure -L units -```` - -Here is an example for running only sirius tests without OR-Tools used: -``` -ctest -C Release --output-on-failure -L sirius -LE ortools -```` - -Here is an example for running only short sirius tests without OR-Tools used: -``` -ctest -C Release --output-on-failure -R "short-examples.*sirius" -LE "ortools" -```` -Note : -> In this case the regex is on name (`-R`) so only short-examples are executed. -For more information on `ctest` call see [documentation](https://cmake.org/cmake/help/latest/manual/ctest.1.html) - -## [Installer creation](#installer) -CPack can be used to create the installer after the build phase. - -``` -cd _build -cpack -GNSIS -``` -Currently missing in NSIS installer : -- External libraries sources diff --git a/docs/index.md b/docs/index.md index bfc03458db..be2a04c3a6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,9 +1,11 @@ -![antares logo](assets/antares.png) - -[![Status][linux_system_svg]][linux_system_link] [![Status][windows_vcpkg_svg]][windows_vcpkg_link] [![Status][centos7_system_svg]][centos7_system_link] +[![Status][ubuntu_precompiled_svg]][ubuntu_precompiled_link] [![Status][windows_precompiled_svg]][windows_precompiled_link] [![Status][centos_precompiled_svg]][centos_precompiled_link] [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=AntaresSimulatorTeam_Antares_Simulator&metric=alert_status)](https://sonarcloud.io/dashboard?id=AntaresSimulatorTeam_Antares_Simulator) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +![C++](https://img.shields.io/badge/c++-%2300599C.svg?style=for-the-badge&logo=c%2B%2B&logoColor=white) + +![antares logo](assets/antares.png) + Antares Simulator is an open source power system simulator meant to be used by anybody placing value in quantifying the adequacy or the @@ -16,59 +18,23 @@ are welcome to use the software. The Antares Simulator project was initiated by RTE (French Electricity Transmission system Operator) in 2007. It was developed from the start -as a cross-platform application (Windows, GNU/Linux, Unix). +as a cross-platform application (Windows, GNU/Linux ,Unix). Until 2018 it was distributed under the terms of a proprietary license. In May 2018 RTE decided to release the project under the GPLv3 license. -## Links: +# Links: - Antares web site : https://antares-simulator.org - RTE web site : http://www.rte-france.com/ -## Installation - -This software suite has been tested under: - -* Ubuntu 20.04 [![Status][linux_system_svg]][linux_system_link] -* Microsoft Windows with Visual Studio 2019 (64-bit) [![Status][windows_vcpkg_svg]][windows_vcpkg_link] -* Centos7 [![Status][centos7_system_svg]][centos7_system_link] - -Antares Simulator is built using CMake. -For installation instructions, please visit [INSTALL.md](INSTALL.md) - -## Source Code Content - -* [AUTHORS](AUTHORS.txt) - Antares Simulator authors -* [CERTIFICATE](CERTIFICATE.txt) - A standard DCO that has to be signed by every contributor -* [CONTRIBUTING](CONTRIBUTING.txt) - How to submit patches and discuss about code evolutions -* [COPYING](COPYING.txt) - The GPL v3 license. -* [INSTALL](INSTALL.md) - Installation and building instructions. -* [NEWS](NEWS.md) - Important modifications between the releases. -* [README](README.md) - This file. -* [ROADMAP](ROADMAP.txt) - Main orientations for further developements -* [THANKS](THANKS.txt) - Attribution notices for external libraries and contributors. -* [resources/](resources) - Free sample data sets. -* [src/analyzer/](src/analyzer) - source code for the statistical analysis of historical time-series. -* [src/cmake/](src/cmake) - files for initializing a solution ready for compilation. -* [src/distrib/](src/distrib) - system redistributable libraries Win(x64,x86),unix. -* [src/ext/](src/ext) - third party libraries used by Antares_Simulator: libYuni, Sirius_Solver. -* [src/libs/](src/libs) - miscellaneous Antares_Simulator libraries. -* [src/internet/](src/internet) - web access (check for updates, usage metrics, data exchange). -* [src/simulator/](src/simulator) - Time-series generation, Monte-Carlo simulation and weekly optimization modelling. -* [src/tools/](src/tools) - miscellaneous tools for dataset management. -* [src/ui/](src/ui) - Graphic user interface. - -[linux_system_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Linux%20CI%20(system%20libs)/badge.svg - -[linux_system_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Linux%20CI%20(system%20libs)" - -[windows_vcpkg_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(VCPKG)/badge.svg - -[windows_vcpkg_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(VCPKG)" -[centos7_system_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(system%20libs)/badge.svg +[ubuntu_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Ubuntu%20CI%20(pre-compiled)/badge.svg +[ubuntu_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Ubuntu%20CI%20(pre-compiled)" -[centos7_system_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(system%20libs)" +[windows_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Windows%20CI%20(VCPKG%20and%20pre-compiled)/badge.svg +[windows_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Windows%20CI%20(VCPKG%20and%20pre-compiled)" +[centos_precompiled_svg]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/workflows/Centos7%20CI%20(pre-compiled)/badge.svg +[centos_precompiled_link]: https://github.com/AntaresSimulatorTeam/Antares_Simulator/actions?query=workflow%3A"Centos7%20CI%20(pre-compiled)" diff --git a/mkdocs.yml b/mkdocs.yml index 6b677b4cfb..94a25b0322 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -35,11 +35,13 @@ nav: - 'Optimisation problem' : 'reference-guide/2-modeling.md' - 'Build': - 'Introduction': 'build/0-INSTALL.md' - - 'Windows': 'build/INSTALL-windows.md' - - 'Ubuntu': 'build/INSTALL-ubuntu.md' - - 'CentOS': 'build/INSTALL-centos.md' - - 'OR-tools integration' : 'build/ortools-integration.md' + - 'Development requirements': 'build/1-Development-requirements.md' + - 'Dependencies install': 'build/2-Dependencies-install.md' + - 'Build': 'build/3-Build.md' + - 'Tests': 'build/4-Tests.md' + - 'Installer creation': 'build/5-Installer-creation.md' - 'Continuous Integration' : 'build/continuous-integration.md' + - 'OR-tools integration' : 'build/ortools-integration.md' - 'Changelog': 'CHANGELOG.md' plugins: