Adds tests for windows-latest on cmake.yml

This commit is contained in:
Weslley S Pereira
2023-05-24 17:25:42 -06:00
parent 0c44dd4a6c
commit 633440e5d5
2 changed files with 16 additions and 12 deletions
+12 -10
View File
@@ -4,7 +4,7 @@ on:
push:
branches:
- master
- try-github-actions
- try-github-actions-for-windows
paths:
- .github/workflows/cmake.yml
- '**CMakeLists.txt'
@@ -62,7 +62,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ macos-latest, ubuntu-latest ]
os: [ macos-latest, ubuntu-latest, windows-latest ]
fflags: [
"-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all",
"-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all -fopenmp" ]
@@ -72,26 +72,28 @@ jobs:
- name: Checkout LAPACK
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3
- name: Use GCC-11 on MacOS
if: ${{ matrix.os == 'macos-latest' }}
run: >
cmake -B build
cmake -B build -G Ninja
-D CMAKE_C_COMPILER="gcc-11"
-D CMAKE_Fortran_COMPILER="gfortran-11"
-D USE_FLAT_NAMESPACE:BOOL=ON
# - name: Use Unix Makefiles on Windows
# if: ${{ matrix.os == 'windows-latest' }}
# run: >
# cmake -B build
# -G "Unix Makefiles"
# -D CMAKE_C_FLAGS="${{env.CFLAGS}} -Wl,--stack=1000000000"
- name: Special flags for Windows
if: ${{ matrix.os == 'windows-latest' }}
run: >
cmake -B build -G Ninja
-D CMAKE_EXE_LINKER_FLAGS="-Wl,--allow-multiple-definition,--stack=1000000000"
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B build
cmake -B build -G Ninja
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
-D CBLAS:BOOL=ON
+4 -2
View File
@@ -4,11 +4,13 @@
#######################################################################
macro(add_cblas_test output input target)
set(TEST_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${input}")
if(NOT "${input}" STREQUAL "")
set(TEST_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${input}")
endif()
set(TEST_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${output}")
set(testName "${target}")
if(EXISTS "${TEST_INPUT}")
if(DEFINED TEST_INPUT AND EXISTS "${TEST_INPUT}")
add_test(NAME CBLAS-${testName} COMMAND "${CMAKE_COMMAND}"
-DTEST=$<TARGET_FILE:${target}>
-DINPUT=${TEST_INPUT}