Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cenit committed Feb 20, 2021
1 parent fd6ea9b commit 8f3cd28
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 61 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
useVcpkgToolchainFile: true
buildDirectory: '${{ runner.workspace }}/buildDirectory'
cmakeBuildType: 'Release'
cmakeAppendedArgs: "-DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=OFF"
cmakeAppendedArgs: "-DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release"
buildWithCMakeArgs: '--target install'

- uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: '${{ runner.workspace }}/buildDirectory'
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release -DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF"
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release -DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
cmakeBuildType: 'Release'
buildWithCMakeArgs: '--target install'

Expand Down Expand Up @@ -371,7 +371,7 @@ jobs:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: '${{ runner.workspace }}/buildDirectory'
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release -DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF"
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release -DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
cmakeBuildType: 'Release'
buildWithCMakeArgs: '--target install'

Expand Down Expand Up @@ -440,7 +440,7 @@ jobs:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: '${{ runner.workspace }}/buildDirectory'
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=OFF"
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
cmakeBuildType: 'Release'
buildWithCMakeArgs: '--config Release --target install'

Expand Down Expand Up @@ -480,7 +480,7 @@ jobs:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: '${{ runner.workspace }}/buildDirectory'
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release -DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF"
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release -DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
cmakeBuildType: 'Release'
buildWithCMakeArgs: '--config Release --target install'

Expand Down Expand Up @@ -510,7 +510,7 @@ jobs:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: '${{ runner.workspace }}/buildDirectory'
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=ON"
cmakeAppendedArgs: "-DCMAKE_BUILD_TYPE=Release -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
cmakeBuildType: 'Release'
buildWithCMakeArgs: '--config Release --target install'

Expand All @@ -529,6 +529,6 @@ jobs:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: '${{ runner.workspace }}/buildDirectory'
cmakeAppendedArgs: "-G\"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=OFF"
cmakeAppendedArgs: "-G\"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
cmakeBuildType: 'Release'
buildWithCMakeArgs: '--config Release --target install'
61 changes: 7 additions & 54 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ matrix:
name: macOS - gcc (llvm backend)
osx_image: xcode12.3
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- additional_defines=" -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
- MATRIX_EVAL=""

- os: osx
Expand Down Expand Up @@ -47,15 +47,15 @@ matrix:
name: macOS - clang
osx_image: xcode12.3
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- additional_defines=" -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
- MATRIX_EVAL=""

- os: osx
compiler: clang
name: macOS - clang - C++ mode
osx_image: xcode12.3
env:
- additional_defines="-DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF"
- additional_defines="-DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
- MATRIX_EVAL=""

- os: osx
Expand Down Expand Up @@ -92,38 +92,28 @@ matrix:
- additional_defines=" -DENABLE_CUDA=OFF"
- MATRIX_EVAL="brew install opencv libomp"

- os: osx
name: macOS - clang - vcpkg
osx_image: xcode12.3
env:
- additional_defines="-DBUILD_SHARED_LIBS=OFF -DENABLE_CUDA=OFF"
- MATRIX_EVAL="brew install yasm nasm libomp && unset CC && unset CXX"
- USE_VCPKG=true
- VCPKG_ROOT="$HOME/vcpkg"
- VCPKG_DEFINES="-DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake"

- os: linux
compiler: clang
dist: bionic
name: ubuntu 18.04 - clang
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- additional_defines=" -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
- MATRIX_EVAL=""

- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - gcc
env:
- additional_defines=" -DENABLE_CUDA=OFF"
- additional_defines=" -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
- MATRIX_EVAL=""

- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - g++
env:
- additional_defines="-DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF"
- additional_defines="-DBUILD_AS_CPP:BOOL=TRUE -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
- MATRIX_EVAL=""

- os: linux
Expand Down Expand Up @@ -188,31 +178,6 @@ matrix:
- LD_LIBRARY_PATH="/usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64:/usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs:${LD_LIBRARY_PATH}"
- MATRIX_EVAL="wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.2.89-1_amd64.deb && sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo dpkg -i cuda-repo-ubuntu1804_10.2.89-1_amd64.deb && wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb && sudo dpkg -i nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb && sudo apt-get -y update && sudo apt-get install -y --no-install-recommends cuda-compiler-10-2 cuda-libraries-dev-10-2 cuda-driver-dev-10-2 cuda-cudart-dev-10-2 cuda-curand-dev-10-2 && sudo apt-get install -y --no-install-recommends libcudnn7-dev && sudo ln -s /usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs/libcuda.so.1"

- os: linux
compiler: gcc
dist: bionic
name: ubuntu 18.04 - gcc - CUDA 10 - vcpkg
addons:
apt:
update: true
packages:
- yasm
- nasm
env:
- additional_defines="-DBUILD_SHARED_LIBS=OFF"
- USE_VCPKG=true
- VCPKG_ROOT="$HOME/vcpkg"
- VCPKG_DEFINES="-DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake"
- INSTALL_CUDA_VERSION="10.2"
- CUDACXX=/usr/local/cuda-${INSTALL_CUDA_VERSION}/bin/nvcc
- CUDA_PATH=/usr/local/cuda-${INSTALL_CUDA_VERSION}
- CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-${INSTALL_CUDA_VERSION}
- LD_LIBRARY_PATH="/usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64:/usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs:${LD_LIBRARY_PATH}"
- MATRIX_EVAL="wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.2.89-1_amd64.deb && sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo dpkg -i cuda-repo-ubuntu1804_10.2.89-1_amd64.deb && wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb && sudo dpkg -i nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb && sudo apt-get -y update && sudo apt-get install -y --no-install-recommends cuda-compiler-10-2 cuda-libraries-dev-10-2 cuda-driver-dev-10-2 cuda-cudart-dev-10-2 cuda-curand-dev-10-2 && sudo apt-get install -y --no-install-recommends libcudnn7-dev && sudo ln -s /usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs/libcuda.so /usr/local/cuda-${INSTALL_CUDA_VERSION}/lib64/stubs/libcuda.so.1"

allow_failures:
- name: macOS - clang - vcpkg

before_install:
- travis_retry eval "${MATRIX_EVAL}"

Expand All @@ -221,23 +186,11 @@ install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-Linux-x86_64.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then tar -xzf cmake-3.19.2-Linux-x86_64.tar.gz ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then export PATH=$PWD/cmake-3.19.2-Linux-x86_64/bin:$PATH ; fi
- pushd $HOME
- if [ -d "$HOME/vcpkg/.git" ] ; then echo vcpkg cached ; else rm -rf vcpkg ; git clone https://github.com/Microsoft/vcpkg ; fi
- cd vcpkg
- git checkout .
- git pull
- if [ "${USE_VCPKG}" = true ] ; then ./bootstrap-vcpkg.sh ; fi
- if [ "${USE_VCPKG}" = true ] ; then echo "set(VCPKG_BUILD_TYPE release)" >> triplets/x64-osx.cmake ; fi
- if [ "${USE_VCPKG}" = true ] ; then echo "set(VCPKG_BUILD_TYPE release)" >> triplets/x64-linux.cmake ; fi
- if [ "${USE_VCPKG}" = true ] ; then rm -rf buildtrees; fi
- if [ "${USE_VCPKG}" = true ] ; then rm -rf installed; fi
- if [ "${USE_VCPKG}" = true ] ; then rm -rf packages; fi
- popd

before_script:
- mkdir build_release
- cd build_release
- travis_wait 50 cmake .. -DCMAKE_BUILD_TYPE="Release" ${additional_defines}
- cmake .. -DCMAKE_BUILD_TYPE="Release" ${additional_defines}
- cd ..

script:
Expand Down
8 changes: 8 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ if (-Not($enable_cuda)) {
$additional_build_setup = $additional_build_setup + " -DENABLE_CUDA:BOOL=OFF"
}

if (-Not($enable_cudnn)) {
$additional_build_setup = $additional_build_setup + " -DENABLE_CUDNN:BOOL=OFF"
}

if (-Not($enable_opencv)) {
$additional_build_setup = $additional_build_setup + " -DENABLE_OPENCV:BOOL=OFF"
}

if ($use_vcpkg) {
New-Item -Path .\build_win_release -ItemType directory -Force
Set-Location build_win_release
Expand Down
10 changes: 10 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ number_of_build_workers=8
use_vcpkg=false
force_cpp_build=false
enable_cuda=false
enable_cudnn=false
enable_opencv=false

if [[ "$OSTYPE" == "darwin"* ]]; then
vcpkg_triplet="x64-osx"
Expand Down Expand Up @@ -40,6 +42,14 @@ if [ "$enable_cuda" = false ]
then
additional_build_setup=${additional_build_setup}" -DENABLE_CUDA:BOOL=FALSE"
fi
if [ "$enable_cudnn" = false ]
then
additional_build_setup=${additional_build_setup}" -DENABLE_CUDNN:BOOL=FALSE"
fi
if [ "$enable_opencv" = false ]
then
additional_build_setup=${additional_build_setup}" -DENABLE_OPENCV:BOOL=FALSE"
fi

## DEBUG
#mkdir -p build_debug
Expand Down

0 comments on commit 8f3cd28

Please sign in to comment.