Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ jobs:
set(VCPKG_MAX_CONCURRENCY 2)
EOF

- name: Cache LibTorch
id: cache-libtorch
uses: actions/cache@v4
with:
path: external/libtorch
key: libtorch-2.7.0-cu128-${{ runner.os }}

- name: Download LibTorch 2.7.0 (CUDA 12.8 build)
if: steps.cache-libtorch.outputs.cache-hit != 'true'
run: |
mkdir -p external
cd ..
curl -L https://download.pytorch.org/libtorch/cu128/libtorch-cxx11-abi-shared-with-deps-2.7.0%2Bcu128.zip -o libtorch.zip
unzip libtorch.zip -d $GITHUB_WORKSPACE/external

- name: Cache ccache
uses: actions/cache@v4
with:
Expand All @@ -87,6 +102,7 @@ jobs:
cmake -B build -S . -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc
-DBUILD_TESTS=ON

- name: Build
run: cmake --build build -j 2
19 changes: 18 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ jobs:
.\vcpkg\bootstrap-vcpkg.bat -disableMetrics
Add-Content -Path "$env:VCPKG_ROOT\triplets\x64-windows.cmake" -Value "set(VCPKG_MAX_CONCURRENCY 2)"

- name: Cache LibTorch
id: cache-libtorch
uses: actions/cache@v4
with:
path: external/${{ matrix.build_type == 'Debug' && 'debug' || 'release' }}/libtorch
key: libtorch-2.7.0-cu128-${{ matrix.build_type }}-${{ runner.os }}

- name: Download LibTorch 2.7.0 (CUDA 12.8 build)
if: steps.cache-libtorch.outputs.cache-hit != 'true'
run: |
$folder = if ("${{ matrix.build_type }}" -eq "Debug") { "debug" } else { "release" }
$zip = if ("${{ matrix.build_type }}" -eq "Debug") { "libtorch-win-shared-with-deps-debug-2.7.0%2Bcu128.zip" } else { "libtorch-win-shared-with-deps-2.7.0%2Bcu128.zip" }
mkdir "external\$folder" -Force
cd ..
Invoke-WebRequest -Uri "https://download.pytorch.org/libtorch/cu128/$zip" -OutFile libtorch.zip -Verbose
Expand-Archive libtorch.zip -DestinationPath "$env:GITHUB_WORKSPACE\external\$folder"

- name: Cache vcpkg
uses: actions/cache@v4
with:
Expand All @@ -58,7 +75,7 @@ jobs:
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_UNICODE_TEST_ONLY=ON
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_TESTS=ON

- name: Build
shell: cmd
Expand Down
Loading