-
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.
review build option and update antares solver version to 8.1.0 (#256)
* update antares-solver to 8.1.0 * add sirius and or-tools compilation with antares-solver is build * don't build all not system libs with antares-solver * add CI to test build with deps. build and not precompiled deps * review not needed options * add antares-version.json to docker publish condition * set CMAKE_TOOLCHAIN_FILE as absolute only if defined * correction test on antares-solver build * add endline to force docker publish * cmake policy to define option for BUILD_ortools * don't ask for antares solver build when using pre compiled archive * add endpoint-repo for git2 install * add libuuid-devel for antares-solver compilation * update docker and github action to install rh-git227-git * add comment for git 2.x enable in centos7
- Loading branch information
Showing
15 changed files
with
363 additions
and
26 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 |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: Centos7 CI (system libs + deps. build) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
- release/* | ||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
container: 'centos:7' | ||
|
||
steps: | ||
|
||
- 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 boost-openmpi-devel doxygen graphviz boost-program-options | ||
yum install -y cmake3 devtoolset-7 environment-modules rpm-build zlib-devel | ||
yum install -y rh-git227-git | ||
yum install -y libuuid-devel | ||
- uses: nelonoel/[email protected] | ||
|
||
- name: Checkout | ||
run: | | ||
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b ${BRANCH_NAME} . | ||
- name: Read antares-xpansion version | ||
id: antares-xpansion-version | ||
uses: notiz-dev/github-action-json-property@release | ||
with: | ||
path: 'antares-version.json' | ||
prop_path: 'antares_xpansion_version' | ||
|
||
- name: Init submodule | ||
run: | | ||
git submodule update --init --recursive . | ||
- name: Install dependencies | ||
run: | | ||
pip3 install -r requirements-tests.txt | ||
- name: Configure | ||
run: | | ||
source /opt/rh/devtoolset-7/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 . -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DUSE_MPI=ON -DCMAKE_INSTALL_PREFIX=_install | ||
- name: Build | ||
run: | | ||
source /opt/rh/devtoolset-7/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: | | ||
cd _build | ||
ctest3 -C Release --output-on-failure -L "unit|benders" | ||
- id: create-single-file | ||
name: Single file .tar.gz creation | ||
uses: ./.github/workflows/single-file-creation-tgz | ||
with: | ||
antares-xpansion-version: ${{steps.antares-xpansion-version.outputs.prop}} | ||
|
||
- name: Installer .rpm creation | ||
run: | | ||
cd _build | ||
cpack3 -G RPM | ||
- name: Installer .tar.gz creation | ||
run: | | ||
cd _build | ||
cpack3 -G TGZ | ||
- name: Installer archive upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: antares-xpansion-centos7-archive | ||
path: _build/*.tar.gz | ||
|
||
- name: Installer rpm upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: antares-xpansion-centos7-rpm | ||
path: _build/*.rpm | ||
|
||
- name: Single file upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: antares-xpansion-centos-single-file | ||
path: ${{ steps.create-single-file.outputs.archive-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Ubuntu CI (system libs + deps. build) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
- feature/review_build_option | ||
- release/* | ||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/ccache-action@v1 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip3 install -r requirements-tests.txt | ||
- name: Install libraries | ||
run: | | ||
sudo apt-get update --fix-missing | ||
sudo apt-get install libjsoncpp-dev libgtest-dev libboost-mpi-dev libboost-program-options-dev | ||
cd /usr/src/googletest/ | ||
sudo cmake . | ||
sudo cmake --build . --target install | ||
- name: Read antares-xpansion version | ||
id: antares-xpansion-version | ||
uses: notiz-dev/github-action-json-property@release | ||
with: | ||
path: 'antares-version.json' | ||
prop_path: 'antares_xpansion_version' | ||
|
||
- name: Configure | ||
run: | | ||
cmake -B _build -S . -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DUSE_MPI=ON -DCMAKE_INSTALL_PREFIX=_install | ||
- name: Build | ||
run: | | ||
cmake --build _build --config Release -j2 --target install | ||
- name: Running unit tests | ||
run: | | ||
cd _build | ||
ctest -C Release --output-on-failure -L "medium|unit|benders|lpnamer" | ||
- id: create-single-file | ||
name: Single file .tar.gz creation | ||
uses: ./.github/workflows/single-file-creation-tgz | ||
with: | ||
antares-xpansion-version: ${{steps.antares-xpansion-version.outputs.prop}} | ||
|
||
- name: Installer .tar.gz creation | ||
run: | | ||
cd _build | ||
cpack -G TGZ | ||
- name: Installer .deb creation | ||
run: | | ||
cd _build | ||
cpack -G DEB | ||
- name: Installer upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: antares-xpansion-ubuntu-archive | ||
path: _build/*.tar.gz | ||
|
||
- name: Deb Installer upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: antares-xpansion-ubuntu-deb | ||
path: _build/*.deb | ||
|
||
- name: Single file upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: antares-xpansion-ubuntu-single-file | ||
path: ${{ steps.create-single-file.outputs.archive-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
Oops, something went wrong.