Skip to content

Commit

Permalink
WIP Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
ErDumont committed Nov 9, 2023
1 parent b5c28f4 commit f1c11cb
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,77 @@ defaults:
shell: bash

jobs:
windows:
name: Windows
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- name: Install Sirius
run: |
curl -o windows-latest_sirius-solver.zip https://github.com/rte-france/sirius-solver/releases/download/antares-integration-v1.4/windows-latest_sirius-solver.zip
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: Checkout sources
uses: actions/checkout@v2

- name: Install Boost via conan
run: |
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-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 }}


linux:
name: Linux xprs=${{ matrix.xprs }}
runs-on: ubuntu-latest
Expand Down

0 comments on commit f1c11cb

Please sign in to comment.