WIP Windows build #12
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: CI-cpp | |
on: [push] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install Sirius | |
run: | | |
curl -L -o windows-latest_sirius-solver.zip https://github.com/rte-france/sirius-solver/releases/download/antares-integration-v1.4/windows-latest_sirius-solver.zip | |
dir | |
unzip windows-latest_sirius-solver.zip | |
mv windows-latest_sirius-solver-install sirius_install | |
export SIRIUS_INSTALL_PATH=$(pwd)/sirius_install | |
export SIRIUS=$(pwd)/sirius_install/bin | |
- name: Install Boost via conan | |
run: | | |
cd powsybl-metrix/metrix-simulator | |
pip3 install conan=='1.61.0' | |
conan install -if build -pr:b default -pr:h default . --build missing --build outdated --settings build_type=Release | |
- name: Configure 3rd parties | |
working-directory: metrix-simulator | |
run: | | |
cmake -S external \ | |
-B build/external \ | |
-DCMAKE_BUILD_TYPE=Release | |
- name: Build 3rd parties | |
working-directory: metrix-simulator | |
run: cmake --build build/external --parallel 2 --config Release | |
- name: Configure CMake | |
working-directory: metrix-simulator | |
run: | | |
cmake -S . \ | |
-B build \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=build/install \ | |
-DINSTALL_CMAKE_DIR=. \ | |
-DUSE_ORTOOLS=ON | |
- name: Build | |
working-directory: metrix-simulator | |
run: cmake --build build --target install --parallel 2 --config Release | |
- name: Tests | |
working-directory: metrix-simulator/build | |
run: ctest -j8 --output-on-failure | |
- name: Prepare metrix install | |
id: metrix-install | |
working-directory: metrix-simulator/build | |
run: | | |
[ ${{ matrix.xprs }} == "ON" ] && ARCHIVE_NAME=metrix_xprs || ARCHIVE_NAME=metrix | |
ARCHIVE_PATH="${{ github.workspace }}/metrix-simulator/build/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 }} |