Skip to content

Commit 378843a

Browse files
committed
ci : try using Ninja instead of msbuild
1 parent e3ced85 commit 378843a

File tree

1 file changed

+6
-29
lines changed

1 file changed

+6
-29
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ jobs:
4040
variant: sccache
4141
evict-old-files: 1d
4242

43-
- name: Configure CUDA compilation cache
44-
run: |
45-
New-Item -Path "${{ github.workspace }}\cuda_cache" -ItemType Directory -Force
46-
echo "CUDA_CACHE_PATH=${{ github.workspace }}\cuda_cache" | Out-File -FilePath $env:GITHUB_ENV -Append
47-
echo "CUDA_CACHE_MAXSIZE=4294967296" | Out-File -FilePath $env:GITHUB_ENV -Append
48-
4943
- name: Install Cuda Toolkit 11.8.0
5044
if: ${{ matrix.cuda-toolkit == '11.8.0' }}
5145
run: |
@@ -104,20 +98,14 @@ jobs:
10498
echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2.0" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
10599
echo "CUDA_PATH_V12_2=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2.0" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
106100
107-
- name: Cache CUDA compilation results
108-
uses: actions/cache@v3
109-
with:
110-
path: ${{ github.workspace }}/cuda_cache
111-
key: cuda-cache-${{ runner.os }}-${{ matrix.cuda-toolkit }}-${{ hashFiles('**/*.cu', '**/*.cuh') }}
112-
restore-keys: |
113-
cuda-cache-${{ runner.os }}-${{ matrix.cuda-toolkit }}-
114-
115-
- name: Add msbuild to PATH
116-
uses: microsoft/setup-msbuild@v2
117-
118101
- name: Install 7-Zip
119102
run: choco install 7zip -y
120103

104+
- name: Install Ninja
105+
id: install_ninja
106+
run: |
107+
choco install ninja
108+
121109
- name: Fetch SDL2 and set SDL2_DIR
122110
if: matrix.sdl2 == 'ON'
123111
run: |
@@ -126,28 +114,18 @@ jobs:
126114
echo "SDL2_DIR=${{ github.workspace }}\SDL2-${{ matrix.sdl2_ver }}\cmake" | Out-File -FilePath $env:GITHUB_ENV -Append
127115
echo "${{ github.workspace }}\SDL2-${{ matrix.sdl2_ver }}\cmake" > SDL2_PATH.txt
128116
129-
- name: Create CMake CUDA compiler toolchain file
130-
shell: cmd
131-
run: |
132-
echo SET(CMAKE_CUDA_COMPILER_LAUNCHER sccache) > cuda_toolchain.cmake
133-
echo SET(CMAKE_CUDA_COMPILER "%CUDA_PATH%/bin/nvcc.exe") >> cuda_toolchain.cmake
134-
135117
- name: Configure CMake
136118
shell: cmd
137119
run: |
138-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
139120
set "CUDACXX=sccache %CUDA_PATH%\bin\nvcc.exe"
140-
cmake -S . -B ./build -A ${{ matrix.arch }} ^
121+
cmake -S . -B build -G "Ninja Multi-Config" ^
141122
-DCMAKE_BUILD_TYPE=${{ matrix.build }} ^
142-
-DCMAKE_TOOLCHAIN_FILE=cuda_toolchain.cmake ^
143123
-DGGML_CUDA=${{ matrix.cublas }} ^
144124
-DCMAKE_CUDA_ARCHITECTURES=all ^
145125
-DWHISPER_SDL2=${{ matrix.sdl2 }} ^
146126
-DCMAKE_CUDA_COMPILER_LAUNCHER=sccache ^
147127
-DCMAKE_C_COMPILER_LAUNCHER=sccache ^
148128
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^
149-
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded ^
150-
-DCMAKE_POLICY_CMP0141=NEW ^
151129
-DSDL2_DIR="%SDL2_DIR%"
152130
153131
- name: Check sccache status after build
@@ -157,7 +135,6 @@ jobs:
157135
- name: Build Project
158136
shell: cmd
159137
run: |
160-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
161138
cd ./build
162139
cmake --build . --config ${{ matrix.build }} -j %NUMBER_OF_PROCESSORS%
163140

0 commit comments

Comments
 (0)