Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix/centos-build' into feature/b…
Browse files Browse the repository at this point in the history
…ackport-no-sub-deletion-mergemps-1.3.2
  • Loading branch information
tbittar committed Jan 13, 2025
2 parents 1602bbc + d374189 commit 51e94fd
Show file tree
Hide file tree
Showing 644 changed files with 233,617 additions and 28,295 deletions.
348 changes: 182 additions & 166 deletions .github/workflows/build_centos7.yml

Large diffs are not rendered by default.

72 changes: 41 additions & 31 deletions .github/workflows/build_oracle8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
push:
branches:
- develop
- dependabot/*
- feature/*
- features/*
- fix/*
- issue-*
- release/*
pull_request:
- doc/*
- dependabot/*
release:
types: [ created ]

Expand Down Expand Up @@ -40,21 +44,10 @@ jobs:
name: Build
runs-on: ubuntu-latest
container: 'oraclelinux:8'
strategy:
matrix:
xprs: [
# { value: XPRESS-ON, ref: 8.13a },
{ value: XPRESS-ON, ref: 9.2.5 },
# { value: 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
ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools
ORTOOLS_URL: "https://github.com/rte-france/or-tools-rte/releases/download/v9.11-rte1.1/ortools_cxx_oraclelinux-8_static_sirius.zip"

outputs:
zip_name: ${{ steps.zip_name.outputs.zip_name }}
Expand All @@ -64,9 +57,9 @@ jobs:
- name: Install System
run: |
dnf install -y epel-release git wget rpm-build redhat-lsb-core
dnf install -y unzip libuuid-devel gcc-toolset-10-toolchain python3-devel zlib-devel
dnf install -y unzip gcc-toolset-11-toolchain python3-devel zlib-devel
#make gcc &co available system wide and "action wide"
source /opt/rh/gcc-toolset-10/enable
source /opt/rh/gcc-toolset-11/enable
echo $PATH >> $GITHUB_PATH
- run: |
Expand All @@ -80,16 +73,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true

- name: Checkout xpressmp linux
uses: actions/checkout@v4
with:
token: ${{ secrets.AS_TOKEN }}
repository: rte-france/xpress-mp
path: ${{ env.XPRESSDIR }}
github-server-url: https://github.com
ref: ${{matrix.xprs.ref}}
if: matrix.xprs.value == 'XPRESS-ON'

- name: Set up Python
run: |
Expand All @@ -98,12 +81,33 @@ jobs:
pip3 install wheel #Too late to install in requirements.txt
pip3 install -r requirements-tests.txt
# the default python version (3.6) is too old to download xpress with pip
# this version of miniconda embeds python3.8
- name: Set up conda
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.5.1-0-Linux-x86_64.sh
bash Miniconda3-py38_23.5.1-0-Linux-x86_64.sh -b -p /root/miniconda3
rm -f Miniconda3-py38_23.5.1-0-Linux-x86_64.sh
- name: Set-up Xpress with pip for Oracle 8
shell: bash
run: |
export PATH=/root/miniconda3/condabin:$PATH
conda install -c fico-xpress "xpress>=9.2,<9.3"
XPRESS_DIR=/root/miniconda3/lib/python3.8/site-packages/xpress
echo "XPRESSDIR=$XPRESS_DIR" >> $GITHUB_ENV
echo "XPAUTH_PATH=$XPRESS_DIR/license/community-xpauth.xpr" >> $GITHUB_ENV
echo "Create symbolic link for XPRESS library file because it is missing in the Python installation"
ln -s $XPRESS_DIR/lib/libxprs.so.42 $XPRESS_DIR/lib/libxprs.so
- name: Download pre-compiled librairies
uses: ./.github/workflows/download-extract-precompiled-libraries-tgz
with:
antares-version: ${{needs.versions.outputs.antares-version}}
os: Oracle8
os-full-name: OracleServer-8.10
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

- name: vcpkg install
run: |
Expand Down Expand Up @@ -131,22 +135,28 @@ jobs:
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=_install \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/deps \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/deps;${{env.ORTOOLS_DIR}}/install" \
-DBUILD_UI=OFF \
-DALLOW_RUN_AS_ROOT=ON \
-DVCPKG_TARGET_TRIPLET=x64-linux-release \
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build
run: |
cmake --build _build --config Release -j$(nproc)
- name: Tests with Cucumber
uses: ./.github/workflows/cucumber-tests
with:
# feature: "features/outer_loop_tests.feature"
mpi_path: ${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux-release/tools/openmpi/bin

- name: Running unit tests
timeout-minutes: 120
shell: bash
run: |
export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux/tools/openmpi/bin/:$PATH
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:${{ env.XPRS_LIB_Path_CONTAINER }}
export XPRESS=${{ env.XPRESS_CONTAINER }}
export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux-release/tools/openmpi/bin/:$PATH
cd _build
ctest -C Release --output-on-failure -L "unit|benders|lpnamer|medium"
Expand Down
99 changes: 76 additions & 23 deletions .github/workflows/build_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ on:
merge_group:
push:
branches:
- main
- develop
- dependabot/*
- feature/*
- features/*
- fix/*
- issue-*
- release/*
pull_request:
- doc/*
- dependabot/*
release:
types: [ created ]

env:
GITHUB_TOKEN: ${{ github.token }}
PYTHON_VERSION: 3.8

jobs:
build:
Expand All @@ -22,16 +26,10 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
xprs: [
#{ value: XPRESS-ON, ref: 8.13a },
{ value: XPRESS-ON, ref: 9.2.5 },
# { value: XPRESS-OFF }
]
env:
XPRESSDIR: ${{ github.workspace }}/xpress
XPRESS: ${{ github.workspace }}/xpress/bin
XPRS_LIB_Path: ${{ github.workspace }}/xpress/lib
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite"
ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools
ORTOOLS_URL: "https://github.com/rte-france/or-tools-rte/releases/download/v9.11-rte1.1/ortools_cxx_ubuntu-20.04_static_sirius.zip"

outputs:
TGZ_NAME: ${{ steps.export_output.outputs.TGZ_NAME }}
Expand All @@ -42,15 +40,6 @@ jobs:
with:
submodules: true

- name: Checkout xpressmp linux
if: matrix.xprs.value == 'XPRESS-ON'
uses: actions/checkout@v4
with:
repository: rte-france/xpress-mp
path: ${{ env.XPRESSDIR }}
ref: ${{ matrix.xprs.ref}}
token: ${{ secrets.AS_TOKEN }} #reniew token periodically

- name: Install mandatory system libraries
run: |
sudo apt-get update --fix-missing
Expand All @@ -65,16 +54,28 @@ jobs:

- name: Set up Python
uses: actions/setup-python@v5
id: python-setup
with:
cache: 'pip'
python-version: 3.8
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-tests.txt
pip install -r requirements-ui.txt
- name: Set-up Xpress with pip for Ubuntu
shell: bash
run: |
python -m pip install "xpress>=9.2,<9.3"
echo ${{ env.pythonLocation }}
XPRESS_DIR=${{ env.pythonLocation }}/lib/python${{ env.PYTHON_VERSION }}/site-packages/xpress
echo "XPRESSDIR=$XPRESS_DIR" >> $GITHUB_ENV
echo "XPAUTH_PATH=$XPRESS_DIR/license/community-xpauth.xpr" >> $GITHUB_ENV
echo "Create symbolic link for XPRESS library file because it is missing in the Python installation"
ln -s $XPRESS_DIR/lib/libxprs.so.42 $XPRESS_DIR/lib/libxprs.so
- name: Update alternatives
#mpicxx uses "g++" so we need g++ to be symbolic link to g++-10
run: |
Expand Down Expand Up @@ -110,6 +111,8 @@ jobs:
antares-version: ${{steps.antares-version.outputs.result}}
os: ${{matrix.os}}
os-full-name: Ubuntu-20.04
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

- name: vcpkg install
run: |
Expand Down Expand Up @@ -138,17 +141,24 @@ jobs:
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=_install \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/deps \
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/deps;${{env.ORTOOLS_DIR}}/install" \
-DBUILD_UI=ON \
-DVCPKG_TARGET_TRIPLET=x64-linux-release \
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build
run: |
cmake --build _build --config Release -j$(nproc)
- name: Tests with Cucumber
uses: ./.github/workflows/cucumber-tests
with:
# feature: "features/outer_loop_tests.feature"
mpi_path: ${{ github.workspace }}/_build/vcpkg_installed/x64-linux-release/tools/openmpi/bin

- name: Test
run: |
export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux/tools/openmpi/bin:$PATH
export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux-release/tools/openmpi/bin:$PATH
cd _build
ctest -C Release --output-on-failure -L "medium|unit|benders|lpnamer"
Expand Down Expand Up @@ -229,6 +239,49 @@ jobs:
name: user-guide
path: ${{ steps.create-user-guide.outputs.pdf-path }}

test_assets:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- name: Download build assets
uses: actions/download-artifact@v4
with:
name: ${{needs.build.outputs.TGZ_NAME}}
- name: setup
run: |
tar --strip-components=1 -xzf ${{needs.build.outputs.TGZ_NAME}}
sudo apt-get update -y
sudo apt-get install openmpi-bin -y
- name: run launcher
run: |
./antares-xpansion-launcher -i examples/SmallTestFiveCandidates
- name: run launcher parallel
run: |
./antares-xpansion-launcher -i examples/SmallTestFiveCandidates -n 2
test_single_file_asset:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- name: Download build assets
uses: actions/download-artifact@v4
with:
name: ${{needs.build.outputs.SINGLE_FILE_NAME}}
- name: setup
run: |
tar --strip-components=1 -xzf ${{needs.build.outputs.SINGLE_FILE_NAME}}
sudo apt-get update -y
sudo apt-get install openmpi-bin -y
- name: run launcher
run: |
./antares-xpansion-launcher -i examples/SmallTestFiveCandidates
- name: run launcher parallel
run: |
./antares-xpansion-launcher -i examples/SmallTestFiveCandidates -n 2
release:
runs-on: ubuntu-latest
needs: [ build, userguide ]
Expand Down
Loading

0 comments on commit 51e94fd

Please sign in to comment.