forked from powsybl/powsybl-metrix
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: arnaud <[email protected]>
- Loading branch information
Showing
2 changed files
with
79 additions
and
1 deletion.
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,78 @@ | ||
name: CI-cpp-centos7 | ||
|
||
on: | ||
workflow_dispatch: {} | ||
push: {} | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
linux: | ||
name: Linux | ||
runs-on: ubuntu-latest | ||
container: 'centos:centos7' | ||
steps: | ||
- name: Install Dependancies | ||
run: | | ||
yum update -y | ||
yum install -y epel-release | ||
yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils | ||
yum install -y devtoolset-9 | ||
- name: Setup cmake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: '3.22.x' | ||
|
||
- name: Checkout sources | ||
uses: actions/checkout@v1 | ||
|
||
- name: Download Boost-release | ||
uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: 'ARnDOSrte/Boost' | ||
file: 'boost_1_73_0.zip' | ||
target: 'boost_1_73_0.zip' | ||
token: ${{ secrets.TEST_TOKEN_RELEASE }} | ||
|
||
- name: Unzip Boost | ||
run: unzip boost_1_73_0.zip | ||
|
||
- name: Configure 3rd parties | ||
run: | | ||
source /opt/rh/devtoolset-9/enable | ||
cmake -S $GITHUB_WORKSPACE/metrix-simulator/external -B $GITHUB_WORKSPACE/metrix-simulator/build-centos7/external | ||
- name: Build 3rd parties | ||
run: | | ||
cmake --build $GITHUB_WORKSPACE/metrix-simulator/build-centos7/external --parallel 2 | ||
- name: Configure CMake | ||
run: | | ||
source /opt/rh/devtoolset-9/enable | ||
cmake -S $GITHUB_WORKSPACE/metrix-simulator -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=$GITHUB_WORKSPACE/__w/Boost/Boost/boost_1_73_0/installBoost -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/metrix-simulator/build-centos7/install -B $GITHUB_WORKSPACE/metrix-simulator/build-centos7 | ||
- name: Build | ||
run: cmake --build $GITHUB_WORKSPACE/metrix-simulator/build-centos7 --target install --parallel 2 | ||
|
||
- name: Tests | ||
run: cd $GITHUB_WORKSPACE/metrix-simulator/build-centos7 && ctest -j2 --output-on-failure | ||
|
||
- name: Prepare Metrix install | ||
if: github.event_name == 'workflow_dispatch' | ||
id: metrix-install | ||
run: | | ||
ARCHIVE_NAME="metrix-simulator-centos7.zip" | ||
ARCHIVE_PATH="$PWD/${ARCHIVE_NAME}" | ||
zip $ARCHIVE_PATH /__w/powsybl-metrix/powsybl-metrix/metrix-simulator/build-centos7/install/bin/metrix-simulator | ||
echo "::set-output name=archive_name::$ARCHIVE_NAME" | ||
echo "::set-output name=archive_path::$ARCHIVE_PATH" | ||
- name: Upload OR-Tools install artifact | ||
if: github.event_name == 'workflow_dispatch' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.metrix-install.outputs.archive_name }} | ||
path: ${{ steps.metrix-install.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