check if cmake 3.29.4+ is required for cuda detection. #57
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
# Windows builds. | |
name: Windows | |
on: | |
push: | |
paths: | |
- "**" | |
- "!.github/**" | |
- ".github/workflows/Windows.yml" | |
- "!scripts" | |
- "scripts/install_cuda_windows.ps1" | |
- "!*.md" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
# explicit include-based build matrix, of known valid options | |
matrix: | |
include: | |
# - os: windows-2022 | |
# cuda: "12.5.0" | |
# visual_studio: "Visual Studio 17 2022" | |
- os: windows-2022 | |
cuda: "12.4.0" | |
visual_studio: "Visual Studio 17 2022" | |
cmake: "3.29.4" | |
- os: windows-2022 | |
cuda: "12.3.0" | |
visual_studio: "Visual Studio 17 2022" | |
cmake: "3.29.4" | |
- os: windows-2022 | |
cuda: "12.4.0" | |
visual_studio: "Visual Studio 17 2022" | |
cmake: "3.29.0" | |
- os: windows-2022 | |
cuda: "12.3.0" | |
visual_studio: "Visual Studio 17 2022" | |
cmake: "3.29.0" | |
# Windows-2022 & VS 2022 supports 11.6+ | |
# - os: windows-2022 | |
# cuda: "12.0.0" | |
# visual_studio: "Visual Studio 17 2022" | |
# - os: windows-2022 | |
# cuda: "11.8.0" | |
# visual_studio: "Visual Studio 17 2022" | |
# - os: windows-2022 | |
# cuda: "11.7.0" | |
# visual_studio: "Visual Studio 17 2022" | |
# - os: windows-2022 | |
# cuda: "11.6.0" | |
# visual_studio: "Visual Studio 17 2022" | |
# # Windows-2019 & VS 2019 supports 10.1+ | |
# - os: windows-2019 | |
# cuda: "11.5.0" | |
# visual_studio: "Visual Studio 16 2019" | |
# - os: windows-2019 | |
# cuda: "11.4.0" | |
# visual_studio: "Visual Studio 16 2019" | |
# - os: windows-2019 | |
# cuda: "11.3.0" | |
# visual_studio: "Visual Studio 16 2019" | |
# - os: windows-2019 | |
# cuda: "11.2.0" | |
# visual_studio: "Visual Studio 16 2019" | |
# - os: windows-2019 | |
# cuda: "11.1.0" | |
# visual_studio: "Visual Studio 16 2019" | |
# - os: windows-2019 | |
# cuda: "11.0.1" | |
# visual_studio: "Visual Studio 16 2019" | |
# - os: windows-2019 | |
# cuda: "10.2.89" | |
# visual_studio: "Visual Studio 16 2019" | |
# - os: windows-2019 | |
# cuda: "10.1.243" | |
# visual_studio: "Visual Studio 16 2019" | |
env: | |
build_dir: "build" | |
config: "Release" | |
CMAKE: ${{ matrix.cmake }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install CUDA | |
env: | |
cuda: ${{ matrix.cuda }} | |
visual_studio: ${{ matrix.visual_studio }} | |
shell: powershell | |
run: .\scripts\actions\install_cuda_windows.ps1 | |
- name: nvcc check | |
shell: powershell | |
run: | | |
nvcc -V | |
ls $env:CUDA_PATH | |
ls $env:CUDA_PATH\bin | |
ls $env:CUDA_PATH\include | |
- name: Install cmake from GitHub Releases | |
if: ${{ env.CMAKE != '' && env.CMAKE != 'default' }} | |
working-directory: ${{ runner.temp }} | |
run: | | |
wget -q https://github.com/Kitware/CMake/releases/download/v${{ env.CMAKE }}/cmake-${{ env.CMAKE }}-linux-x86_64.tar.gz | |
tar -zxvf cmake-${{ env.CMAKE }}-linux-x86_64.tar.gz | |
# Inner directory case changes in some releases, use find to get the right path | |
echo "$(dirname $(find $(pwd) -wholename "*/bin/cmake" -exec echo {} \; -quit))" >> $GITHUB_PATH | |
- name: cmake version | |
shell: bash | |
run: cmake --version | |
- name: Configure CMake | |
id: configure | |
shell: bash | |
run: cmake . -B ${{ env.build_dir }} -G "${{ matrix.visual_studio }}" -A x64 -DCMAKE_CUDA_FLAGS="--allow-unsupported-compiler" | |
- name: Configure Error Processing | |
if: ${{ (failure() && steps.configure.outcome == 'failure') || success() }} | |
shell: bash | |
run: | | |
if [[ -d "${{ env.build_dir }}" ]]; then | |
pushd "${{ env.build_dir }}" | |
if [[ -f "CMakeFiles/CMakeOutput.log" ]]; then | |
echo "---- CMakeFiles/CMakeOutput.log" | |
cat CMakeFiles/CMakeOutput.log | |
echo "----" | |
fi | |
if [[ -f "CMakeFiles/CMakeError.log" ]]; then | |
echo "---- CMakeFiles/CMakeError.log" | |
cat CMakeFiles/CMakeError.log | |
echo "----" | |
fi | |
fi | |
- name: Build | |
working-directory: ${{ env.build_dir }} | |
run: cmake --build . --config ${{ env.config }} --target ALL_BUILD --verbose |