update vcpkg to 2023.04.21 (#668) #549
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Centos7 CI (build dependencies) | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- release/* | |
- ci/* | |
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: | |
runs-on: ubuntu-latest | |
needs: versions | |
container: 'centos:7' | |
steps: | |
- id: branch-name | |
uses: tj-actions/branch-names@v6 | |
- name: Set up Python | |
run: | | |
yum update -y | |
yum install -y python3 python3-pip | |
pip3 install --upgrade pip | |
- name: Install libraries | |
run: | | |
yum install -y wget git epel-release redhat-lsb-core gcc gcc-c++ make centos-release-scl scl-utils | |
yum install -y jsoncpp-devel gtest-devel openmpi-devel doxygen graphviz boost-program-options | |
yum install -y cmake3 devtoolset-9 environment-modules rpm-build zlib-devel | |
yum install -y rh-git227-git | |
yum install -y libuuid-devel | |
- name: Clone | |
run: | | |
git config --global --add safe.directory ${GITHUB_WORKSPACE} | |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b ${{ steps.branch-name.outputs.current_branch }} . | |
git submodule update --init | |
- name: Install dependencies | |
run: | | |
pip3 install -r requirements-tests.txt | |
pip3 install -r requirements-ui.txt | |
- name: Compile Boost | |
uses: ./.github/workflows/compile-boost | |
with: | |
prefix: "../rte-antares-deps-Release/" | |
- name: Compile tbb | |
uses: ./.github/workflows/compile-tbb | |
with: | |
cmake: 'cmake3' | |
- 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 | |
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=ON -DALLOW_RUN_AS_ROOT=ON | |
- name: Build | |
run: | | |
source /opt/rh/devtoolset-9/enable | |
source /opt/rh/rh-git227/enable | |
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH | |
export PATH=/usr/lib64/openmpi/bin:$PATH | |
cmake3 --build _build --config Release -j2 --target install | |
- name: Running unit tests | |
run: | | |
source /etc/profile.d/modules.sh | |
module load mpi | |
cd _build | |
ctest3 -C Release --output-on-failure -L "unit|benders|lpnamer|medium" | |
- name: .tar.gz creation | |
run: | | |
cd _build | |
cpack3 -G TGZ | |
- name: Installer .rpm creation | |
run: | | |
cd _build | |
cpack3 -G RPM | |
- id: create-single-file | |
name: Single file .tar.gz creation | |
uses: ./.github/workflows/single-file-creation-tgz | |
with: | |
antares-xpansion-version: ${{needs.version.outputs.antares-xpansion-version}} |