Skip to content

Commit

Permalink
Back-port [email protected]
Browse files Browse the repository at this point in the history
8.5.0-beta13 (03/2024)
--------------------
* Use OR-Tools v9.8-rte1.0 (performance improvements with OR-Tools + XPRESS)

**Full Changelog**: v8.6.4...v8.6.5
---------

Co-authored-by: Florian Omnès <[email protected]>
  • Loading branch information
flomnes and flomnes committed Mar 18, 2024
1 parent c692f55 commit de5c225
Show file tree
Hide file tree
Showing 31 changed files with 157 additions and 146 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/centos7-system-deps-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
source /opt/rh/devtoolset-9/enable
#git 2.x must be enabled for Coin compilation with CMake ExternalProject_Add
source /opt/rh/rh-git227/enable
cmake3 -B _build -S src -DCMAKE_BUILD_TYPE=release -DBUILD_TESTING=ON
cmake3 -B _build -S src -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
- name: Build
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Config OR-Tools URL
run: |
echo "URL_ORTOOLS=https://github.com/rte-france/or-tools/releases/download/v9.2-rte2.1/ortools_cxx_centos7_static_sirius.zip" >> $GITHUB_ENV
echo "URL_ORTOOLS=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_centos7_static_sirius.zip" >> $GITHUB_ENV
- name: Download OR-Tools
id: ortools
Expand All @@ -78,7 +78,7 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DDEPS_INSTALL_DIR=/rte-antares-deps-Release \
-DCMAKE_BUILD_TYPE=release \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON \
-DBUILD_not_system=OFF \
-DCMAKE_PREFIX_PATH=${{ env.ORTOOLSDIR }}/install \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ runs:
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
- name: Download & extract OR-Tools
shell: bash
Expand Down
46 changes: 9 additions & 37 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- main
- develop
- release/*
pull_request:

jobs:
sonarcloud:
Expand All @@ -22,51 +21,24 @@ jobs:
# https://sonarcloud.io/documentation/analysis/scan/sonarscanner/
SONAR_SERVER_URL: "https://sonarcloud.io"
ORTOOLS_DIR: ${{ github.workspace }}/or-tools
ORTOOLS_URL: "https://github.com/rte-france/or-tools/releases/download/v9.2-rte1.7/ortools_cxx_ubuntu-20.04_static_sirius.zip"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- 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: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2

- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: sonarcloud-${{ env.SONAR_SCANNER_VERSION }}

- name: Cache SonarCloud packages and analysis
uses: actions/cache@v3
id: sonarcloud-cache
with:
path: ~/.sonar
key: ${{ runner.os }}-sonar-${{ env.SONAR_SCANNER_VERSION }}
restore-keys: ${{ runner.os }}-sonar-${{ env.SONAR_SCANNER_VERSION }}

- name: Download and setup sonar-scanner
shell: bash
env:
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
if: steps.sonarcloud-cache.outputs.cache-hit != 'true'
run: |
mkdir -p $HOME/.sonar
curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
- name: Download and setup build-wrapper
shell: bash
env:
BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip
if: steps.sonarcloud-cache.outputs.cache-hit != 'true'
run: |
curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
- name: Set build-wrapper and sonar-scanner paths
run: |
echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
- name: Install libraries
run: |
sudo apt-get update
Expand Down Expand Up @@ -113,7 +85,7 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DDEPS_INSTALL_DIR=./rte-antares-deps-Debug \
-DCODE_COVERAGE=ON \
-DCMAKE_BUILD_TYPE=debug \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_PREFIX_PATH="../install;${{ env.ORTOOLS_DIR }}/install" \
-DBUILD_TESTING=ON \
-DMZ_CODE_COVERAGE=ON \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-system-deps-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Configure
run: |
cmake -B _build -S src -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=release -DBUILD_TESTING=ON
cmake -B _build -S src -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
- name: Build
run: |
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.2-rte2.1/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
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
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
python-version: 3.12

- name: Install dependencies
run: |
Expand All @@ -96,14 +96,14 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DDEPS_INSTALL_DIR=${{github.workspace}}/rte-antares-deps-Release \
-DCMAKE_BUILD_TYPE=release \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON \
-DBUILD_not_system=OFF \
-DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install \
- name: Build
run: |
cmake --build _build --config release -j2
cmake --build _build -j$(nproc)
- name: Run unfeasibility-related tests
if: ${{ env.IS_PUSH == 'true' }}
Expand All @@ -124,13 +124,6 @@ jobs:
cd _build
ctest -C Release --output-on-failure -R kirchhoff
- name: Upload logs for failed tests
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-log
path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log

# simtest
- name: Read simtest version
id: simtest-version
Expand Down Expand Up @@ -203,6 +196,13 @@ jobs:
batch-name: long-tests-3
os: ${{ matrix.test-platform }}

- name: Upload logs for failed tests
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test-log
path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log

- name: Installer .deb creation
run: |
cd _build
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ jobs:
# Indicates the location of the vcpkg as a Git submodule of the project repository.
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
ORTOOLS_DIR: ${{ github.workspace }}/or-tools
ORTOOLS_URL: "https://github.com/rte-france/or-tools/releases/download/v9.2-rte2.1/ortools_cxx_windows-latest_static_sirius.zip"

steps:
- uses: actions/checkout@v3

- name: Get release
id: get_release
uses: bruceadams/[email protected]

- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_windows-latest_static_sirius.zip" >> $GITHUB_ENV
shell: bash

- name: Pre-requisites
shell: cmd
Expand Down Expand Up @@ -116,7 +115,7 @@ jobs:
-DCMAKE_PREFIX_PATH="${{env.ORTOOLS_DIR}}/install" \
-DVCPKG_ROOT="${{env.VCPKG_ROOT}}" \
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
-DCMAKE_BUILD_TYPE=release \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON \
-DBUILD_not_system=OFF
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/windows-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ jobs:
# Indicates the location of the vcpkg as a Git submodule of the project repository.
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
ORTOOLS_DIR: ${{ github.workspace }}/or-tools
ORTOOLS_URL: "https://github.com/rte-france/or-tools/releases/download/v9.2-rte2.1/ortools_cxx_windows-latest_static_sirius.zip"

steps:
- uses: actions/checkout@v3

- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/$(cat ortools_tag)/ortools_cxx_windows-latest_static_sirius.zip" >> $GITHUB_ENV
shell: bash

- name: Pre-requisites
shell: cmd
run: |
Expand Down Expand Up @@ -94,11 +98,11 @@ jobs:
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

- name: Setup Python 3.11
- name: Setup Python 3.12
uses: actions/setup-python@v4
with:
architecture: 'x64'
python-version: '3.11'
python-version: '3.12'

- name: Install pip dependencies if necessary
run: pip install -r src/tests/examples/requirements.txt
Expand All @@ -118,14 +122,14 @@ jobs:
-DCMAKE_PREFIX_PATH="${{ env.ORTOOLS_DIR }}/install" \
-DVCPKG_ROOT="${{env.VCPKG_ROOT}}" \
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
-DCMAKE_BUILD_TYPE=release \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON \
-DBUILD_not_system=OFF
- name: Build
shell: bash
run: |
cmake --build _build --config release -j2
cmake --build _build --config Release -j2
- name: Run unfeasibility-related tests
run: |
Expand All @@ -137,13 +141,6 @@ jobs:
cd _build
ctest -C ${{ matrix.buildtype }} --output-on-failure -L "unit|end-to-end" -LE ortools
- name: Run kirchhoff-constraint-tests
shell: bash
run: |
tar xvf src/tests/kirchhoff-cbuilder/reference.tar.gz -C src/tests/kirchhoff-cbuilder/
cd _build
ctest -C Release --output-on-failure -R kirchhoff
- name: Upload build on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion docs/build/3-Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Here is a list of available CMake configure option :

|Option | Description |
|:-------|-------|
|`CMAKE_BUILD_TYPE` | Define build type. Available values are `release` and `debug` (case insensitive) |
|`CMAKE_BUILD_TYPE` | Define build type. Available values are `Release` and `Debug` |
|`BUILD_UI`|Enable or disable Antares Simulator UI compilation (default `ON`)|
|`BUILD_ALL`|Enable build of ALL external libraries (default `OFF`)|
|`DEPS_INSTALL_DIR`|Define dependencies libraries install directory|
Expand Down
2 changes: 1 addition & 1 deletion ortools_tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v9.2-rte2.1
v9.8-rte1.0
19 changes: 9 additions & 10 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(ANTARES_WEBSITE "https://antares-simulator.org/")
set(ANTARES_ONLINE_DOC "https://antares-simulator.readthedocs.io/")

# Beta release
set(ANTARES_BETA 12) # adq-patch-beta-12 for Elia
set(ANTARES_BETA 13) # adq-patch-beta-12 for Elia
set(ANTARES_RC 0)

# OR-Tools tag
Expand Down Expand Up @@ -64,8 +64,6 @@ execute_process(COMMAND
OUTPUT_VARIABLE GIT_SHA1_SHORT
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)

string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)

# Build Configuration
set(ANTARES_TARGET "${CMAKE_BUILD_TYPE}")

Expand Down Expand Up @@ -141,7 +139,7 @@ OMESSAGE("")
OMESSAGE("")

#Display Build Configuration (debug or release)
if("${CMAKE_BUILD_TYPE}" STREQUAL "release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "tuning")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
OMESSAGE("{antares} Build Configuration: RELEASE")
else()
OMESSAGE("{antares} Build Configuration: DEBUG")
Expand All @@ -150,7 +148,7 @@ endif()
#
# Yuni Framework
#
if("${CMAKE_BUILD_TYPE}" STREQUAL "release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "tuning")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
set(YUNI_TARGET_MODE "release")
set(ANTARES_VERSION_TARGET "release")
else()
Expand Down Expand Up @@ -194,7 +192,7 @@ endif()


# Add DEPS_INSTALL_DIR with antares-xpansion CMAKE_BUILD_TYPE
if ("${CMAKE_BUILD_TYPE}" STREQUAL "release")
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")

string(REPLACE ${CMAKE_BUILD_TYPE} Release
DEPS_INSTALL_DIR_XPANSION
Expand Down Expand Up @@ -261,7 +259,8 @@ message(STATUS "OR-Tools tag ${ORTOOLS_TAG}")
set(BUILD_SAMPLES "OFF" CACHE INTERNAL "")
set(BUILD_FLATZINC "OFF" CACHE INTERNAL "")
set(BUILD_EXAMPLES "OFF" CACHE INTERNAL "")
set(USE_SCIP "OFF" CACHE INTERNAL "")
set(USE_SCIP "ON" CACHE INTERNAL "")
set(USE_GLPK "ON" CACHE INTERNAL "")
# We build OR-Tools as a static lib. Cyclic dependencies are detected
# without this flag.
set(BUILD_SHARED_LIBS "OFF" CACHE INTERNAL "")
Expand Down Expand Up @@ -345,11 +344,11 @@ OMESSAGE("")
# Informations for NSIS
if(WIN32 OR WIN64)
if(MSVC)
if("${CMAKE_BUILD_TYPE}" STREQUAL "release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "tuning")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
set(NSIS_TARGET "Release")
else("${CMAKE_BUILD_TYPE}" STREQUAL "release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "tuning")
else()
set(NSIS_TARGET "Debug")
endif("${CMAKE_BUILD_TYPE}" STREQUAL "release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "tuning")
endif()
set(COMPILER_MARK "v")
#set(COMPILER_INCLUDE "vs9")
else(MSVC)
Expand Down
Loading

0 comments on commit de5c225

Please sign in to comment.