Skip to content

[WIP] Refactoring of the reformulation chain #447

[WIP] Refactoring of the reformulation chain

[WIP] Refactoring of the reformulation chain #447

Workflow file for this run

name: Unit tests
on:
push:
branches: [ "main" ]
paths-ignore:
- '*.md'
- 'LICENSE'
- '*.cff'
- '*.yml'
- '*.yaml'
- 'docs/**'
pull_request:
branches: [ "main" ]
paths-ignore:
- '*.md'
- 'LICENSE'
- '*.cff'
- '*.yml'
- '*.yaml'
- 'docs/**'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# ---------- LINUX ----------
- os: ubuntu-latest
build_type: Debug
shell: bash
- os: ubuntu-24.04-arm
build_type: Debug
shell: bash
# ---------- MACOS ----------
- os: macos-latest
build_type: Debug
shell: bash
- os: macos-15-intel
build_type: Debug
shell: bash
# ---------- WINDOWS MINGW ----------
- os: windows-latest
build_type: Debug
shell: msys2 {0}
env:
BUILD_TYPE: ${{ matrix.build_type }}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- uses: actions/checkout@v4
# ---------------- MACOS FORTRAN ----------------
- name: Install Fortran (macOS)
if: startsWith(matrix.os, 'macos')
uses: fortran-lang/setup-fortran@main
with:
compiler: 'gcc'
version: '14'
# ---------------- WINDOWS MINGW ----------------
- name: Install MinGW
if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
path-type: inherit
msystem: MINGW64
update: true
install: |
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-cmake
mingw-w64-x86_64-make
# ---------------- DEPENDENCIES ----------------
- name: Download dependencies
run: bash dependencies/scripts/download_dependencies.sh
# ---------------- CONFIGURE ----------------
- name: Configure CMake (Unix)
if: matrix.os != 'windows-latest'
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DENABLE_TESTS=ON \
-DMUMPS_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DMETIS_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DBQPD=${{github.workspace}}/dependencies/lib/libbqpd.a \
-DMETIS_LIBRARY=${{github.workspace}}/dependencies/lib/libmetis.a \
-DMUMPS_LIBRARY=${{github.workspace}}/dependencies/lib/libdmumps.a \
-DMUMPS_COMMON_LIBRARY=${{github.workspace}}/dependencies/lib/libmumps_common.a \
-DMUMPS_PORD_LIBRARY=${{github.workspace}}/dependencies/lib/libpord.a \
-DMUMPS_MPISEQ_LIBRARY=${{github.workspace}}/dependencies/lib/libmpiseq.a \
-DBLAS_LIBRARIES="${{github.workspace}}/dependencies/lib/libblas.a;${{github.workspace}}/dependencies/lib/libcblas.a" \
-DLAPACK_LIBRARIES=${{github.workspace}}/dependencies/lib/liblapack.a \
-DHIGHS=${{github.workspace}}/dependencies/lib/libhighs.a \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_SHARED_LIBS=OFF .
- name: Configure CMake (Windows MinGW)
if: matrix.os == 'windows-latest'
shell: cmd
run: |
cmake -G "MinGW Makefiles" ^
-S . -B build ^
-DENABLE_TESTS=ON ^
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc ^
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ ^
-DCMAKE_Fortran_COMPILER=x86_64-w64-mingw32-gfortran ^
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ^
-DMUMPS_INCLUDE_DIR=${{github.workspace}}\dependencies\include ^
-DMETIS_INCLUDE_DIR=${{github.workspace}}\dependencies\include ^
-DBQPD=${{github.workspace}}\dependencies\lib\libbqpd.a ^
-DMETIS_LIBRARY=${{github.workspace}}\dependencies\lib\libmetis.a ^
-DMUMPS_LIBRARY=${{github.workspace}}\dependencies\lib\libdmumps.a ^
-DMUMPS_COMMON_LIBRARY=${{github.workspace}}\dependencies\lib\libmumps_common.a ^
-DMUMPS_PORD_LIBRARY=${{github.workspace}}\dependencies\lib\libpord.a ^
-DMUMPS_MPISEQ_LIBRARY=${{github.workspace}}\dependencies\lib\libmpiseq.a ^
-DBLAS_LIBRARIES="${{github.workspace}}\dependencies\lib\libblas.a;${{github.workspace}}\dependencies\lib\libcblas.a" ^
-DLAPACK_LIBRARIES=${{github.workspace}}\dependencies\lib\liblapack.a ^
-DHIGHS=${{github.workspace}}\dependencies\lib\libhighs.a ^
-DBUILD_STATIC_LIBS=ON ^
-DBUILD_SHARED_LIBS=OFF .
# ---------------- BUILD ----------------
- name: Build
run: cmake --build build --target run_unotest --config ${{env.BUILD_TYPE}} -j4
# ---------------- TEST ----------------
- name: Run tests
working-directory: build
run: ./run_unotest