Skip to content

Commit

Permalink
Install sirius solver with VCPKG, remove antares-deps (#2090)
Browse files Browse the repository at this point in the history
**Description**

Continues the work of #2078 (which should be merged before in feature
branch feature/vcpkg-dependencies), to push further the use of VCPKG,
and in particular remove the need for the home-made antares-deps
repository.

Hence, this includes:
 - Addition of sirius-solver "overlay" port to install sirius with VCPKG
 - Removal of antares-deps and associated code

---------

Signed-off-by: Sylvain Leclerc <[email protected]>
  • Loading branch information
sylvlecl authored Jun 5, 2024
1 parent 6e0e94f commit 5e6a57f
Show file tree
Hide file tree
Showing 18 changed files with 170 additions and 268 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
branches:
- develop
- dependabot/*

schedule:
- cron: '21 2 * * *'
workflow_call:
Expand Down Expand Up @@ -71,15 +70,7 @@ jobs:

- name: Init submodule
run: |
git submodule update --init --remote src/antares-deps src/tests/resources/Antares_Simulator_Tests
- name: Download & extract precompiled deps at root
run: |
ANTARES_DEPS_VERSION=$(cut -d'"' -f4 antares-deps-version.json | grep -Ev '\{|\}')
cd /
wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${ANTARES_DEPS_VERSION}/rte-antares-deps-centos7-Release.tar.gz
tar -xvf rte-antares-deps-centos7-Release.tar.gz
rm -rf rte-antares-deps-centos7-Release.tar.gz
git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests
- name: Config OR-Tools URL
run: |
Expand Down Expand Up @@ -110,14 +101,13 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=x64-linux-release \
-DDEPS_INSTALL_DIR=/rte-antares-deps-Release \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON \
-DBUILD_not_system=OFF \
-DBUILD_TOOLS=ON \
-DBUILD_UI=OFF \
-DCMAKE_PREFIX_PATH=${{ env.ORTOOLSDIR }}/install \
- name: Build
run: |
source /opt/rh/devtoolset-10/enable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: "Download extract .tgz precompiled libraries"
description: "Download and extract .tgz precompiled libraries from antares-deps and antares-simulator repository"
inputs:
antares-deps-version:
description: 'antares-deps version'
required: true
os:
description: 'operational system used for github action'
required: true
Expand All @@ -21,12 +18,6 @@ inputs:
runs:
using: "composite"
steps:
- name: Download & extract antares-deps
shell: bash
run: |
wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${{inputs.antares-deps-version}}/rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz
tar -xvf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz
rm -rf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz

- name: Download & extract OR-Tools
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: "Download extract .zip precompiled libraries"
description: "Download and extract .zip precompiled libraries from antares-deps and antares-simulator repository"
inputs:
antares-deps-version:
description: 'antares-deps version'
required: true
os:
description: 'operational system used for github action'
required: true
Expand All @@ -20,15 +17,7 @@ inputs:

runs:
using: "composite"
steps:
- name: Download & extract antares-deps
shell: bash
run: |
wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${{inputs.antares-deps-version}}/rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
unzip rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
rm -rf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
echo "${GITHUB_WORKSPACE}/rte-antares-deps-Release/bin" >> $GITHUB_PATH
steps:
- name: Download & extract OR-Tools
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/oracle8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
rm ortools.zip
- name: Init submodule
run: git submodule update --init --remote src/antares-deps src/tests/resources/Antares_Simulator_Tests
run: git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests

- name: Install dependencies
run: |
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,9 @@ jobs:
sudo apt-get install libboost-test-dev
sudo apt-get install g++-10 gcc-10
- name: Read antares-deps version
id: antares-deps-version
uses: notiz-dev/github-action-json-property@release
with:
path: 'antares-deps-version.json'
prop_path: 'antares_deps_version'

- name: Download pre-compiled librairies
uses: ./.github/workflows/download-extract-precompiled-libraries-tgz
with:
antares-deps-version: ${{steps.antares-deps-version.outputs.prop}}
os: ${{matrix.os}}
buildtype: Debug
ortools-url: ${{env.ORTOOLS_URL}}
Expand All @@ -85,7 +77,6 @@ jobs:
- name: Init submodule
run: |
git submodule update --init src/antares-deps
git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests
- name: Configure
Expand All @@ -97,13 +88,11 @@ jobs:
-DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=x64-linux-release \
-DDEPS_INSTALL_DIR=./rte-antares-deps-Debug \
-DCODE_COVERAGE=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_PREFIX_PATH="../install;${{ env.ORTOOLS_DIR }}/install" \
-DBUILD_TESTING=ON \
-DMZ_CODE_COVERAGE=ON \
-DBUILD_not_system=OFF \
-DPython3_EXECUTABLE='${{ steps.setup-python.outputs.python-path }}'
- name: Build
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jobs:
with:
key: ${{ env.os }}


- name : Init VCPKG submodule
run: |
git submodule update --init vcpkg
Expand Down Expand Up @@ -96,27 +95,13 @@ jobs:
sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev
sudo apt-get install g++-10 gcc-10
- name: export wxWidgets script
shell: bash
run: |
export WX_CONFIG=${{env.WX_CONFIG}}
- name: Read antares-deps version
id: antares-deps-version
uses: notiz-dev/github-action-json-property@release
with:
path: 'antares-deps-version.json'
prop_path: 'antares_deps_version'


- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
- name: Download pre-compiled librairies
uses: ./.github/workflows/download-extract-precompiled-libraries-tgz
with:
antares-deps-version: ${{steps.antares-deps-version.outputs.prop}}
os: ${{env.os}}
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}
Expand All @@ -134,11 +119,8 @@ jobs:
- name: Init submodule
run: |
git submodule update --init src/antares-deps
git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests


- name: Configure
run: |
cmake -B _build -S src \
Expand All @@ -148,10 +130,8 @@ jobs:
-DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=x64-linux-release \
-DDEPS_INSTALL_DIR=${{github.workspace}}/rte-antares-deps-Release \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON \
-DBUILD_not_system=OFF \
-DBUILD_TOOLS=ON \
-DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install \
-DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/bin/python"
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/windows-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,9 @@ jobs:
# Allows to restore a cache when deps have only partially changed (like adding a dependency)
restore-keys: vcpkg-cache-windows-

- name: Read antares-deps version
id: antares-deps-version
uses: notiz-dev/github-action-json-property@release
with:
path: 'antares-deps-version.json'
prop_path: 'antares_deps_version'

- name: Download pre-compiled librairies
uses: ./.github/workflows/download-extract-precompiled-libraries-zip
with:
antares-deps-version: ${{steps.antares-deps-version.outputs.prop}}
os: ${{env.os}}
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}
Expand All @@ -121,7 +113,6 @@ jobs:

- name: Init submodule
run: |
git submodule update --init src/antares-deps
git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests
- name: Enable git longpaths
Expand All @@ -131,15 +122,13 @@ jobs:
shell: bash
run: |
cmake -B _build -S src \
-DDEPS_INSTALL_DIR=rte-antares-deps-Release \
-DCMAKE_PREFIX_PATH="${{ env.ORTOOLS_DIR }}/install" \
-DVCPKG_ROOT="${{env.VCPKG_ROOT}}" \
-DVCPKG_TARGET_TRIPLET=${{ env.triplet }} \
-DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON \
-DBUILD_TOOLS=ON \
-DBUILD_not_system=OFF \
-DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/python.exe" \
-DCMAKE_VS_GLOBALS="CLToolExe=cl.exe;CLToolPath=${GITHUB_WORKSPACE}/ccache;TrackFileAccess=false;UseMultiToolTask=true;DebugInformationFormat=OldStyle"
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "src/antares-deps"]
path = src/antares-deps
url = https://github.com/AntaresSimulatorTeam/antares-deps.git
branch = v2.0.2b
[submodule "src/tests/resources/Antares_Simulator_Tests"]
path = src/tests/resources/Antares_Simulator_Tests
url = https://github.com/AntaresSimulatorTeam/Antares_Simulator_Tests.git
Expand Down
3 changes: 0 additions & 3 deletions antares-deps-version.json

This file was deleted.

12 changes: 8 additions & 4 deletions docs/developer-guide/1-Development-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,26 @@ The compilation of *Antares Simulator* requires C++17 support.
=== "Centos"

By default, GCC version on Centos is old.
Some external repositories must be enabled depedning on your version of the OS:
Some external repositories must be enabled depending on your version of the OS:

#### Centos 7
You must enable the EPEL repository:
```
sudo yum install epel-release
sudo yum install centos-release-scl
sudo yum install git redhat-lsb-core make wget centos-release-scl scl-utils rpm-build
sudo yum install devtoolset-10-gcc*

scl enable devtoolset-10 bash
source /opt/rh/rh-git227/enable
```

#### Centos 8
You must enable PowerTools, then install a more recent version of GCC by installing and enabling `devtoolset-9`:
```
sudo yum install dnf-plugins-core
sudo yum config-manager --set-enabled PowerTools
sudo yum install devtoolset-9
scl enable devtoolset-9 bash
sudo yum install devtoolset-10
scl enable devtoolset-10 bash
```

=== "Ubuntu/Debian"
Expand Down
Loading

0 comments on commit 5e6a57f

Please sign in to comment.