1414 strategy :
1515 fail-fast : false
1616 matrix :
17- os : [windows-latest , ubuntu-latest]
17+ os : [windows-2022 , ubuntu-latest]
1818 config : [debug, release, profile, checked]
1919
2020 steps :
@@ -25,61 +25,78 @@ jobs:
2525 ref : 107.0-physx-5.6.0
2626
2727 # === WINDOWS ===
28+ - name : Install CUDA Toolkit (Windows)
29+ if : runner.os == 'Windows'
30+ uses : Jimver/cuda-toolkit@v0.2.35
31+ with :
32+ cuda : ' 12.5.0'
33+ method : network
34+ sub-packages : ' ["nvcc", "cudart", "visual_studio_integration"]'
35+ log-file-suffix : ' ${{ matrix.os }}-${{ matrix.config }}.txt'
36+
2837 - name : Download preset (Windows)
29- if : matrix .os == 'windows-latest '
38+ if : runner .os == 'Windows '
3039 run : |
31- curl -L -o vc17win64-cpu-only- md.xml https://raw.githubusercontent.com/Lumengine/PhysXBuild/main/vc17win64-cpu-only -md.xml
32- cp vc17win64-cpu-only -md.xml ./physx/buildtools/presets/public/
40+ curl -L -o vc17win64-gpu- md.xml https://raw.githubusercontent.com/Lumengine/PhysXBuild/main/vc17win64-gpu -md.xml
41+ cp vc17win64-gpu -md.xml ./physx/buildtools/presets/public/
3342
3443 - name : Generate Projects (Windows)
35- if : matrix .os == 'windows-latest '
36- run : ./generate_projects.bat vc17win64-cpu-only -md
44+ if : runner .os == 'Windows '
45+ run : ./generate_projects.bat vc17win64-gpu -md
3746 working-directory : physx
3847
3948 - name : Build (Windows)
40- if : matrix .os == 'windows-latest '
41- run : cmake --build ./compiler/vc17win64-cpu-only -md --config ${{ matrix.config }}
49+ if : runner .os == 'Windows '
50+ run : cmake --build ./compiler/vc17win64-gpu -md --config ${{ matrix.config }}
4251 working-directory : physx
4352
4453 - name : Package (Windows)
45- if : matrix .os == 'windows-latest '
54+ if : runner .os == 'Windows '
4655 id : package-windows
4756 shell : bash
4857 run : |
49- mkdir -p output/bin output/lib
50- binArchiveName="PhysX -5.6.0.win.x86_64.vc143.md.${{ matrix.config }}.zip"
58+ mkdir -p output/bin output/lib output/include output/documentation
59+ binArchiveName="Physx -5.6.0.win.x86_64.vc143.md.${{ matrix.config }}.zip"
5160 echo "PHYSX_BINARY_ARCHIVE=$binArchiveName" >> "$GITHUB_OUTPUT"
5261 cp physx/bin/win.x86_64.vc143.md/${{ matrix.config }}/*.dll output/bin/
5362 cp physx/bin/win.x86_64.vc143.md/${{ matrix.config }}/*.lib output/lib/
54- 7z a "$binArchiveName" ./output/bin/ ./output/lib/ ./physx/include/ ./physx/documentation/
63+ cp -r physx/include/* output/include/
64+ cp -r physx/documentation/* output/documentation/ 2>/dev/null || true
65+ if [ -n "${CUDA_PATH:-}" ]; then
66+ cuda_bin="$(cygpath -u "$CUDA_PATH")/bin"
67+ cp "$cuda_bin"/cudart64_*.dll output/bin/ 2>/dev/null || true
68+ fi
69+ test -f output/bin/PhysXGpu_64.dll
70+ test -f output/bin/PhysXDevice64.dll
71+ (cd output && 7z a "../$binArchiveName" ./bin/ ./lib/ ./include/ ./documentation/)
5572
5673 # === LINUX ===
5774 - name : Install dependencies (Linux)
58- if : matrix .os == 'ubuntu-latest '
75+ if : runner .os == 'Linux '
5976 run : |
6077 sudo apt update
6178 sudo apt install -y ninja-build cmake clang python3
6279
6380 - name : Download preset (Linux)
64- if : matrix .os == 'ubuntu-latest '
81+ if : runner .os == 'Linux '
6582 run : |
6683 curl -L -o linux-clang-cpu-only-nosnippets.xml https://raw.githubusercontent.com/Lumengine/PhysXBuild/main/linux-clang-cpu-only-nosnippets.xml
6784 cp linux-clang-cpu-only-nosnippets.xml ./physx/buildtools/presets/public/
6885
6986 - name : Generate Projects (Linux)
70- if : matrix .os == 'ubuntu-latest '
87+ if : runner .os == 'Linux '
7188 run : |
7289 chmod +x ./generate_projects.sh
7390 ./generate_projects.sh linux-clang-cpu-only-nosnippets
7491 working-directory : physx
7592
7693 - name : Build (Linux)
77- if : matrix .os == 'ubuntu-latest '
94+ if : runner .os == 'Linux '
7895 run : cmake --build ./compiler/linux-clang-cpu-only-nosnippets-${{ matrix.config }}
7996 working-directory : physx
8097
8198 - name : Package (Linux)
82- if : matrix .os == 'ubuntu-latest '
99+ if : runner .os == 'Linux '
83100 id : package-linux
84101 run : |
85102 mkdir -p output/lib output/include output/documentation
0 commit comments