-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into release/1.4.0
- Loading branch information
Showing
284 changed files
with
224,693 additions
and
15,525 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,198 +46,94 @@ jobs: | |
cache: false | ||
tags: 1.1.1 | ||
|
||
versions: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
antares-version: ${{steps.antares-version.outputs.result}} | ||
antares-xpansion-version: ${{steps.antares-xpansion-version.outputs.result}} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- 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' | ||
|
||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: [ docker_publish, versions ] | ||
container: 'antaresrte/xpansion-centos7:1.1.1' | ||
env: | ||
VCPKG_ROOT: ${{ github.workspace }}/vcpkg | ||
ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools | ||
ORTOOLS_URL: "https://github.com/rte-france/or-tools-rte/releases/download/v9.11-rte1.1/ortools_cxx_centos7_static_sirius.zip" | ||
|
||
needs: [ docker_publish ] | ||
outputs: | ||
TGZ_NAME: ${{ steps.export_output.outputs.TGZ_NAME }} | ||
SINGLE_FILE_NAME: ${{ steps.export_output.outputs.SINGLE_FILE_NAME }} | ||
|
||
TGZ_NAME: ${{ steps.get-archives.outputs.TGZ_NAME }} | ||
SINGLE_FILE_NAME: ${{ steps.get-archives.outputs.SINGLE_FILE_NAME }} | ||
steps: | ||
- run: | | ||
source /opt/rh/devtoolset-11/enable | ||
echo $PATH >> $GITHUB_PATH | ||
- name: Get release | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
id: get_release | ||
uses: bruceadams/[email protected] | ||
|
||
- uses: actions/checkout@v3 #Keep at 3 | ||
with: | ||
submodules: true | ||
|
||
- run: | | ||
yum install -y nodejs | ||
- name: Setup cmake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: '3.28.x' | ||
|
||
- name: Download pre-compiled librairies | ||
uses: ./.github/workflows/download-extract-precompiled-libraries-tgz | ||
- uses: actions/checkout@master | ||
with: | ||
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: repo update | ||
run: | | ||
yum update | ||
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo | ||
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo | ||
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo | ||
- name: Install dependencies | ||
run: | | ||
pip3 install --upgrade pip | ||
pip3 install wheel #Does not work in requirements | ||
pip3 install -r requirements-tests.txt | ||
pip3 install -r requirements-ui.txt | ||
fetch-depth: 0 | ||
sparse-checkout: | | ||
docker | ||
src/vcpkg.json | ||
ref: ${{ env.REF }} | ||
|
||
|
||
- name: Set-up Xpress with pip for centos 7 | ||
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: vcpkg install | ||
- name: create vcpkg cache dir | ||
run: | | ||
git config --global safe.directory '*' | ||
git submodule update --remote --init vcpkg | ||
pushd vcpkg | ||
git fetch --unshallow | ||
./bootstrap-vcpkg.sh -disableMetrics | ||
echo "VCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg" >> $GITHUB_ENV | ||
echo "VCPKG_CACHE_DIR=$GITHUB_WORKSPACE/vcpkg_cache" >> $GITHUB_ENV | ||
echo "VCPKG_BINARY_SOURCES=clear;files,$GITHUB_WORKSPACE/vcpkg_cache,readwrite" >> $GITHUB_ENV | ||
mkdir -p ${{ github.workspace }}/vcpkg_cache | ||
- name: Restore vcpkg binary dir from cache | ||
id: cache-vcpkg-binary | ||
uses: actions/cache/restore@v3 | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ${{ env.VCPKG_CACHE_DIR }} | ||
key: vcpkg-cache-centOS-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} | ||
path: ${{ github.workspace }}/vcpkg_cache | ||
key: vcpkg-cache-centos7-${{ hashFiles('vcpkg.json', '.git/modules/vcpkg/HEAD') }} | ||
# Allows to restore a cache when deps have only partially changed (like adding a dependency) | ||
restore-keys: vcpkg-cache-centOS- | ||
|
||
- name: Configure | ||
run: | | ||
source /opt/rh/devtoolset-11/enable | ||
cmake -B _build -S . \ | ||
-DBUILD_TESTING=ON \ | ||
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/deps;${{env.ORTOOLS_DIR}}/install" \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=_install \ | ||
-DBUILD_UI=ON \ | ||
-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) | ||
restore-keys: vcpkg-cache-centos7- | ||
|
||
- name: Tests with Cucumber | ||
uses: ./.github/workflows/cucumber-tests | ||
- name: Setup ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
# feature: "features/outer_loop_tests.feature" | ||
mpi_path: ${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux-release/tools/openmpi/bin | ||
key: centos7-on-${{ runner.os }} | ||
|
||
- name: Cache vcpkg binary dir | ||
if: always() | ||
id: save-cache-vcpkg-binary | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: ${{ env.VCPKG_CACHE_DIR }} | ||
key: vcpkg-cache-centOS-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }} | ||
|
||
- name: Running unit tests | ||
timeout-minutes: 120 | ||
shell: bash | ||
- name: set env variables -- DockerFiles | ||
run: | | ||
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" | ||
echo "DOCKERFILE=$(pwd)/docker/centos7-build" >> $GITHUB_ENV | ||
echo "DOCKERDIR=$(pwd)/docker" >> $GITHUB_ENV | ||
####################### | ||
- name: Install | ||
- name: Build the image and Antares-Xpansion | ||
run: | | ||
ls -latr .ccache/ | ||
echo "-------------" | ||
docker build \ | ||
-t antaresxpansion:centos7 \ | ||
--build-arg="BRANCH=${{ github.ref_name }}" \ | ||
--build-arg="NPROC=$(nproc)" \ | ||
--build-arg="VCPKG_CACHE_DIR=./vcpkg_cache" \ | ||
--build-arg CCACHE_DIR=./.ccache \ | ||
--build-arg CCACHE_KEY=centos7-on-${{ runner.os }} \ | ||
-f ${{ env.DOCKERFILE }} . | ||
- name: create a container without starting it && retrieve archive dir | ||
id: get-archives | ||
run: | | ||
cd _build | ||
cmake --install . | ||
container_id=$(docker create antaresxpansion:centos7) | ||
docker cp $container_id:/workspace/antares-xpansion/archive archive | ||
echo "TGZ_NAME=$(basename "$(ls ./archive/multiple/*.tar.gz)")" >> $GITHUB_OUTPUT | ||
echo "SINGLE_FILE_NAME=$(basename "$(ls ./archive/single/*.tar.gz)")" >> $GITHUB_OUTPUT | ||
docker cp $container_id:/workspace/vcpkg_cache ${{ env.VCPKG_CACHE_DIR }} | ||
docker cp $container_id:/workspace/.ccache/. .ccache | ||
ls -la .ccache | ||
docker rm $container_id | ||
- id: create-single-file | ||
name: Single file .tar.gz creation | ||
uses: ./.github/workflows/single-file-creation-tgz | ||
- name: Cache vcpkg binary dir | ||
if: always() | ||
id: save-cache-vcpkg-binary | ||
uses: actions/cache/save@v4 | ||
with: | ||
antares-xpansion-version: ${{needs.versions.outputs.antares-xpansion-version}} | ||
|
||
- name: Installer .tar.gz creation | ||
run: | | ||
cd _build | ||
export FILE_NAME="antaresXpansion-${{needs.versions.outputs.antares-xpansion-version}}-CentOS-7.9.2009" | ||
cpack -G TGZ -D CPACK_PACKAGE_FILE_NAME=$FILE_NAME | ||
#Need to differentiate between xpress/no_xpress files | ||
#Cpack command line doesn't seem to care about -P or -R options | ||
echo "TGZ_NAME=$FILE_NAME.tar.gz" >> $GITHUB_ENV | ||
path: ${{ github.workspace }}/vcpkg_cache | ||
key: vcpkg-cache-centos7-${{ hashFiles('vcpkg.json', '.git/modules/vcpkg/HEAD') }} | ||
|
||
- name: Upload .tar.gz | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{env.TGZ_NAME}} | ||
path: _build/${{env.TGZ_NAME}} | ||
path: archive/single | ||
name: ${{ steps.get-archives.outputs.SINGLE_FILE_NAME }} | ||
|
||
- name: Upload single file | ||
uses: actions/upload-artifact@v3 | ||
- name: Upload .tar.gz | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.create-single-file.outputs.archive-name }} | ||
path: ${{ steps.create-single-file.outputs.archive-path }} | ||
path: archive/multiple | ||
name: ${{ steps.get-archives.outputs.TGZ_NAME }} | ||
|
||
- name: export asset name in output | ||
id: export_output | ||
run: | | ||
echo "TGZ_NAME=${{env.TGZ_NAME}}" >> $GITHUB_OUTPUT | ||
echo "SINGLE_FILE_NAME=${{ steps.create-single-file.outputs.archive-name }}" >> $GITHUB_OUTPUT | ||
|
||
####################### | ||
##################### | ||
userguide: | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
runs-on: ubuntu-latest | ||
|
@@ -291,7 +187,7 @@ jobs: | |
needs: [ build, build_running_image ] | ||
steps: | ||
- name: Download build assets | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{needs.build.outputs.TGZ_NAME}} | ||
|
||
|
@@ -338,7 +234,7 @@ jobs: | |
needs: [ build, build_running_image ] | ||
steps: | ||
- name: Download build assets | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{needs.build.outputs.SINGLE_FILE_NAME}} | ||
|
||
|
@@ -392,13 +288,13 @@ jobs: | |
path: docs/ | ||
|
||
- name: Download build assets | ||
uses: actions/download-artifact@v3 #build use v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{needs.build.outputs.TGZ_NAME}} | ||
path: _build/ | ||
|
||
- name: Download build assets single file | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{needs.build.outputs.SINGLE_FILE_NAME}} | ||
path: . | ||
|
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
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
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
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
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
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
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
Oops, something went wrong.