Fix doc compilation (#716) #650
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: | |
docker_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v32 | |
with: | |
files: | | |
docker/centos7-system-deps | |
- 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/rte-antares | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
workdir: docker | |
dockerfile: centos7-system-deps | |
cache: false | |
tags: centos7-system-deps | |
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/[email protected] | |
- 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: [ docker_publish, versions ] | |
container: 'antaresrte/rte-antares:centos7-system-deps' | |
steps: | |
- id: branch-name | |
uses: tj-actions/branch-names@v6 | |
- uses: actions/[email protected] | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
pip3 install wheel #Does not work in requirements | |
pip3 install -r requirements-tests.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: Setup cmake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.22.x' | |
- name: Configure | |
run: | | |
source /opt/rh/devtoolset-9/enable | |
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH | |
export PATH=/usr/lib64/openmpi/bin:$PATH | |
cmake -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 | |
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH | |
export PATH=/usr/lib64/openmpi/bin:$PATH | |
cmake --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}} |