Fix CUDA version in Windows builds #738
Workflow file for this run
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: C++ Testing | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
gtest: | |
runs-on: ubuntu-latest | |
env: | |
MKL_VERSION: 2023.1.0 | |
steps: | |
- name: Checkout repostiory | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup packages | |
uses: ./.github/actions/setup | |
- name: Configure | |
run: | | |
pip install mkl==${MKL_VERSION} mkl-include==${MKL_VERSION} mkl-devel==${MKL_VERSION} | |
export _BLAS_INCLUDE_DIR=`python -c 'import os;import sysconfig;data=sysconfig.get_path("data");print(f"{data}{os.sep}include")'` | |
export LIBS_DIR=`python -c 'import os;import sysconfig;data=sysconfig.get_path("data");print(f"{data}{os.sep}lib")'` | |
export MKL_DIR=`python -c 'import os;import sysconfig;data=sysconfig.get_path("data");print(f"{data}{os.sep}lib{os.sep}cmake{os.sep}mkl")'` | |
cd $LIBS_DIR | |
for library in `ls *.so.2`; do | |
ln -s ${library} ${library::-2} || true | |
done | |
cd - | |
mkdir build | |
cd build | |
Torch_DIR=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` cmake .. -GNinja -DBUILD_TEST=ON -DWITH_COV=ON -DCMAKE_BUILD_TYPE=DEBUG -DUSE_MKL_BLAS=ON -DBLAS_INCLUDE_DIR=$_BLAS_INCLUDE_DIR -DMKL_DIR=${MKL_DIR} | |
unset _BLAS_INCLUDE_DIR | |
cd .. | |
- name: Build | |
run: | | |
cd build | |
cmake --build . | |
cd .. | |
- name: Run tests | |
run: | | |
cd build | |
ctest --verbose --output-on-failure | |
cd .. | |
- name: Collect coverage | |
run: | | |
sudo apt-get install lcov | |
lcov --directory . --capture --output-file .coverage.info | |
lcov --remove .coverage.info '*/test/*' --output-file .coverage.info | |
- name: Upload coverage | |
uses: codecov/codecov-action@v2 | |
with: | |
files: .coverage.info | |
fail_ci_if_error: false |