.github/workflows/windows.yml: disable cuda build #208
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: Build (Windows) | |
on: | |
push: | |
paths: | |
- 'source/*' | |
- 'cpu_source/*' | |
- 'rtc_source/*' | |
- '.github/workflows/windows.yml' | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'which tag to upload to' | |
default: '' | |
jobs: | |
build-windows: | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: cmd | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Setup Ninja | |
run: pip install ninja | |
- name: Cache CUDA | |
if: false | |
id: cache-cuda | |
uses: actions/cache@v4 | |
with: | |
path: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA | |
key: ${{ runner.os }}-cuda-12.0.0 | |
- name: Setup CUDA | |
if: steps.cache-cuda.outputs.cache-hit != 'true' && false | |
run: | | |
curl -s -o cuda_installer.exe -L https://developer.download.nvidia.com/compute/cuda/12.0.0/network_installers/cuda_12.0.0_windows_network.exe | |
cuda_installer.exe -s nvcc_12.0 cudart_12.0 nvrtc_dev_12.0 | |
- name: Download VapourSynth headers | |
run: | | |
curl -s -o vs.zip -L https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R57.zip | |
unzip -q vs.zip | |
mv vapoursynth-*/ vapoursynth/ | |
- name: Configure (CUDA) | |
if: false | |
shell: bash | |
run: cmake -S . -B build -G Ninja -LA | |
-D CMAKE_BUILD_TYPE=Release | |
-D ENABLE_CUDA=ON | |
-D ENABLE_CPU=OFF | |
-D USE_NVRTC_STATIC=ON | |
-D VAPOURSYNTH_INCLUDE_DIRECTORY="$(pwd)\vapoursynth\include" | |
-D CMAKE_CXX_FLAGS="/fp:fast /arch:AVX /EHsc" | |
-D CMAKE_CUDA_FLAGS="--threads 0 --use_fast_math --resource-usage -Wno-deprecated-gpu-targets" | |
-D CMAKE_CUDA_ARCHITECTURES="50;61-real;70-virtual;75-real;86-real;89-real" | |
-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded | |
env: | |
CUDA_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0 | |
CUDA_PATH_V12_0: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0 | |
- name: Build (CUDA) | |
if: false | |
run: cmake --build build --verbose | |
- name: Install (CUDA) | |
if: false | |
run: cmake --install build --prefix install | |
- name: Setup LLVM | |
shell: bash | |
run: | | |
curl -s -o llvm-win64.exe -LJO https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/LLVM-15.0.6-win64.exe | |
7z x -ollvm llvm-win64.exe | |
- name: Configure, build, install (CPU) | |
shell: bash | |
run: for arch in haswell skylake icelake-client alderlake znver1 znver2 znver3; do | |
cmake -S . -B build_cpu -G Ninja -LA | |
-D CMAKE_BUILD_TYPE=Release | |
-D ENABLE_CUDA=OFF | |
-D ENABLE_CPU=ON | |
-D VAPOURSYNTH_INCLUDE_DIRECTORY="$(pwd)\vapoursynth\include" | |
-D CMAKE_CXX_COMPILER="$(pwd)/llvm/bin/clang++.exe" | |
-D CMAKE_CXX_FLAGS="-mtune=${arch} -ffast-math" | |
-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded | |
&& cmake --build build_cpu --verbose | |
&& cmake --install build_cpu --prefix temp | |
&& mv temp/bin/bm3dcpu.dll install/bin/bm3dcpu-${arch}.dll -v; | |
done | |
- name: Prepare for upload | |
run: | | |
mkdir artifact | |
copy install\bin\*.dll artifact | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: VapourSynth-BM3DCUDA-Windows | |
path: artifact | |
- name: Compress artifact for release | |
if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' && false | |
run: | | |
cd artifact | |
mkdir VapourSynth-BM3DCUDA-${{ github.event.inputs.tag }} | |
xcopy bm3dcuda.dll VapourSynth-BM3DCUDA-${{ github.event.inputs.tag }} /f | |
7z a -t7z -mx=9 ../VapourSynth-BM3DCUDA-${{ github.event.inputs.tag }}.7z VapourSynth-BM3DCUDA-${{ github.event.inputs.tag }} | |
mkdir VapourSynth-BM3DCUDA_RTC-${{ github.event.inputs.tag }} | |
xcopy bm3dcuda_rtc.dll VapourSynth-BM3DCUDA_RTC-${{ github.event.inputs.tag }} /f | |
7z a -t7z -mx=9 ../VapourSynth-BM3DCUDA_RTC-${{ github.event.inputs.tag }}.7z VapourSynth-BM3DCUDA_RTC-${{ github.event.inputs.tag }} | |
mkdir VapourSynth-BM3DCPU-${{ github.event.inputs.tag }} | |
xcopy bm3dcpu-*.dll VapourSynth-BM3DCPU-${{ github.event.inputs.tag }} /f | |
7z a -t7z -mx=9 ../VapourSynth-BM3DCPU-${{ github.event.inputs.tag }}.7z VapourSynth-BM3DCPU-${{ github.event.inputs.tag }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' | |
with: | |
tag_name: ${{ github.event.inputs.tag }} | |
files: | | |
VapourSynth-BM3DCUDA-${{ github.event.inputs.tag }}.7z | |
VapourSynth-BM3DCUDA_RTC-${{ github.event.inputs.tag }}.7z | |
VapourSynth-BM3DCPU-${{ github.event.inputs.tag }}.7z | |
fail_on_unmatched_files: true | |
generate_release_notes: false | |
prerelease: true |