Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/expose-api
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/ubuntu.yml
#	src/CMakeLists.txt
#	src/solver/simulation/include/antares/solver/simulation/solver.hxx
  • Loading branch information
JasonMarechal25 committed Jun 17, 2024
2 parents 3cf7aee + 08003e3 commit a37a33c
Show file tree
Hide file tree
Showing 58 changed files with 807 additions and 1,557 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
48 changes: 3 additions & 45 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,55 +67,19 @@ jobs:
with:
key: ${{ env.os }}


- name: Init VCPKG submodule
run: |
git submodule update --init vcpkg
# Restore both vcpkg and its artifacts from the GitHub cache service.
- name: Restore vcpkg and its artifacts.
uses: actions/cache@v4
with:
# The first path is the location of vcpkg (it contains the vcpkg executable and data files).
# The other paths starting with '!' are exclusions: they contain termporary files generated during the build of the installed packages.
path: |
${{ env.VCPKG_ROOT }}
!${{ env.VCPKG_ROOT }}/buildtrees
!${{ env.VCPKG_ROOT }}/packages
!${{ env.VCPKG_ROOT }}/downloads
# The key is composed in a way that it gets properly invalidated: this must happen whenever vcpkg's Git commit id changes, or the list of packages changes. In this case a cache miss must happen and a new entry with a new key with be pushed to GitHub the cache service.
# The key includes: hash of the vcpkg.json file, the hash of the vcpkg Git commit id, and the used vcpkg's triplet. The vcpkg's commit id would suffice, but computing an hash out it does not harm.
# Note: given a key, the cache content is immutable. If a cache entry has been created improperly, in order the recreate the right content the key must be changed as well, and it must be brand new (i.e. not existing already).
key: |
${{ hashFiles( 'vcpkg_manifest/vcpkg.json' ) }}-${{ hashFiles( '.git/modules/vcpkg/HEAD' )}}-${{ env.triplet }}
- name: Install libraries
run: |
sudo apt-get update
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 @@ -131,13 +95,6 @@ jobs:
python -m pip install --upgrade pip
pip3 install -r src/tests/examples/requirements.txt
- 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 @@ -147,10 +104,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 Expand Up @@ -185,6 +140,9 @@ jobs:
path: 'simtest.json'
prop_path: 'version'

- name: Init submodule
run: |
git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests
- name: Run named mps tests
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
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 a37a33c

Please sign in to comment.