Feature/sunadjoint #2970
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: Build and Test - Windows/mingw (short) | |
on: | |
pull_request: | |
merge_group: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build_and_test: | |
runs-on: windows-latest | |
defaults: | |
run: | |
# Use MSYS2 as default shell | |
shell: msys2 {0} | |
strategy: | |
matrix: | |
msystem: [MINGW64, MINGW32] | |
include: | |
- msystem: MINGW64 | |
target-prefix: mingw-w64-x86_64 | |
- msystem: MINGW32 | |
target-prefix: mingw-w64-i686 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.msystem }} | |
update: true | |
release: false | |
install: >- | |
base-devel | |
${{ matrix.target-prefix }}-cmake | |
${{ matrix.target-prefix }}-gcc | |
${{ matrix.target-prefix }}-gcc-fortran | |
${{ matrix.target-prefix }}-openblas | |
${{ matrix.target-prefix }}-suitesparse | |
- name: Configure CMake (Static) | |
# Configure CMake in a 'build' subdirectory | |
run: | | |
cmake \ | |
-G "MSYS Makefiles" \ | |
-B ${GITHUB_WORKSPACE}/build_static \ | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ | |
-DCMAKE_C_FLAGS=-Wno-deprecated-declarations \ | |
-DBUILD_FORTRAN_MODULE_INTERFACE=ON \ | |
-DBUILD_SHARED_LIBS=OFF \ | |
-DSUNDIALS_BUILD_WITH_PROFILING=ON \ | |
-DSUNDIALS_LOGGING_LEVEL=2 \ | |
-DSUNDIALS_TEST_UNITTESTS=OFF \ | |
-DEXAMPLES_ENABLE_CXX=ON \ | |
-DENABLE_KLU=ON | |
- name: Build (Static) | |
# Build program | |
run: cmake --build ${GITHUB_WORKSPACE}/build_static --verbose | |
- name: Test (Static) | |
working-directory: ${{github.workspace}}/build_static | |
# Execute tests | |
run: ctest --output-on-failure | |
# TODO(CJB): shared libraries with the fortran interfaces turned on | |
# fail to link correctly with this toolchain see https://github.com/LLNL/sundials/issues/507. | |
- name: Configure CMake (Shared) | |
# Configure CMake in a 'build' subdirectory | |
run: | | |
cmake \ | |
-G "MSYS Makefiles" \ | |
-B ${GITHUB_WORKSPACE}/build_shared \ | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ | |
-DCMAKE_C_FLAGS=-Wno-deprecated-declarations \ | |
-DBUILD_FORTRAN_MODULE_INTERFACE=OFF \ | |
-DBUILD_STATIC_LIBS=OFF \ | |
-DSUNDIALS_BUILD_WITH_PROFILING=ON \ | |
-DSUNDIALS_LOGGING_LEVEL=2 \ | |
-DSUNDIALS_TEST_UNITTESTS=OFF \ | |
-DEXAMPLES_ENABLE_CXX=ON \ | |
-DENABLE_KLU=ON | |
- name: Build (Shared) | |
# Build program | |
run: cmake --build ${GITHUB_WORKSPACE}/build_shared --verbose | |
- name: Test (Shared) | |
working-directory: ${{github.workspace}}/build_shared | |
# Execute tests | |
run: ctest --output-on-failure |