Skip to content

4)TD&HVDC AR preventive #76

4)TD&HVDC AR preventive

4)TD&HVDC AR preventive #76

Workflow file for this run

name: CI-cpp
on: [push]
defaults:
run:
shell: bash
jobs:
linux:
name: Linux xprs=${{ matrix.xprs }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
xprs: [ON, OFF]
steps:
- name: Install Boost
run: |
sudo apt-get update -y
sudo apt-get install -y libboost-all-dev
- name: Checkout sources
uses: actions/checkout@v2
- name: Setup xpress env
if: ${{ matrix.xprs == 'ON' }}
run: |
echo "XPRESSDIR=${{ github.workspace }}/xpressmp813" >> $GITHUB_ENV
echo "XPRESS=${{ github.workspace }}/xpressmp813/bin" >> $GITHUB_ENV
- name: Checkout Xpress linux
if: ${{ matrix.xprs == 'ON' }}
uses: actions/checkout@v2
with:
repository: jdarlay/xpressmp813Lin
path: ${{ env.XPRESSDIR }}
ref: master
token: ${{ secrets.ACCESS_TOKEN }}
- name: Configure 3rd parties
working-directory: metrix-simulator
run: |
cmake -S external \
-B build-linux/external \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_XPRESS=${{ matrix.xprs }} \
-DXPRESS_ROOT="${{ env.XPRESSDIR }}"
- name: Build 3rd parties
working-directory: metrix-simulator
run: cmake --build build-linux/external --parallel 2
- name: Configure CMake
working-directory: metrix-simulator
run: |
cmake -S . \
-B build-linux \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=build-linux/install \
-DINSTALL_CMAKE_DIR=. \
-DUSE_ORTOOLS=ON \
-DUSE_XPRESS=${{ matrix.xprs }} \
-DXPRESS_ROOT="${{ env.XPRESSDIR }}"
- name: Build
working-directory: metrix-simulator
run: cmake --build build-linux --target install --parallel 2
- name: Tests
working-directory: metrix-simulator/build-linux
run: ctest -j8 --output-on-failure
- name: Prepare metrix install
id: metrix-install
working-directory: metrix-simulator/build-linux
run: |
[ ${{ matrix.xprs }} == "ON" ] && ARCHIVE_NAME=metrix_xprs || ARCHIVE_NAME=metrix
ARCHIVE_PATH="${{ github.workspace }}/metrix-simulator/build-linux/install"
echo "::set-output name=archive_name::$ARCHIVE_NAME"
echo "::set-output name=archive_path::$ARCHIVE_PATH"
- name: Upload metrix install artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.metrix-install.outputs.archive_name }}
path: ${{ steps.metrix-install.outputs.archive_path }}