Skip to content

Commit

Permalink
try msvc test_install and fix cygwin test_install
Browse files Browse the repository at this point in the history
  • Loading branch information
yhmtsai committed Mar 17, 2020
1 parent f930368 commit 383131d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 12 deletions.
51 changes: 42 additions & 9 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- name: shared_env
if: matrix.config.shared == 'ON'
run: |
echo "::set-env name=origin_path::$env:PATH"
echo "::add-path::$pwd\build\windows_shared_library"
- name: debug_env
if: matrix.config.build_type == 'Debug'
Expand All @@ -50,6 +51,22 @@ jobs:
cmake -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DGINKGO_BUILD_CUDA=OFF -DGINKGO_BUILD_OMP=OFF ..
cmake --build . -j8 --config ${{ matrix.config.build_type }}
ctest . -C ${{ matrix.config.build_type }}
cmake --install . --config ${{ matrix.config.build_type }}
- name: test_install (allowed failed)
run: |
cd build
cmake --build . --target test_install
continue-on-error: true
- name: install_shared_env
if: matrix.config.shared == 'ON'
run: |
echo "::set-env name=PATH::C:\Program Files (x86)\Ginkgo\lib;$env:origin_path"
echo $env:PATH
- name: test_install
run: |
cd build/test_install
cmake --build . --config ${{ matrix.config.build_type }}
.\${{ matrix.config.build_type }}\test_install.exe
windows_mingw:
strategy:
Expand Down Expand Up @@ -93,28 +110,44 @@ jobs:
name: cygwin/${{ matrix.config.name }}
runs-on: [windows-latest]
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v2
- name: setup
run: |
choco install cygwin -y
choco install cyg-get -y
cyg-get cmake make gcc-g++ git
- name: shared_env
if: matrix.config.shared == 'ON'
- name: add_env
run: |
echo "::add-path::$pwd\build\windows_shared_library"
echo "::set-env name=shared_ON_path::;$pwd\build\windows_shared_library"
echo "::set-env name=shared_OFF_path::"
- name: debug_env
if: matrix.config.build_type == 'Debug'
run: |
echo "::set-env name=CXXFLAGS::-Wa,-mbig-obj"
- name: configure
run: |
path C:\tools\cygwin\bin
path C:\tools\cygwin\bin%shared_${{ matrix.config.shared }}_path%
echo %PATH%
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} ..
make -j8
make test
make install
make test_install
bash -c "cmake -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} .."
bash -c "make -j8"
bash -c "make test"
bash -c "make install"
bash -c "./omp/test/factorization/par_ilu_kernels.exe"
shell: cmd
- name: test_install_shared
if: matrix.config.shared == 'ON'
run: |
path C:\tools\cygwin\bin
cd build
bash -c "export PATH=/usr/local/lib:$PATH && make test_install"
shell: cmd
- name: test_install_static
if: matrix.config.shared == 'OFF'
run: |
path C:\tools\cygwin\bin
cd build
bash -c "make test_install"
shell: cmd
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ add_custom_target(test_install
COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} -H${Ginkgo_SOURCE_DIR}/test_install
-B${Ginkgo_BINARY_DIR}/test_install
-DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX}/${GINKGO_INSTALL_CONFIG_DIR}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
COMMAND ${CMAKE_COMMAND} --build ${Ginkgo_BINARY_DIR}/test_install
COMMAND ${GINKGO_TEST_INSTALL_COMMAND}
COMMENT "Running a test on the installed binaries. This requires running `(sudo) make install` first.")
Expand Down
4 changes: 2 additions & 2 deletions omp/factorization/par_ilu_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,12 @@ void compute_l_u_factors(std::shared_ptr<const OmpExecutor> exec,

if (row > col) { // modify entry in L
auto to_write = sum / vals_u[row_ptrs_u[col + 1] - 1];
if (isfinite(to_write)) {
if (::gko::isfinite(to_write)) {
vals_l[row_l - 1] = to_write;
}
} else { // modify entry in U
auto to_write = sum;
if (isfinite(to_write)) {
if (::gko::isfinite(to_write)) {
vals_u[row_u - 1] = to_write;
}
}
Expand Down

0 comments on commit 383131d

Please sign in to comment.