From 16bbe71c526b480a9b2f5d37711397eeab11bc48 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Thu, 26 Dec 2024 11:41:48 +0100 Subject: [PATCH 01/51] add vcpkg json and triplet --- src/triplets/x64-linux-antares.cmake | 5 +++ src/triplets/x64-linux-release.cmake | 7 ++++ src/triplets/x64-windows-antares.cmake | 11 ++++++ src/triplets/x64-windows-release.cmake | 15 +++++++++ src/vcpkg.json | 46 ++++++++++++++++++++++++++ 5 files changed, 84 insertions(+) create mode 100644 src/triplets/x64-linux-antares.cmake create mode 100644 src/triplets/x64-linux-release.cmake create mode 100644 src/triplets/x64-windows-antares.cmake create mode 100644 src/triplets/x64-windows-release.cmake create mode 100644 src/vcpkg.json diff --git a/src/triplets/x64-linux-antares.cmake b/src/triplets/x64-linux-antares.cmake new file mode 100644 index 0000000000..63954c80c5 --- /dev/null +++ b/src/triplets/x64-linux-antares.cmake @@ -0,0 +1,5 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + diff --git a/src/triplets/x64-linux-release.cmake b/src/triplets/x64-linux-release.cmake new file mode 100644 index 0000000000..d9eb98ddae --- /dev/null +++ b/src/triplets/x64-linux-release.cmake @@ -0,0 +1,7 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CMAKE_SYSTEM_NAME Linux) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +# Avoid building debug artifacts +set(VCPKG_BUILD_TYPE release) diff --git a/src/triplets/x64-windows-antares.cmake b/src/triplets/x64-windows-antares.cmake new file mode 100644 index 0000000000..f2480f7012 --- /dev/null +++ b/src/triplets/x64-windows-antares.cmake @@ -0,0 +1,11 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +# Link zlib and minizip statically +list(APPEND STATIC_PORTS "zlib.*" "minizip.*") +foreach (STATIC_PORT IN LISTS STATIC_PORTS) + if(PORT MATCHES ${STATIC_PORT}) + set(VCPKG_LIBRARY_LINKAGE static) + endif() +endforeach () diff --git a/src/triplets/x64-windows-release.cmake b/src/triplets/x64-windows-release.cmake new file mode 100644 index 0000000000..7e4eb27f4d --- /dev/null +++ b/src/triplets/x64-windows-release.cmake @@ -0,0 +1,15 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) + +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +# Avoid building debug artifacts +set(VCPKG_BUILD_TYPE release) + +# Link zlib and minizip statically +list(APPEND STATIC_PORTS "zlib.*" "minizip.*") +foreach (STATIC_PORT IN LISTS STATIC_PORTS) + if(PORT MATCHES ${STATIC_PORT}) + set(VCPKG_LIBRARY_LINKAGE static) + endif() +endforeach () diff --git a/src/vcpkg.json b/src/vcpkg.json new file mode 100644 index 0000000000..04a13c7bf7 --- /dev/null +++ b/src/vcpkg.json @@ -0,0 +1,46 @@ +{ + "name": "antares-simulator", + "version-string": "8.8.11", + "builtin-baseline": "9484a57dd560b89f0a583be08af6753611c57fd5", + "vcpkg-configuration": { + "overlay-ports": [ + "./ports" + ], + "overlay-triplets": [ + "./triplets" + ] + }, + "dependencies": [ + { + "name": "sirius-solver", + "version>=": "1.5" + }, + { + "name": "wxwidgets", + "platform": "windows" + }, + { + "name": "boost-test", + "version>=": "1.81.0" + }, + { + "name": "boost-core", + "version>=": "1.81.0" + }, + { + "name": "minizip-ng", + "default-features": false, + "version>=": "4.0.0", + "features": [ + "zlib" + ] + }, + { + "name": "yaml-cpp" + }, + { + "name": "antlr4" + } + ] +} + From 943422e4ffe98300b8160f59cdae142b1e33a9bb Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Thu, 26 Dec 2024 12:14:45 +0100 Subject: [PATCH 02/51] ubuntu job --- .github/workflows/ubuntu.yml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index ee335104af..2d5c4910f5 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -88,13 +88,17 @@ jobs: run: | export WX_CONFIG=${{env.WX_CONFIG}} - - name : Install deps with VCPKG - run: | - cd vcpkg - ./bootstrap-vcpkg.sh - vcpkg install ${{env.vcpkgPackages}} --triplet ${{env.triplet}} - rm -rf buildtrees packages downloads - shell: bash + - name: Install VCPKG + run: git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-ubuntu- - name: Read antares-deps version id: antares-deps-version @@ -103,7 +107,6 @@ jobs: 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-rte/releases/download/$(cat ortools_tag)/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV @@ -131,14 +134,12 @@ jobs: 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 \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DVCPKG_ROOT="${{env.VCPKG_ROOT}}" \ + -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ -DVCPKG_TARGET_TRIPLET=${{ env.triplet }} \ -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ @@ -331,3 +332,11 @@ jobs: tag: ${{ github.event.inputs.release_tag }} run: | gh release upload "$tag" _build/*.tar.gz _build/*.deb + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} From 6a39a74eb0f8e4463fefd5a7c6a9266fbb3f5510 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Thu, 26 Dec 2024 14:57:51 +0100 Subject: [PATCH 03/51] add ports, fix cmake error --- src/ports/sirius-solver/portfile.cmake | 21 +++++++++++++++++++++ src/ports/sirius-solver/vcpkg.json | 16 ++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/ports/sirius-solver/portfile.cmake create mode 100644 src/ports/sirius-solver/vcpkg.json diff --git a/src/ports/sirius-solver/portfile.cmake b/src/ports/sirius-solver/portfile.cmake new file mode 100644 index 0000000000..bf6ac68a36 --- /dev/null +++ b/src/ports/sirius-solver/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "rte-france/sirius-solver" + REF "antares-integration-v1.6" + SHA512 8d5992f036f35b73c11261e68e030c58c3ffe22b411921c7e08e62274feeed41227b59365a00a4e32e49f35cdaa733b079cfc0a7d98347825253ae67d9c69e4a + HEAD_REF main +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}/src" +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(PACKAGE_NAME sirius_solver CONFIG_PATH cmake) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/src/ports/sirius-solver/vcpkg.json b/src/ports/sirius-solver/vcpkg.json new file mode 100644 index 0000000000..ded804499d --- /dev/null +++ b/src/ports/sirius-solver/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "sirius-solver", + "version": "1.5", + "port-version": 0, + "description": "Sirius solver", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} From bee276ab94bbae6bba2593f4ebcded3f70307f58 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Thu, 26 Dec 2024 15:11:26 +0100 Subject: [PATCH 04/51] remove antares deps in main cmakelists, try fix wxwidgets --- src/CMakeLists.txt | 40 +------------------------ src/cmake/wxWidgets/FindwxWidgets.cmake | 5 ++-- 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fb93c068fb..377559b427 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -185,45 +185,8 @@ message(STATUS "Build OR-Tools: ${BUILD_ORTOOLS}") option(BUILD_MINIZIP "Build minizip" OFF) message(STATUS "Build minizip: ${BUILD_MINIZIP}") -#Define install directory -if (NOT DEPS_INSTALL_DIR) - SET(DEPS_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../rte-antares-deps-${CMAKE_BUILD_TYPE}) - -else() - if(NOT IS_ABSOLUTE ${DEPS_INSTALL_DIR}) - SET(DEPS_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../${DEPS_INSTALL_DIR}) - endif() -endif() - - -# Add DEPS_INSTALL_DIR with antares-xpansion CMAKE_BUILD_TYPE -if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release") - - string(REPLACE ${CMAKE_BUILD_TYPE} Release - DEPS_INSTALL_DIR_XPANSION - ${DEPS_INSTALL_DIR}) - - list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR_XPANSION}) - -elseif("${CMAKE_BUILD_TYPE}" STREQUAL "debug") - - string(REPLACE ${CMAKE_BUILD_TYPE} Debug - DEPS_INSTALL_DIR_XPANSION - ${DEPS_INSTALL_DIR}) - - list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR_XPANSION}) - -endif() - -list(APPEND CMAKE_PREFIX_PATH ${DEPS_INSTALL_DIR}) message(STATUS "CMAKE_PREFIX_PATH : ${CMAKE_PREFIX_PATH}") -# Build Needed dependencies -add_subdirectory(antares-deps) - -#Add needed definition in case of external dependencies compilation -include (antares-deps/cmake/additionnal-definitions.cmake) - #Boost header libraries find_package(Boost REQUIRED) @@ -246,7 +209,7 @@ endif() find_package(sirius_solver) if (NOT sirius_solver_FOUND) - message (FATAL_ERROR "Sirius solver not found. Sirius solver can be compiled with -DBUILD_sirius=ON or you can specify previous dependency install directory with -DCMAKE_PREFIX_PATH or -DDEPS_INSTALL_DIR") + message (FATAL_ERROR "Sirius solver not found. Sirius solver can be compiled with -DBUILD_sirius=ON or you can specify previous dependency install directory with -DCMAKE_PREFIX_PAT ") endif() #gflags needed for ortools @@ -263,7 +226,6 @@ message(STATUS "OR-Tools tag ${ORTOOLS_TAG}") ) # Pass options to OR-Tools's CMake - set(BUILD_DEPS "ON" CACHE INTERNAL "") set(BUILD_SAMPLES "OFF" CACHE INTERNAL "") set(BUILD_FLATZINC "OFF" CACHE INTERNAL "") set(BUILD_EXAMPLES "OFF" CACHE INTERNAL "") diff --git a/src/cmake/wxWidgets/FindwxWidgets.cmake b/src/cmake/wxWidgets/FindwxWidgets.cmake index dea003dce6..f64da3e6d7 100644 --- a/src/cmake/wxWidgets/FindwxWidgets.cmake +++ b/src/cmake/wxWidgets/FindwxWidgets.cmake @@ -820,8 +820,7 @@ else() find_program(wxWidgets_CONFIG_EXECUTABLE NAMES $ENV{WX_CONFIG} wx-config wx-config-3.1 wx-config-3.0 wx-config-2.9 wx-config-2.8 DOC "Location of wxWidgets library configuration provider binary (wx-config)." - ONLY_CMAKE_FIND_ROOT_PATH - ) + if(wxWidgets_CONFIG_EXECUTABLE) set(wxWidgets_FOUND TRUE) @@ -1276,4 +1275,4 @@ function(WXWIDGETS_ADD_RESOURCES _outfiles) list(APPEND ${_outfiles} "${outfile}") set(${_outfiles} ${${_outfiles}} PARENT_SCOPE) -endfunction() \ No newline at end of file +endfunction() From eef644492c3c7479964fc031049ad0c65a15de97 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Thu, 26 Dec 2024 15:14:03 +0100 Subject: [PATCH 05/51] fix parenthesis --- src/cmake/wxWidgets/FindwxWidgets.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmake/wxWidgets/FindwxWidgets.cmake b/src/cmake/wxWidgets/FindwxWidgets.cmake index f64da3e6d7..bd1b9cdb39 100644 --- a/src/cmake/wxWidgets/FindwxWidgets.cmake +++ b/src/cmake/wxWidgets/FindwxWidgets.cmake @@ -820,7 +820,7 @@ else() find_program(wxWidgets_CONFIG_EXECUTABLE NAMES $ENV{WX_CONFIG} wx-config wx-config-3.1 wx-config-3.0 wx-config-2.9 wx-config-2.8 DOC "Location of wxWidgets library configuration provider binary (wx-config)." - + ) if(wxWidgets_CONFIG_EXECUTABLE) set(wxWidgets_FOUND TRUE) From 0e11e62d080ceb7ca811a9fd36ff59db31ec810f Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Thu, 26 Dec 2024 15:36:50 +0100 Subject: [PATCH 06/51] remove old vcpkg cache ubuntu --- .github/workflows/ubuntu.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 3127637388..26404cb78d 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -58,23 +58,6 @@ jobs: 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 From 3ad2886c90539da6a49589a0224db95a75ede060 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Thu, 26 Dec 2024 17:17:35 +0100 Subject: [PATCH 07/51] sonarcloud jojb --- .github/workflows/sonarcloud.yml | 39 ++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 589a64cda9..a7d140cf7c 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -20,12 +20,27 @@ jobs: env: SONAR_SERVER_URL: "https://sonarcloud.io" ORTOOLS_DIR: ${{ github.workspace }}/or-tools + # Caching strategy of VCPKG dependencies + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" + BUILD_WRAPPER_OUT_DIR: ${{ github.workspace }}/_build/output # Directory where build-wrapper output will be placed steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Install VCPKG + run: git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-ubuntu- + - name: Config OR-Tools URL run: | echo "ORTOOLS_URL=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV @@ -45,17 +60,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}} @@ -76,7 +83,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 @@ -86,7 +92,8 @@ jobs: -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ - -DDEPS_INSTALL_DIR=./rte-antares-deps-Debug \ + -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ -DCODE_COVERAGE=ON \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_PREFIX_PATH="../install;${{ env.ORTOOLS_DIR }}/install" \ @@ -97,7 +104,7 @@ jobs: - name: Build run: | - build-wrapper-linux-x86-64 --out-dir $GITHUB_WORKSPACE/_build/output cmake --build _build --config release -j2 + build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build _build --config Release -j$(nproc) - name: Test and generate coverage continue-on-error: true @@ -114,3 +121,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} From 28ef39cb7bbefe8d3dab39d621b9ec8181164f80 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 08:37:39 +0100 Subject: [PATCH 08/51] remove antares deps from download precompiled job --- .../action.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml b/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml index 723a604115..013e0e0cd9 100644 --- a/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml +++ b/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml @@ -20,14 +20,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}}.tar.gz - tar -xvf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz - rm -rf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz - + steps: - name: Download & extract OR-Tools shell: bash run: | From 60ee0ef104b9343593a76745815a1b540a037561 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 08:48:24 +0100 Subject: [PATCH 09/51] windows job --- .github/workflows/windows-vcpkg.yml | 56 ++++++++++------------------- 1 file changed, 18 insertions(+), 38 deletions(-) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 5f5cfa53c4..aa9615084e 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -78,45 +78,22 @@ jobs: key: windows - 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 temporary 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 deps with VCPKG - run: | - cd vcpkg - ./bootstrap-vcpkg.sh - vcpkg install ${{env.vcpkgPackages}} --triplet ${{env.triplet}} - rm -rf buildtrees packages downloads shell: bash + run: | + git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.bat -disableMetrics - - name: Read antares-deps version - id: antares-deps-version - uses: notiz-dev/github-action-json-property@release + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 with: - path: 'antares-deps-version.json' - prop_path: 'antares_deps_version' + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-windows-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-windows- - 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}} @@ -131,11 +108,6 @@ jobs: - name: Install pip dependencies if necessary run: pip install -r src/tests/examples/requirements.txt - - 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 run: git config --system core.longpaths true @@ -143,10 +115,10 @@ 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 \ @@ -324,3 +296,11 @@ jobs: run: | gh release upload "$tag" _build/*.zip _build/*.exe shell: bash + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-windows-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} From cf69f63ea080ed55beead771daebdbb0ee705543 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 08:51:39 +0100 Subject: [PATCH 10/51] dowload zip action --- .../action.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/download-extract-precompiled-libraries-zip/action.yml b/.github/workflows/download-extract-precompiled-libraries-zip/action.yml index 745b76236c..9f1d28997f 100644 --- a/.github/workflows/download-extract-precompiled-libraries-zip/action.yml +++ b/.github/workflows/download-extract-precompiled-libraries-zip/action.yml @@ -20,15 +20,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: | From 9e86f8776aada604c522a68c5c4dbad40d174d35 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 09:28:50 +0100 Subject: [PATCH 11/51] indent windows vcpkg --- .github/workflows/windows-vcpkg.yml | 520 ++++++++++++++-------------- 1 file changed, 261 insertions(+), 259 deletions(-) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index aa9615084e..38d9ecfd23 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -40,267 +40,269 @@ jobs: test-platform: windows-2022 vcpkgPackages: wxwidgets boost-test yaml-cpp antlr4 triplet: x64-windows + # Caching strategy of VCPKG dependencies + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" runs-on: windows-latest steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.REF }} - - - name: Config OR-Tools URL - run: | - echo "ORTOOLS_URL=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_windows-latest_static_sirius.zip" >> $GITHUB_ENV - shell: bash - - - name: Pre-requisites - shell: cmd - run: | - choco install wget unzip zip --no-progress - - # Downloads ccache, and copies it to "cl.exe" in order to trick cmake into using it, - # see ccache wiki for background on using it with MSVC: - # https://github.com/ccache/ccache/wiki/MS-Visual-Studio - - name: Install ccache - shell: bash - run: | - wget https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-windows-x86_64.zip -O ccache.zip - unzip ccache.zip - rm ccache.zip - mv ccache-4.8.3-windows-x86_64 ccache - cp ccache/ccache.exe ccache/cl.exe - echo "${GITHUB_WORKSPACE}/ccache" >> $GITHUB_PATH - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: windows - - - name : Init VCPKG submodule - shell: bash - run: | - git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.bat -disableMetrics - - - name: Restore vcpkg binary dir from cache - id: cache-vcpkg-binary - uses: actions/cache/restore@v4 - with: - path: ${{ github.workspace }}/vcpkg_cache - key: vcpkg-cache-windows-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} - # Allows to restore a cache when deps have only partially changed (like adding a dependency) - restore-keys: vcpkg-cache-windows- - - - name: Download pre-compiled librairies - uses: ./.github/workflows/download-extract-precompiled-libraries-zip - with: - os: ${{env.os}} - ortools-url: ${{env.ORTOOLS_URL}} - ortools-dir: ${{env.ORTOOLS_DIR}} - - - name: Setup Python 3.12 - uses: actions/setup-python@v5 - id: setup-python - with: - architecture: 'x64' - python-version: '3.12' - - - name: Install pip dependencies if necessary - run: pip install -r src/tests/examples/requirements.txt - - - name: Enable git longpaths - run: git config --system core.longpaths true - - - name: Configure - shell: bash - run: | - cmake -B _build -S src \ - -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" - - - name: Build - shell: bash - run: | - cmake --build _build --config Release -j$(nproc) - # simtest - - name: Read simtest version - id: simtest-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'simtest.json' - prop_path: 'version' - - - name: Run named mps tests - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-named-mps - os: ${{ env.test-platform }} - variant: "named-mps" - - - name: Run unfeasibility-related tests - run: | - cd _build - ctest -C Release --output-on-failure -R "^unfeasible$" - - - name: Run unit and end-to-end tests - run: | - cd _build - ctest -C Release --output-on-failure -L "unit|end-to-end" -LE ortools - - - name: Upload build on failure - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: MPS-diff - path: ${{ github.workspace }}/src/tests/mps - - - name: Run tests about infinity on BCs RHS - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v830 - os: ${{ env.test-platform }} - - - name: Run MILP with CBC - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-milp - variant: "milp-cbc" - os: ${{ env.test-platform }} - - - name: Run tests introduced in v860 - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v860 - os: ${{ env.test-platform }} - - - name: Run tests introduced in v870 - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v870 - os: ${{ env.test-platform }} - - - name: Run short-tests - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: short-tests - os: ${{ env.test-platform }} - - - name: Run mps tests - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-mps - os: ${{ env.test-platform }} - - - name: Run tests on adequacy patch - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: adequacy-patch-CSR - os: ${{ env.test-platform }} - - - - name: Run parallel tests - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-parallel - os: ${{ env.test-platform }} - variant: "parallel" - - - name: Run medium-tests - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: medium-tests - os: ${{ env.test-platform }} - - - name: Run long-tests-1 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-1 - os: ${{ env.test-platform }} - - - name: Run long-tests-2 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-2 - os: ${{ env.test-platform }} - - - name: Run long-tests-3 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-3 - os: ${{ env.test-platform }} - - - name: Solver archive creation - shell: bash - run: | - cd _build - zip -r antares-solver_windows.zip solver/Release/antares-*-solver.exe solver/Release/*.dll - - - name: NSIS Installer creation - shell: bash - run: | - rm -rf src/tests/resources/Antares_Simulator_Tests - cd _build - cpack -GNSIS - export NSIS_NAME=$(ls *.exe) - echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV - - - name: Upload NSIS log on failure - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: NSISError.log - path: _build/_CPack_Packages/win64/NSIS/NSISOutput.log - - - name: .zip creation - run: | - cd _build - cpack -G ZIP - - - name: Installer upload - uses: actions/upload-artifact@v4 - with: - name: installer - path: _build/${{env.NSIS_NAME}} - - - name: Publish assets - if: ${{ env.IS_RELEASE == 'true' }} - env: - GITHUB_TOKEN: ${{ github.token }} - tag: ${{ github.event.inputs.release_tag }} - run: | - gh release upload "$tag" _build/*.zip _build/*.exe - shell: bash - - - name: Cache vcpkg binary dir - if: always() - id: save-cache-vcpkg-binary - uses: actions/cache/save@v4 - with: - path: ${{ github.workspace }}/vcpkg_cache - key: vcpkg-cache-windows-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + - uses: actions/checkout@v4 + with: + ref: ${{ env.REF }} + + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_windows-latest_static_sirius.zip" >> $GITHUB_ENV + shell: bash + + - name: Pre-requisites + shell: cmd + run: | + choco install wget unzip zip --no-progress + + # Downloads ccache, and copies it to "cl.exe" in order to trick cmake into using it, + # see ccache wiki for background on using it with MSVC: + # https://github.com/ccache/ccache/wiki/MS-Visual-Studio + - name: Install ccache + shell: bash + run: | + wget https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-windows-x86_64.zip -O ccache.zip + unzip ccache.zip + rm ccache.zip + mv ccache-4.8.3-windows-x86_64 ccache + cp ccache/ccache.exe ccache/cl.exe + echo "${GITHUB_WORKSPACE}/ccache" >> $GITHUB_PATH + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: windows + + - name : Init VCPKG submodule + shell: bash + run: | + git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.bat -disableMetrics + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-windows-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-windows- + + - name: Download pre-compiled librairies + uses: ./.github/workflows/download-extract-precompiled-libraries-zip + with: + os: ${{env.os}} + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} + + - name: Setup Python 3.12 + uses: actions/setup-python@v5 + id: setup-python + with: + architecture: 'x64' + python-version: '3.12' + + - name: Install pip dependencies if necessary + run: pip install -r src/tests/examples/requirements.txt + + - name: Enable git longpaths + run: git config --system core.longpaths true + + - name: Configure + shell: bash + run: | + cmake -B _build -S src \ + -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" + + - name: Build + shell: bash + run: | + cmake --build _build --config Release -j$(nproc) + # simtest + - name: Read simtest version + id: simtest-version + uses: notiz-dev/github-action-json-property@release + with: + path: 'simtest.json' + prop_path: 'version' + + - name: Run named mps tests + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-named-mps + os: ${{ env.test-platform }} + variant: "named-mps" + + - name: Run unfeasibility-related tests + run: | + cd _build + ctest -C Release --output-on-failure -R "^unfeasible$" + + - name: Run unit and end-to-end tests + run: | + cd _build + ctest -C Release --output-on-failure -L "unit|end-to-end" -LE ortools + + - name: Upload build on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: MPS-diff + path: ${{ github.workspace }}/src/tests/mps + + - name: Run tests about infinity on BCs RHS + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v830 + os: ${{ env.test-platform }} + + - name: Run MILP with CBC + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-milp + variant: "milp-cbc" + os: ${{ env.test-platform }} + + - name: Run tests introduced in v860 + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v860 + os: ${{ env.test-platform }} + + - name: Run tests introduced in v870 + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-v870 + os: ${{ env.test-platform }} + + - name: Run short-tests + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: short-tests + os: ${{ env.test-platform }} + + - name: Run mps tests + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-mps + os: ${{ env.test-platform }} + + - name: Run tests on adequacy patch + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: adequacy-patch-CSR + os: ${{ env.test-platform }} + + + - name: Run parallel tests + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: valid-parallel + os: ${{ env.test-platform }} + variant: "parallel" + + - name: Run medium-tests + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: medium-tests + os: ${{ env.test-platform }} + + - name: Run long-tests-1 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-1 + os: ${{ env.test-platform }} + + - name: Run long-tests-2 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-2 + os: ${{ env.test-platform }} + + - name: Run long-tests-3 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{steps.simtest-version.outputs.prop}} + batch-name: long-tests-3 + os: ${{ env.test-platform }} + + - name: Solver archive creation + shell: bash + run: | + cd _build + zip -r antares-solver_windows.zip solver/Release/antares-*-solver.exe solver/Release/*.dll + + - name: NSIS Installer creation + shell: bash + run: | + rm -rf src/tests/resources/Antares_Simulator_Tests + cd _build + cpack -GNSIS + export NSIS_NAME=$(ls *.exe) + echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV + + - name: Upload NSIS log on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: NSISError.log + path: _build/_CPack_Packages/win64/NSIS/NSISOutput.log + + - name: .zip creation + run: | + cd _build + cpack -G ZIP + + - name: Installer upload + uses: actions/upload-artifact@v4 + with: + name: installer + path: _build/${{env.NSIS_NAME}} + + - name: Publish assets + if: ${{ env.IS_RELEASE == 'true' }} + env: + GITHUB_TOKEN: ${{ github.token }} + tag: ${{ github.event.inputs.release_tag }} + run: | + gh release upload "$tag" _build/*.zip _build/*.exe + shell: bash + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-windows-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} From caff47fc2027512ca2e257cd44eb13ea3b745319 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 09:30:42 +0100 Subject: [PATCH 12/51] windows --- .github/workflows/windows-vcpkg.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 38d9ecfd23..e6bfa8cbca 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -36,10 +36,9 @@ 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 - os: windows-latest - test-platform: windows-2022 - vcpkgPackages: wxwidgets boost-test yaml-cpp antlr4 - triplet: x64-windows + os: windows-2022 + vcpkgPackages: wxwidgets boost-test + triplet: x64-windows-release # Caching strategy of VCPKG dependencies VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" @@ -79,7 +78,7 @@ jobs: with: key: windows - - name : Init VCPKG submodule + - name: Install VCPKG shell: bash run: | git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.bat -disableMetrics @@ -124,7 +123,6 @@ jobs: -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" From 65248920634a10e1d62a467239a7f40f8cc554fa Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 10:04:50 +0100 Subject: [PATCH 13/51] use windows-vcpkg from develop --- .github/workflows/windows-release.yml | 203 ------------------------ .github/workflows/windows-vcpkg.yml | 212 +++++++++++++++++--------- 2 files changed, 137 insertions(+), 278 deletions(-) delete mode 100644 .github/workflows/windows-release.yml diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml deleted file mode 100644 index 610337d7bc..0000000000 --- a/.github/workflows/windows-release.yml +++ /dev/null @@ -1,203 +0,0 @@ -name: Windows CI (Release) - -on: - release: - types: [created] - -jobs: - windows: - - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [windows-latest] - include: - - os: windows-latest - triplet: x64-windows - vcpkgPackages: wxwidgets boost-test - test-platform: windows-2022 - env: - # 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 - - steps: - - uses: actions/checkout@v3 - - - name: Config OR-Tools URL - run: | - echo "ORTOOLS_URL=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_windows-latest_static_sirius.zip" >> $GITHUB_ENV - shell: bash - - - name: Pre-requisites - shell: cmd - run: | - choco install wget unzip zip --no-progress - - # Restore both vcpkg and its artifacts from the GitHub cache service. - - name: Restore vcpkg and its artifacts. - uses: actions/cache@v3 - 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' )}}-${{ matrix.triplet }} - - - name: Setup Python 3.11 - uses: actions/setup-python@v4 - with: - architecture: 'x64' - python-version: '3.12' - - - name : Install deps with VCPKG - run: | - git submodule update --init vcpkg - cd vcpkg - ./bootstrap-vcpkg.sh - vcpkg install ${{matrix.vcpkgPackages}} --triplet ${{matrix.triplet}} - rm -rf buildtrees packages downloads - shell: bash - - - 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: ${{matrix.os}} - ortools-url: ${{env.ORTOOLS_URL}} - ortools-dir: ${{env.ORTOOLS_DIR}} - - - name: Install pip dependencies if necessary - run: pip install -r src/tests/examples/requirements.txt - - # TODO : don't download submodule Antares_Simulator_Tests - - name: Init submodule - run: | - git submodule update --init --recursive src - - - name: Enable git longpaths - run: git config --system core.longpaths true - - - name: Configure with VCPKG - 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=${{ matrix.triplet }} \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=ON \ - -DBUILD_TOOLS=ON \ - -DBUILD_not_system=OFF \ - -DPython3_EXECUTABLE='${{ steps.setup-python.outputs.python-path }}' - - - name: Build - run: | - cmake --build _build --config release -j2 - - - name: Remove OR-Tools install directory to free some disk space - shell: bash - run: rm -rf ${{env.ORTOOLS_DIR}} - - - name: Remove antares-deps to free some disk space - shell: bash - run: rm -rf ${{ github.workspace }}/src/antares-deps - - # TODO : don't download submodule Antares_Simulator_Tests - - name: Remove Antares_Simulator_Tests to free some disk space - shell: bash - run: rm -rf ${{ github.workspace }}/src/tests/resources/Antares_Simulator_Tests - - - name: Remove _deps to free some disk space - shell: bash - run: rm -rf ${{ github.workspace }}/src/_build/_deps - - # simtest - - name: Read simtest version - id: simtest-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'simtest.json' - prop_path: 'version' - - - name: Run medium-tests - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: medium-tests - os: ${{ matrix.test-platform }} - - - name: Run long-tests-1 - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-1 - os: ${{ matrix.test-platform }} - - - name: Run long-tests-2 - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-2 - os: ${{ matrix.test-platform }} - - - name: Run long-tests-3 - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-3 - os: ${{ matrix.test-platform }} - - - name: .zip creation - shell: bash - run: | - cd _build - cpack -G ZIP - export ZIP_NAME=$(ls *.zip) - echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV - - - name: Solver archive creation - shell: bash - run: | - cd _build - zip -r antares-solver_windows.zip solver/Release/antares-*-solver.exe solver/Release/*.dll - - - name: NSIS Installer creation - shell: bash - run: | - rm -rf src/tests/resources/Antares_Simulator_Tests - cd _build - cpack -GNSIS - export NSIS_NAME=$(ls *.exe) - echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV - - - name: Upload NSIS logs - if: ${{ failure() }} - uses: actions/upload-artifact@v3 - with: - name: NSISOutput.log - path: _build/_CPack_Packages/win64/NSIS/NSISOutput.log - - - name: Upload release assets - uses: softprops/action-gh-release@v0.1.15 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - _build/${{env.NSIS_NAME}} - _build/${{env.ZIP_NAME}} - _build/solver.zip diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index e6bfa8cbca..5fb4b19603 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -25,7 +25,8 @@ on: env: GITHUB_TOKEN: ${{ github.token }} IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }} - RUN_EXTENDED_TESTS: ${{ inputs.target_branch == 'release/8.8.x' }} + RUN_SIMPLE_TESTS: ${{ github.event_name == 'push' || inputs.run-tests == 'true' }} + RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run-tests == 'true' }} REF: ${{ inputs.target_branch =='' && github.ref || inputs.target_branch}} @@ -52,13 +53,13 @@ jobs: - name: Config OR-Tools URL run: | - echo "ORTOOLS_URL=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_windows-latest_static_sirius.zip" >> $GITHUB_ENV + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_windows-latest_static_sirius.zip" >> $GITHUB_ENV shell: bash - name: Pre-requisites shell: cmd run: | - choco install wget unzip zip --no-progress + choco install wget unzip zip --no-progress # Downloads ccache, and copies it to "cl.exe" in order to trick cmake into using it, # see ccache wiki for background on using it with MSVC: @@ -81,7 +82,7 @@ jobs: - name: Install VCPKG shell: bash run: | - git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.bat -disableMetrics + git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.bat -disableMetrics - name: Restore vcpkg binary dir from cache id: cache-vcpkg-binary @@ -95,7 +96,7 @@ jobs: - name: Download pre-compiled librairies uses: ./.github/workflows/download-extract-precompiled-libraries-zip with: - os: ${{env.os}} + os: windows-latest ortools-url: ${{env.ORTOOLS_URL}} ortools-dir: ${{env.ORTOOLS_DIR}} @@ -110,51 +111,67 @@ jobs: run: pip install -r src/tests/examples/requirements.txt - name: Enable git longpaths - run: git config --system core.longpaths true + run: git config --system core.longpaths true - name: Configure shell: bash run: | - cmake -B _build -S src \ - -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 \ - -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/python.exe" \ - -DCMAKE_VS_GLOBALS="CLToolExe=cl.exe;CLToolPath=${GITHUB_WORKSPACE}/ccache;TrackFileAccess=false;UseMultiToolTask=true;DebugInformationFormat=OldStyle" + cmake -B _build -S src \ + -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 \ + -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/python.exe" \ + -DCMAKE_VS_GLOBALS="CLToolExe=cl.exe;CLToolPath=${GITHUB_WORKSPACE}/ccache;TrackFileAccess=false;UseMultiToolTask=true;DebugInformationFormat=OldStyle" - name: Build shell: bash run: | - cmake --build _build --config Release -j$(nproc) - # simtest + cmake --build _build --config Release -j$(nproc) + - name: Read simtest version - id: simtest-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'simtest.json' - prop_path: 'version' + shell: bash + run: | + echo 'SIMTEST_JSON<> $GITHUB_ENV + cat ./simtest.json >> $GITHUB_ENV + echo 'EOF' >> $GITHUB_ENV + + - name: Export simtest version + shell: bash + run: | + echo "SIMTEST=${{ fromJson(env.SIMTEST_JSON).version }}" >> $GITHUB_ENV + + - name: Init submodule Antares_Simulator_Tests + run: | + git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests + + - name: Init submodule Antares_Simulator_Tests_NR + run: | + git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests_NR - name: Run named mps tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && ! cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} + simtest-tag: ${{ env.SIMTEST }} batch-name: valid-named-mps - os: ${{ env.test-platform }} + os: ${{ env.os }} variant: "named-mps" - name: Run unfeasibility-related tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && ! cancelled() }} run: | - cd _build - ctest -C Release --output-on-failure -R "^unfeasible$" + cd _build + ctest -C Release --output-on-failure -R "^unfeasible$" - name: Run unit and end-to-end tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && ! cancelled() }} run: | - cd _build - ctest -C Release --output-on-failure -L "unit|end-to-end" -LE ortools + cd _build + ctest -C Release --output-on-failure -L "unit|end-to-end" -LE ortools - name: Upload build on failure if: ${{ failure() }} @@ -163,112 +180,157 @@ jobs: name: MPS-diff path: ${{ github.workspace }}/src/tests/mps + - name: Run tests for adequacy patch (CSR) + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && ! cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: adequacy-patch-CSR + os: ${{ env.os }} + - name: Run tests about infinity on BCs RHS + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} + simtest-tag: ${{ env.SIMTEST }} batch-name: valid-v830 - os: ${{ env.test-platform }} + os: ${{ env.os }} - name: Run MILP with CBC + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} + simtest-tag: ${{ env.SIMTEST }} batch-name: valid-milp variant: "milp-cbc" - os: ${{ env.test-platform }} + os: ${{ env.os }} - - name: Run tests introduced in v860 + - name: Run tests introduced in 8.6.0 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} + simtest-tag: ${{ env.SIMTEST }} batch-name: valid-v860 - os: ${{ env.test-platform }} + os: ${{ env.os }} - - name: Run tests introduced in v870 + - name: Run tests introduced in 8.7.0 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} + simtest-tag: ${{ env.SIMTEST }} batch-name: valid-v870 - os: ${{ env.test-platform }} + os: ${{ env.os }} - - name: Run short-tests + - name: Run tests introduced in 9.1.0 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: short-tests - os: ${{ env.test-platform }} + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-v910 + os: ${{ env.os }} - - name: Run mps tests + - name: Run tests introduced in 9.2.0 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-mps - os: ${{ env.test-platform }} + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-v920 + os: ${{ env.os }} - - name: Run tests on adequacy patch + - name: Run short-tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: adequacy-patch-CSR - os: ${{ env.test-platform }} + simtest-tag: ${{ env.SIMTEST }} + batch-name: short-tests + os: ${{ env.os }} + - name: Run cucumber on short-tests + uses: ./.github/workflows/cucumber-tests + with: + feature: "features/short_tests.feature" + + - name: Run mps tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-mps + os: ${{ env.os }} - name: Run parallel tests - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} + simtest-tag: ${{ env.SIMTEST }} batch-name: valid-parallel - os: ${{ env.test-platform }} + os: ${{ env.os }} variant: "parallel" + - name: Run tests for time series generator tool + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: ts-generator + os: ${{ env.os }} + variant: "tsgenerator" + - name: Run medium-tests - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} + simtest-tag: ${{ env.SIMTEST }} batch-name: medium-tests - os: ${{ env.test-platform }} + os: ${{ env.os }} + + - name: Run cucumber on medium-tests + uses: ./.github/workflows/cucumber-tests + with: + feature: "features/medium_tests.feature" - name: Run long-tests-1 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} + simtest-tag: ${{ env.SIMTEST }} batch-name: long-tests-1 - os: ${{ env.test-platform }} + os: ${{ env.os }} - name: Run long-tests-2 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} + simtest-tag: ${{ env.SIMTEST }} batch-name: long-tests-2 - os: ${{ env.test-platform }} + os: ${{ env.os }} - name: Run long-tests-3 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} + simtest-tag: ${{ env.SIMTEST }} batch-name: long-tests-3 - os: ${{ env.test-platform }} + os: ${{ env.os }} + + - name: Barrier + if: ${{ !success() }} + run: exit 1 - name: Solver archive creation shell: bash run: | - cd _build - zip -r antares-solver_windows.zip solver/Release/antares-*-solver.exe solver/Release/*.dll + cd _build + zip -r antares-solver_windows.zip solver/Release/antares-solver.exe solver/Release/*.dll - name: NSIS Installer creation shell: bash run: | - rm -rf src/tests/resources/Antares_Simulator_Tests - cd _build - cpack -GNSIS - export NSIS_NAME=$(ls *.exe) - echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV + rm -rf src/tests/resources/Antares_Simulator_Tests + cd _build + cpack -GNSIS + export NSIS_NAME=$(ls *.exe) + echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV - name: Upload NSIS log on failure if: ${{ failure() }} @@ -279,8 +341,8 @@ jobs: - name: .zip creation run: | - cd _build - cpack -G ZIP + cd _build + cpack -G ZIP - name: Installer upload uses: actions/upload-artifact@v4 From 1f21186262f56d867df5c8da50f6596ebb02e3cd Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 10:06:44 +0100 Subject: [PATCH 14/51] fix windows job --- .github/workflows/windows-vcpkg.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 5fb4b19603..96a9bb6d31 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -10,9 +10,6 @@ on: - issue-* - release/* - doc/* - - dependabot/* - schedule: - - cron: '21 2 * * *' workflow_call: inputs: run-tests: @@ -26,10 +23,9 @@ env: GITHUB_TOKEN: ${{ github.token }} IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }} RUN_SIMPLE_TESTS: ${{ github.event_name == 'push' || inputs.run-tests == 'true' }} - RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run-tests == 'true' }} + RUN_EXTENDED_TESTS: ${{ inputs.target_branch == 'release/8.8.x' }} REF: ${{ inputs.target_branch =='' && github.ref || inputs.target_branch}} - jobs: build: From 77338c029f5212a7fa6e403c4e7a17d4329196e5 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 11:32:07 +0100 Subject: [PATCH 15/51] try previous boost version --- src/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vcpkg.json b/src/vcpkg.json index 04a13c7bf7..ad79585dbb 100644 --- a/src/vcpkg.json +++ b/src/vcpkg.json @@ -21,7 +21,7 @@ }, { "name": "boost-test", - "version>=": "1.81.0" + "version>=": "1.71.0" }, { "name": "boost-core", From d0a1290845077c13fc37b9826ec8060fd369ea96 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 11:53:43 +0100 Subject: [PATCH 16/51] revert boost versin --- src/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vcpkg.json b/src/vcpkg.json index ad79585dbb..04a13c7bf7 100644 --- a/src/vcpkg.json +++ b/src/vcpkg.json @@ -21,7 +21,7 @@ }, { "name": "boost-test", - "version>=": "1.71.0" + "version>=": "1.81.0" }, { "name": "boost-core", From c70d9bbb0ea922a6429cf801dc61462320d7fc77 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 13:51:53 +0100 Subject: [PATCH 17/51] use boost 1.72 --- src/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vcpkg.json b/src/vcpkg.json index 04a13c7bf7..0e635b5c0e 100644 --- a/src/vcpkg.json +++ b/src/vcpkg.json @@ -21,7 +21,7 @@ }, { "name": "boost-test", - "version>=": "1.81.0" + "version>=": "1.72.0" }, { "name": "boost-core", From 54bbfc9ddd4b86206ad849bc3588933a30a36641 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 13:52:08 +0100 Subject: [PATCH 18/51] revert boost --- src/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vcpkg.json b/src/vcpkg.json index 0e635b5c0e..678d010983 100644 --- a/src/vcpkg.json +++ b/src/vcpkg.json @@ -21,7 +21,7 @@ }, { "name": "boost-test", - "version>=": "1.72.0" + "version>=": "1.82.0" }, { "name": "boost-core", From 34eded94b3087e2b9196903e6100092d5a03597d Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 13:57:38 +0100 Subject: [PATCH 19/51] remove antares deps from git modules --- .gitmodules | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 9bee42d242..77fb4921c7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 From 7fe3bee51f7201531b2b910fd5fa6c94bef25de2 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 14:00:17 +0100 Subject: [PATCH 20/51] ubuntu job --- .github/workflows/ubuntu.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 26404cb78d..f5a73197e2 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -79,16 +79,8 @@ jobs: with: path: ${{ github.workspace }}/vcpkg_cache key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} - # Allows to restore a cache when deps have only partially changed (like adding a dependency) restore-keys: vcpkg-cache-ubuntu- - - 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-rte/releases/download/$(cat ortools_tag)/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV @@ -96,7 +88,6 @@ jobs: - 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}} @@ -114,7 +105,6 @@ 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 @@ -126,7 +116,6 @@ jobs: -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ - -DDEPS_INSTALL_DIR=${{github.workspace}}/rte-antares-deps-Release \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=ON \ -DBUILD_not_system=OFF \ From 61013c1b46a1df73138dd3e49bb13f5e2e6f142c Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 14:02:07 +0100 Subject: [PATCH 21/51] remove deps from download extract --- .../download-extract-precompiled-libraries-tgz/action.yml | 4 ---- .../download-extract-precompiled-libraries-zip/action.yml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml b/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml index 013e0e0cd9..b8ee7f1358 100644 --- a/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml +++ b/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml @@ -1,9 +1,5 @@ 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 diff --git a/.github/workflows/download-extract-precompiled-libraries-zip/action.yml b/.github/workflows/download-extract-precompiled-libraries-zip/action.yml index 9f1d28997f..022b69ce32 100644 --- a/.github/workflows/download-extract-precompiled-libraries-zip/action.yml +++ b/.github/workflows/download-extract-precompiled-libraries-zip/action.yml @@ -1,9 +1,5 @@ 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 From 6f7dc090bd39eb936048a4c1016bf3914db3f9ba Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 14:16:49 +0100 Subject: [PATCH 22/51] boost test version 1.81 --- src/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vcpkg.json b/src/vcpkg.json index 678d010983..04a13c7bf7 100644 --- a/src/vcpkg.json +++ b/src/vcpkg.json @@ -21,7 +21,7 @@ }, { "name": "boost-test", - "version>=": "1.82.0" + "version>=": "1.81.0" }, { "name": "boost-core", From a7419a53c3359cab05a939f2a243e3db80b2d9ce Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 14:59:32 +0100 Subject: [PATCH 23/51] change cache key --- .github/workflows/sonarcloud.yml | 2 +- .github/workflows/ubuntu.yml | 2 +- .github/workflows/windows-vcpkg.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index a7d140cf7c..dcab1960a6 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -39,7 +39,7 @@ jobs: path: ${{ github.workspace }}/vcpkg_cache key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} # Allows to restore a cache when deps have only partially changed (like adding a dependency) - restore-keys: vcpkg-cache-ubuntu- + restore-keys: vcpkg-cache-ubuntu-8-8 - name: Config OR-Tools URL run: | diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index f5a73197e2..cfe21c729e 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -79,7 +79,7 @@ jobs: with: path: ${{ github.workspace }}/vcpkg_cache key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} - restore-keys: vcpkg-cache-ubuntu- + restore-keys: vcpkg-cache-ubuntu-8-8 - name: Config OR-Tools URL run: | diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 96a9bb6d31..555a7be101 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -87,7 +87,7 @@ jobs: path: ${{ github.workspace }}/vcpkg_cache key: vcpkg-cache-windows-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} # Allows to restore a cache when deps have only partially changed (like adding a dependency) - restore-keys: vcpkg-cache-windows- + restore-keys: vcpkg-cache-windows-8-8 - name: Download pre-compiled librairies uses: ./.github/workflows/download-extract-precompiled-libraries-zip From 751221015e7bb65ab72c5c83c6fa85311abc1650 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 15:43:44 +0100 Subject: [PATCH 24/51] remove vcpkg package from windows job --- .github/workflows/windows-vcpkg.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 555a7be101..c98c54c789 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -34,7 +34,6 @@ jobs: VCPKG_ROOT: ${{ github.workspace }}/vcpkg ORTOOLS_DIR: ${{ github.workspace }}/or-tools os: windows-2022 - vcpkgPackages: wxwidgets boost-test triplet: x64-windows-release # Caching strategy of VCPKG dependencies VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" From b861de4f9581f8a7bb25d4f82bef3b42980262aa Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Fri, 27 Dec 2024 16:39:43 +0100 Subject: [PATCH 25/51] revert last commit --- .github/workflows/windows-vcpkg.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index c98c54c789..555a7be101 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -34,6 +34,7 @@ jobs: VCPKG_ROOT: ${{ github.workspace }}/vcpkg ORTOOLS_DIR: ${{ github.workspace }}/or-tools os: windows-2022 + vcpkgPackages: wxwidgets boost-test triplet: x64-windows-release # Caching strategy of VCPKG dependencies VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" From 1b48ab25bf625b69082c5926492142628c9863eb Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 10:26:59 +0100 Subject: [PATCH 26/51] use develop ubuntu.yml --- .../workflows/ubuntu-system-deps-build.yml | 72 --- .github/workflows/ubuntu.yml | 538 ++++++++++-------- 2 files changed, 296 insertions(+), 314 deletions(-) delete mode 100644 .github/workflows/ubuntu-system-deps-build.yml diff --git a/.github/workflows/ubuntu-system-deps-build.yml b/.github/workflows/ubuntu-system-deps-build.yml deleted file mode 100644 index 9c73e036a2..0000000000 --- a/.github/workflows/ubuntu-system-deps-build.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Ubuntu CI (deps. compilation) - -on: - schedule: - - cron: '21 2 * * 1' - -jobs: - - linux: - - runs-on: ${{ matrix.os }} - if: "!contains(github.event.head_commit.message, '[skip ci]')" - strategy: - matrix: - os: [ubuntu-20.04] - - steps: - - uses: actions/checkout@v3 - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - - - name: Install libraries - run: | - sudo apt-get update - sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev - sudo apt-get install libboost-test-dev - sudo apt-get install g++-10 gcc-10 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip3 install -r src/tests/examples/requirements.txt - - - name: Init submodule - run: | - git submodule update --init --recursive src - - - name: Configure - run: | - 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: | - cmake --build _build --config release -j2 - - - name: Installer .deb creation - run: | - cd _build - cpack -G DEB - - - name: Installer .tar.gz creation - run: | - cd _build - cpack -G TGZ - - - name: Installer archive upload - uses: actions/upload-artifact@v3 - with: - name: antares-ubuntu-archive - path: _build/*.tar.gz - - - name: Installer deb upload - uses: actions/upload-artifact@v3 - with: - name: antares-ubuntu-deb - path: _build/*.deb diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index cfe21c729e..08f697d513 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -11,8 +11,6 @@ on: - release/* - doc/* - dependabot/* - schedule: - - cron: '21 2 * * *' workflow_call: inputs: run-tests: @@ -25,10 +23,10 @@ on: env: GITHUB_TOKEN: ${{ github.token }} IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }} + RUN_SIMPLE_TESTS: ${{ github.event_name == 'push' || inputs.run-tests == 'true' }} RUN_EXTENDED_TESTS: ${{ inputs.target_branch == 'release/8.8.x' }} REF: ${{ inputs.target_branch =='' && github.ref || inputs.target_branch}} VCPKG_ROOT: ${{ github.workspace }}/vcpkg - vcpkgPackages: yaml-cpp antlr4 triplet: x64-linux WX_CONFIG: /usr/bin/wx-config @@ -39,265 +37,321 @@ jobs: env: ORTOOLS_DIR: ${{ github.workspace }}/or-tools os: ubuntu-20.04 + # Caching strategy of VCPKG dependencies + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" runs-on: ubuntu-20.04 if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.REF }} - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: + - uses: actions/checkout@v4 + with: + ref: ${{ env.REF }} + + - name: Install VCPKG + run: git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-ubuntu- + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: key: ${{ env.os }} + - 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 : Init VCPKG submodule - run: | - git submodule update --init vcpkg - - - name: Install libraries - run: | - sudo apt-get update - sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev - sudo apt-get install libboost-test-dev - sudo apt-get install g++-10 gcc-10 - - - name: export wxWidgets script - shell: bash - run: | - export WX_CONFIG=${{env.WX_CONFIG}} - - - name: Install VCPKG - run: git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics - - - name: Restore vcpkg binary dir from cache - id: cache-vcpkg-binary - uses: actions/cache/restore@v4 - with: - path: ${{ github.workspace }}/vcpkg_cache - key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} - restore-keys: vcpkg-cache-ubuntu-8-8 - - - name: Config OR-Tools URL - run: | + - name: Config OR-Tools URL + run: | echo "ORTOOLS_URL=https://github.com/rte-france/or-tools-rte/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: - os: ${{env.os}} - ortools-url: ${{env.ORTOOLS_URL}} - ortools-dir: ${{env.ORTOOLS_DIR}} - - - name: Set up Python - id: setup-python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install dependencies - run: | + - name: Download pre-compiled librairies + uses: ./.github/workflows/download-extract-precompiled-libraries-tgz + with: + os: ${{env.os}} + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} + + - name: Set up Python + id: setup-python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dependencies + run: | python -m pip install --upgrade pip pip3 install -r src/tests/examples/requirements.txt - - name: Init submodule - run: | - git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests - - - name: Configure - run: | - cmake -B _build -S src \ + - name: Configure + run: | + cmake -B _build -S src \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ + -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=ON \ + -DBUILD_TOOLS=ON \ + -DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install \ + -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/bin/python" + + - name: Build + run: | + cmake --build _build -j$(nproc) + + - name: Run API tests + run: | + cmake --install _build --prefix antares_install + cd src/api_client_example + cmake -B _build -S . \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ - -DVCPKG_TARGET_TRIPLET=${{ env.triplet }} \ -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ -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" - - - name: Build - run: | - cmake --build _build -j$(nproc) - - - # simtest - - name: Read simtest version - id: simtest-version - uses: notiz-dev/github-action-json-property@release - with: - path: 'simtest.json' - prop_path: 'version' - - - - name: Run named mps tests - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-named-mps - os: ${{ env.os }} - variant: "named-mps" - - - name: Run unfeasibility-related tests - run: | + -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ + -DCMAKE_PREFIX_PATH="${{github.workspace}}/rte-antares-deps-Release;${{github.workspace}}/install;${{ env.ORTOOLS_DIR }}/install;${{github.workspace}}/antares_install;${{github.workspace}}/rte-antares-deps-Release;${{github.workspace}}/_build/vcpkg_installed/x64-linux-release" + cmake --build _build -j$(nproc) cd _build - ctest -C Release --output-on-failure -R "^unfeasible$" + ctest -C Release --output-on-failure - - name: Run unit and end-to-end tests - run: | - cd _build - ctest -C Release --output-on-failure -L "unit|end-to-end" - - - name: Upload logs for failed tests - if: ${{ failure() }} - uses: actions/upload-artifact@v4 - with: - name: test-log - path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log - - - name: Run tests about infinity on BCs RHS - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v830 - os: ${{ env.os }} - - - name: Run MILP with CBC - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-milp - variant: "milp-cbc" - os: ${{ env.os }} - - - name: Run tests introduced in v860 - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v860 - os: ${{ env.os }} - - - name: Run tests introduced in v870 - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-v870 - os: ${{ env.os }} - - - name: Run short-tests - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: short-tests - os: ${{ env.os }} - - - name: Run mps tests - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-mps - os: ${{ env.os }} - - - name: Run tests on adequacy patch - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: adequacy-patch-CSR - os: ${{ env.os }} - - - name: Run parallel tests - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: valid-parallel - os: ${{ env.os }} - variant: "parallel" - - - name: Run medium-tests - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: medium-tests - os: ${{ env.os }} - - - name: Run long-tests-1 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-1 - os: ${{ env.os }} - - - name: Run long-tests-2 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-2 - os: ${{ env.os }} - - - name: Run long-tests-3 - if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{steps.simtest-version.outputs.prop}} - batch-name: long-tests-3 - os: ${{ env.os }} - - - name: Installer .deb creation - run: | - cd _build - cpack -G DEB + - name: Read simtest version + run: | + echo 'SIMTEST_JSON<> $GITHUB_ENV + cat ./simtest.json >> $GITHUB_ENV + echo 'EOF' >> $GITHUB_ENV - - name: .tar.gz creation - run: | - cd _build - cpack -G TGZ + - name: Export simtest version + run: | + echo "SIMTEST=${{ fromJson(env.SIMTEST_JSON).version }}" >> $GITHUB_ENV - - name: Solver archive creation - run: | - cd _build - cmake --install . --prefix install - pushd . - cd install/bin - tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-*-solver libsirius_solver.so - popd - rm -rf install - - - name: Installer archive upload push - uses: actions/upload-artifact@v4 - with: - name: targz - path: _build/*.tar.gz - - - name: Installer deb upload push - uses: actions/upload-artifact@v4 - with: - name: deb - path: _build/*.deb - - - - name: Publish assets - if: ${{ env.IS_RELEASE == 'true' }} - env: - GITHUB_TOKEN: ${{ github.token }} - tag: ${{ github.event.inputs.release_tag }} - run: | - gh release upload "$tag" _build/*.tar.gz _build/*.deb - - - name: Cache vcpkg binary dir - if: always() - id: save-cache-vcpkg-binary - uses: actions/cache/save@v4 - with: - path: ${{ github.workspace }}/vcpkg_cache - key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + - name: Init submodule Antares_Simulator_Tests + run: | + git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests + + - name: Init submodule Antares_Simulator_Tests_NR + run: | + git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests_NR + + - name: Run named mps tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-named-mps + os: ${{ env.os }} + variant: "named-mps" + + - name: Run unfeasibility-related tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + run: | + cd _build + ctest -C Release --output-on-failure -R "^unfeasible$" + + - name: Run unit and end-to-end tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + run: | + cd _build + ctest -C Release --output-on-failure -L "unit|end-to-end" + + + - name: Upload logs for failed tests + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: test-log + path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log + + - name: Run tests about infinity on BCs RHS + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-v830 + os: ${{ env.os }} + + - name: Run MILP with CBC + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-milp + variant: "milp-cbc" + os: ${{ env.os }} + + - name: Run tests on adequacy patch (CSR) + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: adequacy-patch-CSR + os: ${{ env.os }} + + - name: Run parallel tests + if: ${{ env.RUN_EXTENDED_TESTS == 'true' }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-parallel + os: ${{ env.os }} + variant: "parallel" + + - name: Run tests introduced in 8.6.0 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-v860 + os: ${{ env.os }} + + - name: Run tests introduced in 8.7.0 + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-v870 + os: ${{ env.os }} + + - name: Run short-tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: short-tests + os: ${{ env.os }} + + - name: Run cucumber on short-tests + uses: ./.github/workflows/cucumber-tests + with: + feature: "features/short_tests.feature" + + - name: Run mps tests + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-mps + os: ${{ env.os }} + + - name: Run parallel tests + if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: valid-parallel + os: ${{ env.os }} + variant: "parallel" + + - name: Run tests for time series generator tool + if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: ts-generator + os: ${{ env.os }} + variant: "tsgenerator" + + - name: Run medium-tests + if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: medium-tests + os: ${{ env.os }} + + - name: Run cucumber on medium-tests + uses: ./.github/workflows/cucumber-tests + with: + feature: "features/medium_tests.feature" + + - name: Run long-tests-1 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: long-tests-1 + os: ${{ env.os }} + + - name: Run long-tests-2 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: long-tests-2 + os: ${{ env.os }} + + - name: Run long-tests-3 + if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} + uses: ./.github/workflows/run-tests + with: + simtest-tag: ${{ env.SIMTEST }} + batch-name: long-tests-3 + os: ${{ env.os }} + + - name: Barrier + if: ${{ !success() }} + run: exit 1 + + - name: Installer .deb creation + run: | + cd _build + cpack -G DEB + + - name: .tar.gz creation + run: | + cd _build + cpack -G TGZ + + - name: Solver archive creation + run: | + cd _build + cmake --install . --prefix install + pushd . + cd install/bin + tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-solver libsirius_solver.so + popd + rm -rf install + + - name: Installer archive upload push + uses: actions/upload-artifact@v4 + with: + name: targz + path: _build/*.tar.gz + + - name: Installer deb upload push + uses: actions/upload-artifact@v4 + with: + name: deb + path: _build/*.deb + + + - name: Publish assets + if: ${{ env.IS_RELEASE == 'true' }} + env: + GITHUB_TOKEN: ${{ github.token }} + tag: ${{ github.event.inputs.release_tag }} + run: | + gh release upload "$tag" _build/*.tar.gz _build/*.deb + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-ubuntu-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} From b16a59311c4b0bed44612af30986015597f78a09 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 10:29:11 +0100 Subject: [PATCH 27/51] use develop centos and oracle 8 --- .../workflows/centos7-system-deps-build.yml | 82 -------- .github/workflows/centos7.yml | 194 +++++++++--------- .github/workflows/oracle8.yml | 53 +++-- 3 files changed, 140 insertions(+), 189 deletions(-) delete mode 100644 .github/workflows/centos7-system-deps-build.yml diff --git a/.github/workflows/centos7-system-deps-build.yml b/.github/workflows/centos7-system-deps-build.yml deleted file mode 100644 index 1dd906c4d9..0000000000 --- a/.github/workflows/centos7-system-deps-build.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Centos7 CI (deps. compilation) - -on: - schedule: - - cron: '21 2 * * 1' - -jobs: - - build: - - runs-on: ubuntu-latest - container: 'centos:7' - - steps: - - - name: Set up Python - run: | - yum update -y - yum install -y python3 python3-pip - - - name: Install libraries - run: | - yum install -y epel-release - yum install -y git redhat-lsb-core gcc gcc-c++ make wget centos-release-scl scl-utils rpm-build - yum install -y devtoolset-9 - yum install -y rh-git227-git - yum install -y unzip libuuid-devel wxGTK3-devel boost-test boost-devel - - - name: Install cmake - run: | - wget https://github.com/Kitware/CMake/releases/download/v3.25.3/cmake-3.25.3-linux-x86_64.tar.gz - tar xvf cmake-3.25.3-linux-x86_64.tar.gz -C / - echo "/cmake-3.25.3-linux-x86_64/bin" >> $GITHUB_PATH - rm cmake-3.25.3-linux-x86_64.tar.gz - - - name: Checkout - run: | - git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b $GITHUB_REF_NAME . - - - name: Init submodule - run: | - git submodule update --init --recursive src/antares-deps - - - name: Install dependencies - run: | - pip3 install -r src/tests/examples/requirements.txt - - - name: Configure - run: | - 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 - cmake -B _build -S src -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON - - - name: Build - run: | - source /opt/rh/devtoolset-9/enable - source /opt/rh/rh-git227/enable - cmake --build _build --config release -j2 - - - name: Installer .rpm creation - run: | - cd _build - cpack -G RPM - - - name: Installer .tar.gz creation - run: | - cd _build - cpack -G TGZ - - - name: Installer archive upload - uses: actions/upload-artifact@v3 - with: - name: antares-centos7-archive - path: _build/*.tar.gz - - - name: Installer rpm upload - uses: actions/upload-artifact@v3 - with: - name: antares-centos7-rpm - path: _build/*.rpm - diff --git a/.github/workflows/centos7.yml b/.github/workflows/centos7.yml index 268f88a70d..61ac1ec3dd 100644 --- a/.github/workflows/centos7.yml +++ b/.github/workflows/centos7.yml @@ -2,10 +2,11 @@ name: Centos7 CI (push and/or release) on: release: - types: [created] + types: [ created ] push: branches: - develop + - dependabot/* schedule: - cron: '21 2 * * *' workflow_call: @@ -28,102 +29,107 @@ jobs: build: name: Build - env: - ORTOOLSDIR: ${{ github.workspace }}/or-tools runs-on: ubuntu-latest - container: 'antaresrte/rte-antares:centos7-simulator-no-deps' steps: - - name: Checkout - run: | - git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b ${{ env.REF }} . - - - name: Install gcc 11 - run: | - yum install -y centos-release-scl - yum install -y devtoolset-11-gcc* - - - uses: ./.github/workflows/install-cmake-328 - - - 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 - - - name: Config OR-Tools URL - run: | - echo "URL_ORTOOLS=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_centos7_static_sirius.zip" >> $GITHUB_ENV - - - name: Download OR-Tools - id: ortools - run: | - mkdir -p ${{ env.ORTOOLSDIR }} && cd ${{ env.ORTOOLSDIR }} - wget -q -O ortools.zip ${{ env.URL_ORTOOLS }} - unzip -q ortools.zip - rm ortools.zip - - - name: Install gh if needed - if: ${{ env.IS_RELEASE == 'true' }} - run: | - wget https://github.com/cli/cli/releases/download/v2.52.0/gh_2.52.0_linux_amd64.rpm - rpm -i gh_2.52.0_linux_amd64.rpm - gh --version - - - name: Configure - run: | - source /opt/rh/devtoolset-11/enable - cmake -B _build -S src \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -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-11/enable - source /opt/rh/rh-git227/enable - cmake --build _build --config Release -j$(nproc) - ccache -s - - - name: Installer .rpm creation - run: | - cd _build - cpack -G RPM - - - name: Solver archive creation - run: | - cd _build - cmake --install . --prefix install - pushd . - cd install/bin - tar czf ../../antares-solver_centos7.tar.gz antares-*-solver libsirius_solver.so - popd - rm -rf install - - - name: .tar.gz creation - run: | - cd _build - cpack -G TGZ - - - name: Publish assets - if: ${{ env.IS_RELEASE == 'true' }} - env: - GITHUB_TOKEN: ${{ github.token }} - tag: ${{ github.event.inputs.release_tag }} - run: | - gh release upload "$tag" _build/*.tar.gz _build/*.rpm + + #sparse checkout -- only needed files + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + sparse-checkout: | + docker + src/vcpkg.json + ref: ${{ env.REF }} + + - name: set env variables -- DockerFiles + run: | + echo "DOCKERFILE=$(pwd)/docker/Dockerfile" >> $GITHUB_ENV + echo "DOCKERDIR=$(pwd)/docker" >> $GITHUB_ENV + + + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + with: + files: | + docker/AntaresDeps + + - name: Docker file push + id: docker_push + + if: steps.changed-files.outputs.any_changed == 'true' + uses: elgohr/Publish-Docker-Github-Action@main + with: + name: antaresrte/antaressystemdeps + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + workdir: ${{ env.DOCKERDIR }} + dockerfile: ${{ env.DOCKERDIR }}/AntaresDeps + cache: false + tags: latest + + - name: create vcpkg cache dir + run: | + echo "VCPKG_CACHE_DIR=$GITHUB_WORKSPACE/vcpkg_cache" >> $GITHUB_ENV + mkdir -p ${{ github.workspace }}/vcpkg_cache + + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-centos7-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-centos7- + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: centos7-on-${{ runner.os }} + + + - name: Build the image and Antares + run: | + ls -latr .ccache/ && \ + docker build \ + -t antares:centos7 \ + --build-arg="BRANCH=${{ env.REF }}" \ + --build-arg="NPROC=$(nproc)" \ + --build-arg="VCPKG_CACHE_DIR=./vcpkg_cache" \ + --build-arg CCACHE_DIR=./.ccache \ + --build-arg CCACHE_KEY=centos7-on-${{ runner.os }} \ + -f ${{ env.DOCKERFILE }} . + + + - name: create a container without starting it && retrieve the .tgz + run: | + container_id=$(docker create antares:centos7) + docker cp $container_id:/workspace/Antares_Simulator/_build/archive archive + docker cp $container_id:/workspace/vcpkg_cache ${{ env.VCPKG_CACHE_DIR }} + docker cp $container_id:/workspace/.ccache/. .ccache + ls -la .ccache + docker rm $container_id + + + - name: Publish assets + if: ${{ env.IS_RELEASE == 'true' }} + env: + GITHUB_TOKEN: ${{ github.token }} + tag: ${{ github.event.inputs.release_tag }} + run: | + gh release upload "$tag" archive/*.tar.gz archive/*.rpm + + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ github.workspace }}/vcpkg_cache + key: vcpkg-cache-centos7-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} diff --git a/.github/workflows/oracle8.yml b/.github/workflows/oracle8.yml index ac971bb998..e026b4246a 100644 --- a/.github/workflows/oracle8.yml +++ b/.github/workflows/oracle8.yml @@ -25,7 +25,6 @@ env: IS_PUSH: ${{ github.event_name == 'push' }} REF: ${{ inputs.target_branch =='' && github.ref_name || inputs.target_branch}} - jobs: build: @@ -50,7 +49,27 @@ jobs: - name: Checkout run: | - git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b ${{ env.REF }} . + git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b ${{ env.REF }} . + git config --global safe.directory '*' + + - name: Install VCPKG + # Note: we need to use environment variables instead of workflow variables + # because github messes up path variables when running in container, + # see https://github.com/actions/runner/issues/2058 + run: | + git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics + echo "VCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg" >> $GITHUB_ENV + echo "VCPKG_CACHE_DIR=$GITHUB_WORKSPACE/vcpkg_cache" >> $GITHUB_ENV + echo "VCPKG_BINARY_SOURCES=clear;files,$GITHUB_WORKSPACE/vcpkg_cache,readwrite" >> $GITHUB_ENV + + - name: Restore vcpkg binary dir from cache + id: cache-vcpkg-binary + uses: actions/cache/restore@v4 + with: + path: ${{ env.VCPKG_CACHE_DIR }} + key: vcpkg-cache-oracle8-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} + # Allows to restore a cache when deps have only partially changed (like adding a dependency) + restore-keys: vcpkg-cache-oracle8- - name: Config OR-Tools URL run: | @@ -65,9 +84,7 @@ jobs: rm ortools.zip - name: Init submodule - run: | - git config --global safe.directory '*' - 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: | @@ -82,13 +99,15 @@ jobs: - name: Configure run: | - source /opt/rh/gcc-toolset-11/enable - cmake -B _build -S src \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=OFF \ - -DBUILD_TOOLS=ON \ - -DBUILD_UI=OFF \ - -DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install + source /opt/rh/gcc-toolset-11/enable + cmake -B _build -S src \ + -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=ON \ + -DBUILD_TOOLS=ON \ + -DBUILD_UI=OFF \ + -DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install - name: Build run: | @@ -112,7 +131,7 @@ jobs: cmake --install . --prefix install pushd . cd install/bin - tar czf ../../antares-solver_oracle8.tar.gz antares-*-solver libsirius_solver.so + tar czf ../../antares-solver_oracle8.tar.gz antares-solver libsirius_solver.so popd rm -rf install @@ -140,3 +159,11 @@ jobs: tag: ${{ github.event.inputs.release_tag }} run: | gh release upload "$tag" _build/*.tar.gz _build/*.rpm + + - name: Cache vcpkg binary dir + if: always() + id: save-cache-vcpkg-binary + uses: actions/cache/save@v4 + with: + path: ${{ env.VCPKG_CACHE_DIR }} + key: vcpkg-cache-oracle8-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} From e7cedb87bbbdb86ee9f175b7bdcf620cc2f7603e Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 10:30:17 +0100 Subject: [PATCH 28/51] activate centos and oracle jobs on this branch --- .github/workflows/centos7.yml | 7 ++++--- .github/workflows/oracle8.yml | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/centos7.yml b/.github/workflows/centos7.yml index 61ac1ec3dd..b328a5f0ae 100644 --- a/.github/workflows/centos7.yml +++ b/.github/workflows/centos7.yml @@ -6,6 +6,7 @@ on: push: branches: - develop + - feature/8.8-vcpkg - dependabot/* schedule: - cron: '21 2 * * *' @@ -56,7 +57,7 @@ jobs: uses: tj-actions/changed-files@v45 with: files: | - docker/AntaresDeps + docker/AntaresDeps - name: Docker file push id: docker_push @@ -103,13 +104,13 @@ jobs: --build-arg="VCPKG_CACHE_DIR=./vcpkg_cache" \ --build-arg CCACHE_DIR=./.ccache \ --build-arg CCACHE_KEY=centos7-on-${{ runner.os }} \ - -f ${{ env.DOCKERFILE }} . + -f ${{ env.DOCKERFILE }} . - name: create a container without starting it && retrieve the .tgz run: | container_id=$(docker create antares:centos7) - docker cp $container_id:/workspace/Antares_Simulator/_build/archive archive + docker cp $container_id:/workspace/Antares_Simulator/_build/archive archive docker cp $container_id:/workspace/vcpkg_cache ${{ env.VCPKG_CACHE_DIR }} docker cp $container_id:/workspace/.ccache/. .ccache ls -la .ccache diff --git a/.github/workflows/oracle8.yml b/.github/workflows/oracle8.yml index e026b4246a..f5a14869d6 100644 --- a/.github/workflows/oracle8.yml +++ b/.github/workflows/oracle8.yml @@ -6,6 +6,7 @@ on: push: branches: - develop + - feature/8.8-vcpkg - dependabot/* schedule: From 64e785c53ee07812ee11ceb9996c1ce1bf5f33f7 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 10:52:40 +0100 Subject: [PATCH 29/51] solver-8.8 for oracle --- .github/workflows/oracle8.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/oracle8.yml b/.github/workflows/oracle8.yml index f5a14869d6..9671fd264d 100644 --- a/.github/workflows/oracle8.yml +++ b/.github/workflows/oracle8.yml @@ -132,7 +132,7 @@ jobs: cmake --install . --prefix install pushd . cd install/bin - tar czf ../../antares-solver_oracle8.tar.gz antares-solver libsirius_solver.so + tar czf ../../antares-solver_oracle8.tar.gz antares-8.8-solver libsirius_solver.so popd rm -rf install From aefa052a0303842244e4166edd0338033a6271f9 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 10:53:22 +0100 Subject: [PATCH 30/51] solver-8.8 for windows and ubuntu --- .github/workflows/ubuntu.yml | 2 +- .github/workflows/windows-vcpkg.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 08f697d513..dc8cc70aa8 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -323,7 +323,7 @@ jobs: cmake --install . --prefix install pushd . cd install/bin - tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-solver libsirius_solver.so + tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-8.8-solver libsirius_solver.so popd rm -rf install diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 555a7be101..595e33229c 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -317,7 +317,7 @@ jobs: shell: bash run: | cd _build - zip -r antares-solver_windows.zip solver/Release/antares-solver.exe solver/Release/*.dll + zip -r antares-solver_windows.zip solver/Release/antares-8.8-solver.exe solver/Release/*.dll - name: NSIS Installer creation shell: bash From 00306cfa0ec6f4db148ee838db300954821e809c Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 10:59:31 +0100 Subject: [PATCH 31/51] add docker/ from develop --- docker/AntaresDeps | 37 ++++++++++++++++++ docker/Dockerfile | 95 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 docker/AntaresDeps create mode 100644 docker/Dockerfile diff --git a/docker/AntaresDeps b/docker/AntaresDeps new file mode 100644 index 0000000000..bfe47cb44e --- /dev/null +++ b/docker/AntaresDeps @@ -0,0 +1,37 @@ +FROM centos:7 + +ENV LANG=en_US.UTF-8 \ + LC_ALL=en_US.UTF-8 \ + DEBIAN_FRONTEND=noninteractive \ + VCPKG_ROOT=/vcpkg \ + ORTOOLS_DIR=ortools + +CMD ["/bin/bash"] + +# Install requirements : update repo +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo &&\ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo &&\ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo &&\ + yum install -y epel-release &&\ + yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils python3 &&\ + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo &&\ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo &&\ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo + +RUN yum update -y +RUN yum install -y epel-release +RUN yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils rpm-build && \ + yum install -y devtoolset-11 && \ + yum install -y rh-git227-git ccache +RUN yum install -y unzip libuuid-devel wxGTK3-devel +RUN yum install -y python3-pip && python3 -m pip install --upgrade pip && pip3 install pytest numpy pandas + +# Install requirements +RUN rm -rf /var/cache/yum + +RUN echo "source /opt/rh/devtoolset-11/enable" >> /etc/bashrc +SHELL ["/bin/bash", "--login", "-c"] + +# Install CMake +RUN pip3 install cmake==3.28.4 + diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000000..17a21b3063 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,95 @@ +FROM antaresrte/antaressystemdeps:latest + + + +CMD ["/bin/bash"] + +RUN mkdir /workspace + +RUN echo "source /opt/rh/devtoolset-11/enable" >> /etc/bashrc +SHELL ["/bin/bash", "--login", "-c"] + + +RUN mkdir -p /workspace/vcpkg_cache +ARG VCPKG_CACHE_DIR +COPY $VCPKG_CACHE_DIR /workspace/ + + +ARG BRANCH=develop +RUN cd /workspace && \ + git clone https://github.com/AntaresSimulatorTeam/Antares_Simulator.git --branch $BRANCH && \ + cd Antares_Simulator && \ + git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics && \ + export VCPKG_ROOT=/workspace/Antares_Simulator/vcpkg + + + + + +RUN ORTOOLS_TAG=$(cat /workspace/Antares_Simulator/ortools_tag) && \ + echo "ORTOOLS_TAG=$ORTOOLS_TAG" && \ + URL_ORTOOLS=https://github.com/rte-france/or-tools-rte/releases/download/$ORTOOLS_TAG/ortools_cxx_centos7_static_sirius.zip && \ + mkdir -p ortools && cd ortools && \ + wget -q -O ortools.zip $URL_ORTOOLS && \ + unzip -q ortools.zip && \ + rm ortools.zip + +WORKDIR /workspace/Antares_Simulator +# Accept build arguments for ccache +ARG CCACHE_DIR +ARG CCACHE_KEY + +# Copy ccache directory into the container +COPY ${CCACHE_DIR:-/dev/null} /workspace/.ccache + +# Configure ccache environment variables +ENV CCACHE_DIR=/workspace/.ccache +ENV CCACHE_BASEDIR=/workspace +ENV CCACHE_COMPRESS=1 +ENV PATH="/usr/lib/ccache:$PATH" + +RUN source /opt/rh/devtoolset-11/enable && \ + source /opt/rh/rh-git227/enable && \ + export VCPKG_BINARY_SOURCES="clear;files,/workspace/vcpkg_cache,readwrite" && \ + cmake -B _build -S src \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_TOOLCHAIN_FILE=/workspace/Antares_Simulator/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DVCPKG_TARGET_TRIPLET=x64-linux-release \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=OFF \ + -DBUILD_TOOLS=ON \ + -DBUILD_UI=OFF \ + -DCMAKE_PREFIX_PATH=/ortools/install + +ARG NPROC=2 +RUN source /opt/rh/devtoolset-11/enable && \ + source /opt/rh/rh-git227/enable && \ + export VCPKG_BINARY_SOURCES="clear;files,/workspace/vcpkg_cache,readwrite" && \ + cmake --build _build --config Release -j${NPROC} &&\ + ccache -s + +#Installer .rpm creation +RUN cd _build && \ + cpack -G RPM + +#Solver archive creation +RUN cd _build && \ + cpack -G RPM + +RUN cd _build && \ + cmake --install . --prefix install && \ + pushd . && \ + cd install/bin && \ + tar czf ../../antares-solver_centos7.tar.gz antares-solver libsirius_solver.so && \ + popd && \ + rm -rf install + +#.tar.gz creation +RUN cd _build && \ + cpack -G TGZ +#mv .rpm and .tar.gz +RUN cd _build && \ + mkdir archive && \ + mv *.tar.gz archive && \ + mv *.rpm archive From f47de120773902f4eb84abb065c86a6949f75746 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 11:09:03 +0100 Subject: [PATCH 32/51] remove api tests --- .github/workflows/ubuntu.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index dc8cc70aa8..86fb2340c0 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -112,24 +112,6 @@ jobs: run: | cmake --build _build -j$(nproc) - - name: Run API tests - run: | - cmake --install _build --prefix antares_install - cd src/api_client_example - cmake -B _build -S . \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_C_COMPILER=/usr/bin/gcc-10 \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=ON \ - -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake \ - -DVCPKG_TARGET_TRIPLET=x64-linux-release \ - -DCMAKE_PREFIX_PATH="${{github.workspace}}/rte-antares-deps-Release;${{github.workspace}}/install;${{ env.ORTOOLS_DIR }}/install;${{github.workspace}}/antares_install;${{github.workspace}}/rte-antares-deps-Release;${{github.workspace}}/_build/vcpkg_installed/x64-linux-release" - cmake --build _build -j$(nproc) - cd _build - ctest -C Release --output-on-failure - - name: Read simtest version run: | echo 'SIMTEST_JSON<> $GITHUB_ENV From ac8d763568a5c7bcad507c642d9d0d7cbdba915c Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 11:20:32 +0100 Subject: [PATCH 33/51] update action version, cmake action --- .../download-extract-precompiled-libraries-tgz/action.yml | 2 +- .github/workflows/doxygen.yml | 6 +++--- .github/workflows/install-cmake-328/action.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml b/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml index b8ee7f1358..956344b50a 100644 --- a/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml +++ b/.github/workflows/download-extract-precompiled-libraries-tgz/action.yml @@ -20,7 +20,7 @@ runs: - name: Download & extract OR-Tools shell: bash run: | - mkdir ${{inputs.ortools-dir}} + mkdir -p ${{inputs.ortools-dir}} cd ${{inputs.ortools-dir}} wget ${{inputs.ortools-url}} -O ortools.zip unzip ortools.zip diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index ab0f401390..aabb4edd57 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -13,7 +13,7 @@ jobs: concurrency: group: ${{ github.workflow }}-${{ github.ref }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true # Fetch Hugo themes (true OR recursive) fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod @@ -26,12 +26,12 @@ jobs: git apply ../docs/antares-simulator-doxygen.patch - name: Doxygen - uses: mattnotmitt/doxygen-action@1.9.5 + uses: mattnotmitt/doxygen-action@v1.9.8 with: doxyfile-path: docs/Doxyfile - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 # If you're changing the branch from main, # also change the `main` in `refs/heads/main` # below accordingly. diff --git a/.github/workflows/install-cmake-328/action.yml b/.github/workflows/install-cmake-328/action.yml index 9c2beb7876..1cf045dbee 100644 --- a/.github/workflows/install-cmake-328/action.yml +++ b/.github/workflows/install-cmake-328/action.yml @@ -1,4 +1,4 @@ -name: "Install cmake 3.28 using devtoolset 10" +name: "Install cmake 3.28 using devtoolset 10 if possible" description: "Download and install system wide cmake 3.28" runs: @@ -7,7 +7,7 @@ runs: - name: Build cmake shell: bash run: | - source /opt/rh/devtoolset-11/enable + source /opt/rh/devtoolset-10/enable || true # Ignore error if devtoolset-10 is not available yum -y install openssl-devel wget https://github.com/Kitware/CMake/releases/download/v3.28.2/cmake-3.28.2.tar.gz tar -xvf cmake-3.28.2.tar.gz From be64019c0b616dbf05d9bf74bd45155159d439a2 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 11:25:55 +0100 Subject: [PATCH 34/51] remove init test nr from ubuntu --- .github/workflows/ubuntu.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 86fb2340c0..c4c380b2b9 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -126,10 +126,6 @@ jobs: run: | git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests - - name: Init submodule Antares_Simulator_Tests_NR - run: | - git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests_NR - - name: Run named mps tests if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests From f56f1bc9dde13d3a943d3af72c8ec852e9b99d35 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 11:26:38 +0100 Subject: [PATCH 35/51] solver 8-8 for centos in dockerfile --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 17a21b3063..421dec4622 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -81,7 +81,7 @@ RUN cd _build && \ cmake --install . --prefix install && \ pushd . && \ cd install/bin && \ - tar czf ../../antares-solver_centos7.tar.gz antares-solver libsirius_solver.so && \ + tar czf ../../antares-solver_centos7.tar.gz antares-8-8-solver libsirius_solver.so && \ popd && \ rm -rf install From bae030dae68353fc8d2d95a292fc7c7763823c07 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 11:45:55 +0100 Subject: [PATCH 36/51] rm tests related to ts generator exe --- .github/workflows/ubuntu.yml | 9 --------- .github/workflows/windows-vcpkg.yml | 9 --------- 2 files changed, 18 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index c4c380b2b9..e141bea6d1 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -235,15 +235,6 @@ jobs: os: ${{ env.os }} variant: "parallel" - - name: Run tests for time series generator tool - if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{ env.SIMTEST }} - batch-name: ts-generator - os: ${{ env.os }} - variant: "tsgenerator" - - name: Run medium-tests if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 595e33229c..2231fc7be0 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -263,15 +263,6 @@ jobs: os: ${{ env.os }} variant: "parallel" - - name: Run tests for time series generator tool - if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{ env.SIMTEST }} - batch-name: ts-generator - os: ${{ env.os }} - variant: "tsgenerator" - - name: Run medium-tests if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests From 133f60263f0bfaf4041a04f0144843d23b225239 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 11:47:17 +0100 Subject: [PATCH 37/51] type in centos dockerfile --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 421dec4622..5c53c4db87 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -81,7 +81,7 @@ RUN cd _build && \ cmake --install . --prefix install && \ pushd . && \ cd install/bin && \ - tar czf ../../antares-solver_centos7.tar.gz antares-8-8-solver libsirius_solver.so && \ + tar czf ../../antares-solver_centos7.tar.gz antares-8.8-solver libsirius_solver.so && \ popd && \ rm -rf install From 64c7b7636cd7dcfc95e31043cccc835f7f99939c Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 12:05:32 +0100 Subject: [PATCH 38/51] centos and oracle8 OK --- .github/workflows/centos7.yml | 1 - .github/workflows/oracle8.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/centos7.yml b/.github/workflows/centos7.yml index b328a5f0ae..cc85e02aa6 100644 --- a/.github/workflows/centos7.yml +++ b/.github/workflows/centos7.yml @@ -6,7 +6,6 @@ on: push: branches: - develop - - feature/8.8-vcpkg - dependabot/* schedule: - cron: '21 2 * * *' diff --git a/.github/workflows/oracle8.yml b/.github/workflows/oracle8.yml index 9671fd264d..805c2f6a55 100644 --- a/.github/workflows/oracle8.yml +++ b/.github/workflows/oracle8.yml @@ -6,7 +6,6 @@ on: push: branches: - develop - - feature/8.8-vcpkg - dependabot/* schedule: From 4bee6113443eb63982bba31bc3ae6b4b49e669ba Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 12:06:49 +0100 Subject: [PATCH 39/51] sonarcloud versions --- .github/workflows/sonarcloud.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index dcab1960a6..afb27239f2 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -46,7 +46,7 @@ jobs: echo "ORTOOLS_URL=https://github.com/rte-france/or-tools-rte/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 + uses: SonarSource/sonarcloud-github-c-cpp@v3 - name: ccache uses: hendrikmuhs/ccache-action@v1.2 @@ -69,7 +69,7 @@ jobs: ortools-dir: ${{env.ORTOOLS_DIR}} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.12 From 73bd1dcdeecf689850b6bdb69a53871d476949c9 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 13:50:32 +0100 Subject: [PATCH 40/51] use same vcpkg version --- vcpkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg b/vcpkg index c82f746672..9d47b24eac 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit c82f74667287d3dc386bce81e44964370c91a289 +Subproject commit 9d47b24eacbd1cd94f139457ef6cd35e5d92cc84 From 66617f05d97f83d3eec88a446dfe42f1f4e9dc28 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 15:24:03 +0100 Subject: [PATCH 41/51] remove 9.1 9.2 tests in windows --- .github/workflows/windows-vcpkg.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 2231fc7be0..ce005fbb4d 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -217,22 +217,6 @@ jobs: batch-name: valid-v870 os: ${{ env.os }} - - name: Run tests introduced in 9.1.0 - if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{ env.SIMTEST }} - batch-name: valid-v910 - os: ${{ env.os }} - - - name: Run tests introduced in 9.2.0 - if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} - uses: ./.github/workflows/run-tests - with: - simtest-tag: ${{ env.SIMTEST }} - batch-name: valid-v920 - os: ${{ env.os }} - - name: Run short-tests if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests From 4a4e919f6d0603ec58343dc2c8fbd85800458e50 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 30 Dec 2024 16:37:10 +0100 Subject: [PATCH 42/51] remove test nr init --- .github/workflows/windows-vcpkg.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index ce005fbb4d..cb3f843035 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -144,10 +144,6 @@ jobs: run: | git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests - - name: Init submodule Antares_Simulator_Tests_NR - run: | - git submodule update --init --remote src/tests/resources/Antares_Simulator_Tests_NR - - name: Run named mps tests if: ${{ env.RUN_SIMPLE_TESTS == 'true' && ! cancelled() }} uses: ./.github/workflows/run-tests From 9d2c0182c7d2e93d214176ba8d5107e49e3c793a Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 6 Jan 2025 11:25:03 +0100 Subject: [PATCH 43/51] checkout vcpkg to b322364f, update vcpkg.json --- src/vcpkg.json | 6 +++--- vcpkg | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vcpkg.json b/src/vcpkg.json index 04a13c7bf7..fbc62455b3 100644 --- a/src/vcpkg.json +++ b/src/vcpkg.json @@ -1,7 +1,7 @@ { "name": "antares-simulator", "version-string": "8.8.11", - "builtin-baseline": "9484a57dd560b89f0a583be08af6753611c57fd5", + "builtin-baseline": "b322364f06308bdd24823f9d8f03fe0cc86fd46f", "vcpkg-configuration": { "overlay-ports": [ "./ports" @@ -21,11 +21,11 @@ }, { "name": "boost-test", - "version>=": "1.81.0" + "version>=": "1.86.0" }, { "name": "boost-core", - "version>=": "1.81.0" + "version>=": "1.86.0" }, { "name": "minizip-ng", diff --git a/vcpkg b/vcpkg index 9d47b24eac..b322364f06 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 9d47b24eacbd1cd94f139457ef6cd35e5d92cc84 +Subproject commit b322364f06308bdd24823f9d8f03fe0cc86fd46f From 5298ef2f963ba45e988a455dcebd440c3c0b0323 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 6 Jan 2025 11:25:59 +0100 Subject: [PATCH 44/51] update new_release.yml --- .github/workflows/new_release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/new_release.yml b/.github/workflows/new_release.yml index 6cf6da390a..1f3c31f0c3 100644 --- a/.github/workflows/new_release.yml +++ b/.github/workflows/new_release.yml @@ -80,3 +80,4 @@ jobs: uses: ./.github/workflows/build-userguide.yml with: run-tests: ${{ inputs.run-tests }} + target_branch: ${{ inputs.target_branch }} From 14256a751fa57ff7c245c6d3d58ef41fa717e025 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 6 Jan 2025 11:28:47 +0100 Subject: [PATCH 45/51] remove antares-deps-version.json --- antares-deps-version.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 antares-deps-version.json diff --git a/antares-deps-version.json b/antares-deps-version.json deleted file mode 100644 index ced7f5add0..0000000000 --- a/antares-deps-version.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "antares_deps_version": "2.0.2b" -} From 5863bffa13571fb57ac3c26ec8452a93335ed6d2 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 6 Jan 2025 11:40:26 +0100 Subject: [PATCH 46/51] update build-userguide --- .github/workflows/build-userguide.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-userguide.yml b/.github/workflows/build-userguide.yml index fdd474a9c2..a12c034072 100644 --- a/.github/workflows/build-userguide.yml +++ b/.github/workflows/build-userguide.yml @@ -6,12 +6,20 @@ on: push: branches: - release/* + - feature/* + - features/* + - fix/* + - issue-* - doc/* + - dependabot/* workflow_call: inputs: run-tests: required: true - type: boolean + type: string + target_branch: + required: true + type: string env: IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }} @@ -24,10 +32,12 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.target_branch}} - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.12 @@ -52,7 +62,7 @@ jobs: echo "PDF_PATH_ASSET= [\"docs/pdf-doc-generation-with-sphinx/$PDF_NAME\"]" >> $GITHUB_ENV - name: user guide upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pdf-reference-guide path: ${{ env.PDF_PATH }} @@ -65,4 +75,3 @@ jobs: tag: ${{ github.event.inputs.release_tag }} run: | gh release upload "$tag" ${{ env.PDF_PATH }} - From 0d01065f7aa679d5654a068d9fff43520ea347f5 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 6 Jan 2025 11:41:22 +0100 Subject: [PATCH 47/51] rc4 --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7ece9155ec..43671a52e8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,7 +7,7 @@ set(ANTARES_VERSION_REVISION 12) # Beta release set(ANTARES_BETA 0) -set(ANTARES_RC 3) +set(ANTARES_RC 4) set(ANTARES_VERSION_YEAR 2024) From 32602f6174b8c99a3227bfa1150d5bab24484842 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 6 Jan 2025 12:43:16 +0100 Subject: [PATCH 48/51] remove cucumber tests --- .github/workflows/ubuntu.yml | 10 ---------- .github/workflows/windows-vcpkg.yml | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index e141bea6d1..85e59eba0c 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -213,11 +213,6 @@ jobs: batch-name: short-tests os: ${{ env.os }} - - name: Run cucumber on short-tests - uses: ./.github/workflows/cucumber-tests - with: - feature: "features/short_tests.feature" - - name: Run mps tests if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests @@ -243,11 +238,6 @@ jobs: batch-name: medium-tests os: ${{ env.os }} - - name: Run cucumber on medium-tests - uses: ./.github/workflows/cucumber-tests - with: - feature: "features/medium_tests.feature" - - name: Run long-tests-1 if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index cb3f843035..bcc3ab91ca 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -221,11 +221,6 @@ jobs: batch-name: short-tests os: ${{ env.os }} - - name: Run cucumber on short-tests - uses: ./.github/workflows/cucumber-tests - with: - feature: "features/short_tests.feature" - - name: Run mps tests if: ${{ env.RUN_SIMPLE_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests @@ -251,11 +246,6 @@ jobs: batch-name: medium-tests os: ${{ env.os }} - - name: Run cucumber on medium-tests - uses: ./.github/workflows/cucumber-tests - with: - feature: "features/medium_tests.feature" - - name: Run long-tests-1 if: ${{ env.RUN_EXTENDED_TESTS == 'true' && !cancelled() }} uses: ./.github/workflows/run-tests From aecd5a83806c4d1fb7f09769728f9e8c0e1df076 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 6 Jan 2025 12:52:19 +0100 Subject: [PATCH 49/51] remove antares-deps directory --- src/antares-deps | 1 - 1 file changed, 1 deletion(-) delete mode 160000 src/antares-deps diff --git a/src/antares-deps b/src/antares-deps deleted file mode 160000 index 0d6bebfb90..0000000000 --- a/src/antares-deps +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0d6bebfb901e47ec6ac1c73cb61a522803c81b98 From 691807bc2c2f6c7346e3f0e483e96c6071420738 Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 6 Jan 2025 13:28:49 +0100 Subject: [PATCH 50/51] simtest 8.8.12 --- simtest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simtest.json b/simtest.json index e052fab592..28113dc632 100644 --- a/simtest.json +++ b/simtest.json @@ -1,3 +1,3 @@ { - "version": "v8.8.11" + "version": "v8.8.12" } From 1e08c60bdfdb0fbba958bcfda6ab07ee46184dee Mon Sep 17 00:00:00 2001 From: Vincent Payet Date: Mon, 6 Jan 2025 13:44:03 +0100 Subject: [PATCH 51/51] Change error message for sirius not found --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 43671a52e8..daba330341 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -209,7 +209,7 @@ endif() find_package(sirius_solver) if (NOT sirius_solver_FOUND) - message (FATAL_ERROR "Sirius solver not found. Sirius solver can be compiled with -DBUILD_sirius=ON or you can specify previous dependency install directory with -DCMAKE_PREFIX_PAT ") + message (FATAL_ERROR "Sirius solver not found. You can specify a dependency install directory with -DCMAKE_PREFIX_PATH") endif() #gflags needed for ortools