Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Adds tests for windows-latest on cmake.yml
  • Loading branch information
weslleyspereira committed May 24, 2023
commit 633440e5d501c15704e1d9f33475be2a5db2edaf
22 changes: 12 additions & 10 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
- try-github-actions
- try-github-actions-for-windows
paths:
- .github/workflows/cmake.yml
- '**CMakeLists.txt'
Expand Down Expand Up @@ -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" ]
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions CBLAS/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down