-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up CUDA Toolkit installation in Window CI
Only install the cuda sub-packages we need. This reduces cuda-toolkit time from 15-20 minutes to a few minutes. Apparently it's very slow to install the visual_studio_integration package. We also use ninja as CMake's generator now.
- Loading branch information
1 parent
4b34f9c
commit 5aa872d
Showing
1 changed file
with
20 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,15 +152,25 @@ jobs: | |
needs: check_changes | ||
if: needs.check_changes.outputs.has_non_docs_changes == 'true' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Jimver/[email protected] | ||
id: cuda-toolkit | ||
with: | ||
cuda: '12.6.1' | ||
sub-packages: '["nvcc", "cudart", "cuda_profiler_api", "cufft_dev", "cusparse_dev", "curand_dev"]' | ||
method: 'network' | ||
use-github-cache: 'false' | ||
- uses: actions/checkout@v4 | ||
- name: Install Ninja | ||
run: | | ||
curl.exe -L -o ninja-win.zip https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip | ||
Expand-Archive -Path ninja-win.zip -DestinationPath . | ||
echo "$pwd" >> $env:GITHUB_PATH | ||
- name: Set Up MSVC | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
- name: Compile | ||
run: | | ||
cmake -S . -B build ` | ||
-G "Ninja" ` | ||
-DCMAKE_VERBOSE_MAKEFILE=ON ` | ||
-DCMAKE_BUILD_TYPE=Release ` | ||
-DAMReX_GPU_BACKEND=CUDA ` | ||
|
@@ -171,6 +181,14 @@ jobs: | |
-DAMReX_LINEAR_SOLVERS=ON ` | ||
-DAMReX_PARTICLES=ON ` | ||
-DAMReX_FORTRAN=OFF ` | ||
-DAMReX_MPI=OFF | ||
-DAMReX_MPI=OFF ` | ||
-DCMAKE_CXX_COMPILER=cl ` | ||
-DCMAKE_CUDA_COMPILER=nvcc | ||
# Sometimes cmake fails, but powershell continues to run | ||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
cmake --build build --config Release -j 4 | ||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | ||
cmake --build build --config Release --target install | ||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } |