From f0aecc30b5eeeec2514838a0c618cded0e6ddf8e Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 5 Jun 2024 11:00:24 +0200 Subject: [PATCH] All worflows --- .github/workflows/build_centos7.yml | 11 ++++-- .github/workflows/build_oracle8.yml | 11 ++++-- .github/workflows/build_ubuntu.yml | 1 - .github/workflows/build_windows.yml | 13 ++++--- .github/workflows/centos-release.yml | 11 ++++-- .../workflows/centos7-system-deps-build.yml | 2 - .../action.yml | 37 +++++++++++++------ .github/workflows/ol8-release.yml | 12 ++++-- .../workflows/windows-vcpkg-deps-build.yml | 4 -- .github/workflows/windows-vcpkg.yml | 13 ++++--- 10 files changed, 74 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build_centos7.yml b/.github/workflows/build_centos7.yml index 569b92aa4..562abde24 100644 --- a/.github/workflows/build_centos7.yml +++ b/.github/workflows/build_centos7.yml @@ -88,6 +88,7 @@ jobs: XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib VCPKG_ROOT: ${{ github.workspace }}/vcpkg + ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools steps: - run: | @@ -98,6 +99,10 @@ jobs: id: get_release uses: bruceadams/get-release@v1.3.2 + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV + - uses: actions/checkout@v3 #Keep at 3 with: submodules: true @@ -152,6 +157,8 @@ jobs: antares-version: ${{needs.versions.outputs.antares-version}} os: centos7 os-full-name: CentOS-7.9.2009 + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} - name: Compile tbb uses: ./.github/workflows/compile-tbb @@ -168,8 +175,6 @@ jobs: pushd vcpkg git fetch --unshallow ./bootstrap-vcpkg.sh - popd - vcpkg/vcpkg install - name: Configure run: | @@ -180,8 +185,8 @@ jobs: -DBUILD_TESTING=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=_install \ + -DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install \ -DBUILD_UI=ON \ - -DXPRESS=${{ env.XPRESS_VALUE }} \ -DALLOW_RUN_AS_ROOT=ON \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake diff --git a/.github/workflows/build_oracle8.yml b/.github/workflows/build_oracle8.yml index b9f6f2147..1d0028640 100644 --- a/.github/workflows/build_oracle8.yml +++ b/.github/workflows/build_oracle8.yml @@ -62,6 +62,7 @@ jobs: XPRESSDIR_CONTAINER: ${GITHUB_WORKSPACE}/xpress XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib + ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools steps: - name: Install System @@ -72,6 +73,10 @@ jobs: source /opt/rh/gcc-toolset-10/enable echo $PATH >> $GITHUB_PATH + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV + - run: | dnf module install -y nodejs:20/common @@ -108,6 +113,8 @@ jobs: antares-version: ${{needs.versions.outputs.antares-version}} os: Oracle8 os-full-name: OracleServer-8.9 + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} - name: Compile TBB uses: ./.github/workflows/compile-tbb @@ -120,8 +127,6 @@ jobs: pushd vcpkg git fetch --unshallow ./bootstrap-vcpkg.sh - popd - vcpkg/vcpkg install - name: Configure run: | @@ -131,8 +136,8 @@ jobs: -DBUILD_TESTING=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=_install \ + -DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install \ -DBUILD_UI=OFF \ - -DXPRESS=${{ env.XPRESS_VALUE }} \ -DALLOW_RUN_AS_ROOT=ON \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake diff --git a/.github/workflows/build_ubuntu.yml b/.github/workflows/build_ubuntu.yml index 365f39717..cf4e533dd 100644 --- a/.github/workflows/build_ubuntu.yml +++ b/.github/workflows/build_ubuntu.yml @@ -148,7 +148,6 @@ jobs: -DCMAKE_INSTALL_PREFIX=_install \ -DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install \ -DBUILD_UI=ON \ - -DXPRESS=${{ env.XPRESS_VALUE }} \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake - name: Build diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index a41422727..1dbb43683 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -32,12 +32,17 @@ jobs: XPRS_LIB_Path: ${{ github.workspace }}\xpress\lib # 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@v4 with: submodules: true + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV + - name: Checkout xpressmp linux if: matrix.xprs.value == 'XPRESS-ON' uses: actions/checkout@v4 @@ -108,10 +113,6 @@ jobs: cd vcpkg git fetch --unshallow ./bootstrap-vcpkg.sh - vcpkg install --triplet ${{matrix.triplet}} - rm -rf buildtrees - rm -rf packages - rm -rf downloads shell: bash - name: Compile tbb @@ -125,6 +126,8 @@ jobs: antares-deps-version: ${{steps.antares-deps-version.outputs.result}} antares-version: ${{steps.antares-version.outputs.result}} os: ${{matrix.os}} + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} - name: Expand xpress value in env #I can't seem to expand the variable in the cmake command line so export it in env @@ -136,7 +139,7 @@ jobs: - name: Configure run: | $pwd=Get-Location - cmake -B _build -S . -DDEPS_INSTALL_DIR=rte-antares-deps-Release -DCMAKE_PREFIX_PATH="$pwd\rte-antares-${{steps.antares-version.outputs.result}}-installer-64bits" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON -DXPRESS=${{ env.XPRESS_VALUE }} + cmake -B _build -S . -DDEPS_INSTALL_DIR=rte-antares-deps-Release -DCMAKE_PREFIX_PATH="$pwd\rte-antares-${{steps.antares-version.outputs.result}}-installer-64bits" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON -DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install - name: Build run: | cmake --build _build --config Release -j4 diff --git a/.github/workflows/centos-release.yml b/.github/workflows/centos-release.yml index 99c0a8804..6897047f1 100644 --- a/.github/workflows/centos-release.yml +++ b/.github/workflows/centos-release.yml @@ -122,6 +122,7 @@ jobs: XPRESSDIR_CONTAINER: ${GITHUB_WORKSPACE}/xpress XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib + ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools outputs: zip_name: ${{ steps.zip_name.outputs.zip_name }} singlefile_name: ${{ steps.zip_name.outputs.singlefile_name }} @@ -146,6 +147,10 @@ jobs: with: cmake-version: '3.28.x' + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV + - name: Download pre-compiled librairies uses: ./.github/workflows/download-extract-precompiled-libraries-tgz with: @@ -153,6 +158,8 @@ jobs: antares-version: ${{needs.versions.outputs.antares-version}} os: centos7 os-full-name: CentOS-7.9.2009 + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} - name: Compile tbb uses: ./.github/workflows/compile-tbb @@ -202,8 +209,6 @@ jobs: pushd vcpkg git fetch --unshallow ./bootstrap-vcpkg.sh - popd - vcpkg/vcpkg install - name: Configure shell: bash @@ -221,7 +226,7 @@ jobs: -DCMAKE_INSTALL_PREFIX=_install \ -DBUILD_UI=ON \ -DUSER_GUIDE_PATH="docs/${{ needs.userguide.outputs.pdf-name }}" \ - -DXPRESS=${XPRESS_VALUE} \ + -DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install \ -DALLOW_RUN_AS_ROOT=ON \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake diff --git a/.github/workflows/centos7-system-deps-build.yml b/.github/workflows/centos7-system-deps-build.yml index 39cc66dd0..c28a8f510 100644 --- a/.github/workflows/centos7-system-deps-build.yml +++ b/.github/workflows/centos7-system-deps-build.yml @@ -119,8 +119,6 @@ jobs: pushd vcpkg git fetch --unshallow ./bootstrap-vcpkg.sh - popd - vcpkg/vcpkg install - name: Configure run: | diff --git a/.github/workflows/download-extract-precompiled-libraries-zip/action.yml b/.github/workflows/download-extract-precompiled-libraries-zip/action.yml index 6b1c62c2c..d33f99847 100644 --- a/.github/workflows/download-extract-precompiled-libraries-zip/action.yml +++ b/.github/workflows/download-extract-precompiled-libraries-zip/action.yml @@ -18,17 +18,32 @@ inputs: description: 'extra qualifiers' required: false default: "" + ortools-url: + description: 'URL for OR-Tools' + required: true + ortools-dir: + description: 'Destination directory for OR-Tools' + required: true runs: using: "composite" - steps: - - id: download-extract - 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 - - wget https://github.com/AntaresSimulatorTeam/Antares_Simulator/releases/download/v${{inputs.antares-version}}/rte-antares-${{inputs.antares-version}}-installer-64bits.zip - unzip rte-antares-${{inputs.antares-version}}-installer-64bits.zip - rm -rf rte-antares-${{inputs.antares-version}}-installer-64bits.zip + steps: + - id: download-extract + 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 + + wget https://github.com/AntaresSimulatorTeam/Antares_Simulator/releases/download/v${{inputs.antares-version}}/rte-antares-${{inputs.antares-version}}-installer-64bits.zip + unzip rte-antares-${{inputs.antares-version}}-installer-64bits.zip + rm -rf rte-antares-${{inputs.antares-version}}-installer-64bits.zip + + - name: Download & extract OR-Tools + shell: bash + run: | + mkdir "${{inputs.ortools-dir}}" + cd "${{inputs.ortools-dir}}" + wget ${{inputs.ortools-url}} -O ortools.zip + unzip ortools.zip + rm ortools.zip \ No newline at end of file diff --git a/.github/workflows/ol8-release.yml b/.github/workflows/ol8-release.yml index e74ec6537..007c09a42 100644 --- a/.github/workflows/ol8-release.yml +++ b/.github/workflows/ol8-release.yml @@ -93,6 +93,7 @@ jobs: XPRESSDIR_CONTAINER: ${GITHUB_WORKSPACE}/xpress XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib + ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools outputs: zip_name: ${{ steps.zip_name.outputs.zip_name }} singlefile_name: ${{ steps.zip_name.outputs.singlefile_name }} @@ -115,6 +116,10 @@ jobs: - run: | dnf module install -y nodejs:20/common + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV + - uses: lukka/get-cmake@latest with: useLocalCache: false @@ -128,8 +133,6 @@ jobs: pushd vcpkg git fetch --unshallow ./bootstrap-vcpkg.sh - popd - vcpkg/vcpkg install - name: Download pre-compiled librairies uses: ./.github/workflows/download-extract-precompiled-libraries-tgz @@ -138,7 +141,8 @@ jobs: antares-version: ${{needs.versions.outputs.antares-version}} os: oracle8 os-full-name: OracleServer-8.9 - #variant: -ortools-xpress + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} - name: Compile tbb uses: ./.github/workflows/compile-tbb @@ -184,7 +188,7 @@ jobs: -DCMAKE_INSTALL_PREFIX=_install \ -DBUILD_UI=ON \ -DUSER_GUIDE_PATH="docs/${{ needs.userguide.outputs.pdf-name }}" \ - -DXPRESS=${XPRESS_VALUE} \ + -DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install \ -DALLOW_RUN_AS_ROOT=ON \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake diff --git a/.github/workflows/windows-vcpkg-deps-build.yml b/.github/workflows/windows-vcpkg-deps-build.yml index a15055b59..0bea1b942 100644 --- a/.github/workflows/windows-vcpkg-deps-build.yml +++ b/.github/workflows/windows-vcpkg-deps-build.yml @@ -78,10 +78,6 @@ jobs: cd vcpkg git fetch --unshallow ./bootstrap-vcpkg.sh - vcpkg install --triplet ${{matrix.triplet}} - rm -rf buildtrees - rm -rf packages - rm -rf downloads shell: bash - name: Compile tbb diff --git a/.github/workflows/windows-vcpkg.yml b/.github/workflows/windows-vcpkg.yml index 9cb96f8b2..624fd84cf 100644 --- a/.github/workflows/windows-vcpkg.yml +++ b/.github/workflows/windows-vcpkg.yml @@ -66,6 +66,7 @@ jobs: XPRS_LIB_Path: ${{ github.workspace }}\xpress\lib # 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 outputs: zip_name: ${{ steps.zip_name.outputs.zip_name }} singlefile_name: ${{steps.zip_name.outputs.singlefile_name}} @@ -92,6 +93,10 @@ jobs: uses: bruceadams/get-release@main + - name: Config OR-Tools URL + run: | + echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV + - name: Set up Python uses: actions/setup-python@v5 with: @@ -153,10 +158,6 @@ jobs: cd vcpkg git fetch --unshallow ./bootstrap-vcpkg.sh - vcpkg install --triplet ${{matrix.triplet}} - rm -rf buildtrees - rm -rf packages - rm -rf downloads shell: bash - name: Compile tbb @@ -170,6 +171,8 @@ jobs: antares-deps-version: ${{steps.antares-deps-version.outputs.result}} antares-version: ${{steps.antares-version.outputs.result}} os: ${{matrix.os}} + ortools-url: ${{env.ORTOOLS_URL}} + ortools-dir: ${{env.ORTOOLS_DIR}} - name: Download userguide uses: actions/download-artifact@v4 @@ -188,7 +191,7 @@ jobs: #Inverted ternary : @({'condition is false'},{'condition is true'})[$condition] => ({true}, {false})[!$condition] run: | $pwd=Get-Location - cmake -B _build -S . -DDEPS_INSTALL_DIR=rte-antares-deps-Release -DCMAKE_PREFIX_PATH="$pwd\rte-antares-${{steps.antares-version.outputs.result}}-installer-64bits" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON -DUSER_GUIDE_PATH="docs/${{ needs.userguide.outputs.pdf-name }}" -DXPRESS=${{ env.XPRESS_VALUE }} + cmake -B _build -S . -DDEPS_INSTALL_DIR=rte-antares-deps-Release -DCMAKE_PREFIX_PATH="$pwd\rte-antares-${{steps.antares-version.outputs.result}}-installer-64bits" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON -DUSER_GUIDE_PATH="docs/${{ needs.userguide.outputs.pdf-name }}" -DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install - name: Build run: |