From 90ba17a70a581d71e055ddb25394e3785f64f7f3 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 17 Jul 2023 10:26:05 +0200 Subject: [PATCH 1/9] Oracle8 build --- .github/workflows/build_oracle8.yml | 147 +++++++++++++++++++++ .github/workflows/compile-boost/action.yml | 1 + .github/workflows/compile-tbb/action.yml | 6 +- requirements.txt | 1 + 4 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build_oracle8.yml diff --git a/.github/workflows/build_oracle8.yml b/.github/workflows/build_oracle8.yml new file mode 100644 index 000000000..ebdaf2b64 --- /dev/null +++ b/.github/workflows/build_oracle8.yml @@ -0,0 +1,147 @@ +name: Oracle 8 Build + +on: + merge_group: + push: + branches: + - main + - develop + pull_request: + release: + types: [ created ] + +env: + GITHUB_TOKEN: ${{ github.token }} + +jobs: + versions: + runs-on: ubuntu-latest + outputs: + antares-version: ${{steps.antares-version.outputs.result}} + antares-xpansion-version: ${{steps.antares-xpansion-version.outputs.result}} + antares-deps-version: ${{steps.antares-deps-version.outputs.result}} + steps: + - uses: actions/checkout@v3 + - name: Read antares-solver version + id: antares-version + uses: ./.github/actions/read-json-value + with: + path: 'antares-version.json' + key: 'antares_version' + + - name: Read antares-xpansion version + id: antares-xpansion-version + uses: ./.github/actions/read-json-value + with: + path: 'antares-version.json' + key: 'antares_xpansion_version' + + - name: Read antares-deps version + id: antares-deps-version + uses: ./.github/actions/read-json-value + with: + path: 'antares-version.json' + key: 'antares_deps_version' + + build: + name: Build + runs-on: ubuntu-latest + container: 'oraclelinux:8' + strategy: + matrix: + xprs: [ XPRESS-ON, XPRESS-OFF ] + needs: [ versions ] + env: + XPRESSDIR: ${{ github.workspace }}/xpress + XPRESS: ${{ github.workspace }}/xpress/bin + XPRS_LIB_Path: ${{ github.workspace }}/xpress/lib + XPRESSDIR_CONTAINER: ${GITHUB_WORKSPACE}/xpress + XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin + XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib + + steps: + + - name: Install System + run: | + dnf install -y epel-release git cmake wget rpm-build redhat-lsb-core openmpi-devel + dnf install -y unzip libuuid-devel boost-test boost-devel gcc-toolset-9-toolchain zlib-devel python3-devel + + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Checkout xpressmp linux + uses: actions/checkout@v3 + with: + token: ${{ secrets.AS_TOKEN }} + repository: rte-france/xpress-mp + path: ${{ env.XPRESSDIR }} + github-server-url: https://github.com + ref: 8.13 + if: matrix.xprs == 'XPRESS-ON' + + - name: Set up Python + run: | + dnf update -y + dnf install -y python3 python3-pip + + - run: + echo ${{needs.versions.outputs.antares-deps-version}} + + - name: Download pre-compiled librairies + uses: ./.github/workflows/download-extract-precompiled-libraries-tgz + with: + antares-deps-version: ${{needs.versions.outputs.antares-deps-version}} + antares-version: ${{needs.versions.outputs.antares-version}} + os: Oracle8 + os-full-name: OracleServer-8.8 + + - name: Compile Boost + uses: ./.github/workflows/compile-boost + with: + prefix: "../rte-antares-deps-Release/" + + - name: Compile TBB + uses: ./.github/workflows/compile-tbb + + - name: Install dependencies + run: | + source /opt/rh/gcc-toolset-9/enable + pip3 install wheel + pip3 install -r requirements-tests.txt + + - name: Configure + run: | + [[ ${{ matrix.xprs }} == "XPRESS-ON" ]] && XPRESS_VALUE="ON" || XPRESS_VALUE="OFF" + source /opt/rh/gcc-toolset-9/enable + dnf install jsoncpp-devel + export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH + export PATH=/usr/lib64/openmpi/bin:$PATH + cmake3 -B _build -S . \ + -DDEPS_INSTALL_DIR=rte-antares-deps-Release \ + -DBUILD_TESTING=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=_install \ + -DBUILD_UI=OFF \ + -DXPRESS=${{ env.XPRESS_VALUE }} \ + -DXPRESS_ROOT=${{ env.XPRESSDIR }} \ + -DALLOW_RUN_AS_ROOT=ON + + + - name: Build + run: | + source /opt/rh/gcc-toolset-9/enable + export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH + export PATH=/usr/lib64/openmpi/bin:$PATH + cmake --build _build --config Release -j2 + + - name: Running unit tests + timeout-minutes: 120 + shell: bash + run: | + source /etc/profile.d/modules.sh + module load mpi + export LD_LIBRARY_PATH=LD_LIBRARY_PATH:${{ env.XPRS_LIB_Path_CONTAINER }} + export XPRESS=${{ env.XPRESS_CONTAINER }} + cd _build + ctest3 -C Release --output-on-failure -L "unit|benders|lpnamer|medium" diff --git a/.github/workflows/compile-boost/action.yml b/.github/workflows/compile-boost/action.yml index 9d25a87a0..100430f10 100644 --- a/.github/workflows/compile-boost/action.yml +++ b/.github/workflows/compile-boost/action.yml @@ -10,6 +10,7 @@ runs: - id: install-boost shell: bash run: | + source /opt/rh/gcc-toolset-9/enable || true export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH export PATH=/usr/lib64/openmpi/bin:$PATH wget https://github.com/boostorg/boost/releases/download/boost-1.81.0/boost-1.81.0.tar.gz diff --git a/.github/workflows/compile-tbb/action.yml b/.github/workflows/compile-tbb/action.yml index 0db04eb49..b5362154b 100644 --- a/.github/workflows/compile-tbb/action.yml +++ b/.github/workflows/compile-tbb/action.yml @@ -3,13 +3,15 @@ description: "tbb is required for execution policy (parallelization c++)." inputs: cmake: description: 'cmake version' - required: true + default: cmake + runs: using: "composite" steps: - id: install-tbb shell: bash - run: | + run: | + source /opt/rh/gcc-toolset-9/enable || true git clone https://github.com/wjakob/tbb.git cd tbb/build ${{ inputs.cmake }} .. diff --git a/requirements.txt b/requirements.txt index 67d762f47..7b019ee7f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +wheel pyinstaller>=4.3 pyyaml dataclasses From da1d772f6c10a0c40064f17d0a6773180c4fd4d7 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 30 Nov 2023 16:11:45 +0100 Subject: [PATCH 2/9] Update antares version --- antares-version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/antares-version.json b/antares-version.json index 52658ab5b..a26cb0f13 100644 --- a/antares-version.json +++ b/antares-version.json @@ -1,5 +1,5 @@ { - "antares_version": "8.8.0-rc2", + "antares_version": "8.8.0-rc5", "antares_version_executable": "8.8", "antares_xpansion_version": "1.2.0", "antares_deps_version": "2.0.7", From 7bc517c33d2df5cb4db8692ab47eb4c464c21b99 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Thu, 30 Nov 2023 16:50:58 +0100 Subject: [PATCH 3/9] Downgrade antares version To have asset --- antares-version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/antares-version.json b/antares-version.json index a26cb0f13..397977963 100644 --- a/antares-version.json +++ b/antares-version.json @@ -1,5 +1,5 @@ { - "antares_version": "8.8.0-rc5", + "antares_version": "8.8.0-rc3", "antares_version_executable": "8.8", "antares_xpansion_version": "1.2.0", "antares_deps_version": "2.0.7", From c3af67b4eebcb6bf778ba1481a2033e69c725cb3 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Tue, 19 Dec 2023 16:59:16 +0100 Subject: [PATCH 4/9] Update antares 8.8-rc5 --- antares-version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/antares-version.json b/antares-version.json index 397977963..a26cb0f13 100644 --- a/antares-version.json +++ b/antares-version.json @@ -1,5 +1,5 @@ { - "antares_version": "8.8.0-rc3", + "antares_version": "8.8.0-rc5", "antares_version_executable": "8.8", "antares_xpansion_version": "1.2.0", "antares_deps_version": "2.0.7", From 7e988c9767371299c2a1bc60e5135026e4e68473 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 20 Dec 2023 10:15:36 +0100 Subject: [PATCH 5/9] Always use latest image of oracle --- .github/workflows/build_oracle8.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_oracle8.yml b/.github/workflows/build_oracle8.yml index ebdaf2b64..3bc746f88 100644 --- a/.github/workflows/build_oracle8.yml +++ b/.github/workflows/build_oracle8.yml @@ -46,7 +46,9 @@ jobs: build: name: Build runs-on: ubuntu-latest - container: 'oraclelinux:8' + container: + image: 'oraclelinux:8' + options: "--pull always" strategy: matrix: xprs: [ XPRESS-ON, XPRESS-OFF ] From 9bbe4b4b9c4b1f0d27478c8c60107d6572fe974c Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 20 Dec 2023 10:51:59 +0100 Subject: [PATCH 6/9] Use oracle linux 8.9 --- .github/workflows/build_oracle8.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build_oracle8.yml b/.github/workflows/build_oracle8.yml index 3bc746f88..5511b7d23 100644 --- a/.github/workflows/build_oracle8.yml +++ b/.github/workflows/build_oracle8.yml @@ -46,9 +46,7 @@ jobs: build: name: Build runs-on: ubuntu-latest - container: - image: 'oraclelinux:8' - options: "--pull always" + container: 'oraclelinux:8.9' strategy: matrix: xprs: [ XPRESS-ON, XPRESS-OFF ] From 02817af3103ebb4c1b2a300d70fe8c3923ba063f Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 20 Dec 2023 11:21:29 +0100 Subject: [PATCH 7/9] Update antares 8.8.0 --- .github/workflows/build_oracle8.yml | 4 ++-- antares-version.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_oracle8.yml b/.github/workflows/build_oracle8.yml index 5511b7d23..0ad7e230d 100644 --- a/.github/workflows/build_oracle8.yml +++ b/.github/workflows/build_oracle8.yml @@ -46,7 +46,7 @@ jobs: build: name: Build runs-on: ubuntu-latest - container: 'oraclelinux:8.9' + container: 'oraclelinux:8' strategy: matrix: xprs: [ XPRESS-ON, XPRESS-OFF ] @@ -94,7 +94,7 @@ jobs: antares-deps-version: ${{needs.versions.outputs.antares-deps-version}} antares-version: ${{needs.versions.outputs.antares-version}} os: Oracle8 - os-full-name: OracleServer-8.8 + os-full-name: OracleServer-8.9 - name: Compile Boost uses: ./.github/workflows/compile-boost diff --git a/antares-version.json b/antares-version.json index a26cb0f13..ce581d557 100644 --- a/antares-version.json +++ b/antares-version.json @@ -1,5 +1,5 @@ { - "antares_version": "8.8.0-rc5", + "antares_version": "8.8.0", "antares_version_executable": "8.8", "antares_xpansion_version": "1.2.0", "antares_deps_version": "2.0.7", From c392d211d099ed343bed1f7916f18ea099ea3237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20Mar=C3=A9chal?= <45510813+JasonMarechal25@users.noreply.github.com> Date: Wed, 3 Jan 2024 09:28:58 +0100 Subject: [PATCH 8/9] Update .github/workflows/build_oracle8.yml Co-authored-by: abdoulbari zakir <32519851+a-zakir@users.noreply.github.com> --- .github/workflows/build_oracle8.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_oracle8.yml b/.github/workflows/build_oracle8.yml index 0ad7e230d..dbd3b315b 100644 --- a/.github/workflows/build_oracle8.yml +++ b/.github/workflows/build_oracle8.yml @@ -4,7 +4,6 @@ on: merge_group: push: branches: - - main - develop pull_request: release: From 4cb944c59bcd0992880cc8e69f1189d2ab3d8f5b Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Wed, 3 Jan 2024 10:18:03 +0100 Subject: [PATCH 9/9] Remove unnecessary line Wheel is in the requirement list --- .github/workflows/build_oracle8.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_oracle8.yml b/.github/workflows/build_oracle8.yml index dbd3b315b..8814e793c 100644 --- a/.github/workflows/build_oracle8.yml +++ b/.github/workflows/build_oracle8.yml @@ -106,7 +106,6 @@ jobs: - name: Install dependencies run: | source /opt/rh/gcc-toolset-9/enable - pip3 install wheel pip3 install -r requirements-tests.txt - name: Configure