Skip to content

Commit e1fab00

Browse files
committed
Add CPU LibTorch build variant to release workflow
1 parent ba5bd77 commit e1fab00

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,21 @@ permissions:
1010

1111
jobs:
1212
build-x86_64:
13-
name: Build (x86_64)
13+
name: Build (x86_64, ${{ matrix.libtorch_variant }})
1414
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
libtorch_variant: [cu124, cpu]
19+
include:
20+
- libtorch_variant: cu124
21+
libtorch_url: https://download.pytorch.org/libtorch/cu124/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcu124.zip
22+
archive_suffix: -cuda
23+
artifact_suffix: -cuda
24+
- libtorch_variant: cpu
25+
libtorch_url: https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcpu.zip
26+
archive_suffix: ""
27+
artifact_suffix: ""
1528
steps:
1629
- name: Install base dependencies
1730
shell: bash
@@ -35,9 +48,9 @@ jobs:
3548
shell: bash
3649
run: |
3750
set -euo pipefail
38-
curl -LO https://download.pytorch.org/libtorch/cu124/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcu124.zip
39-
unzip libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcu124.zip
40-
rm libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcu124.zip
51+
curl -L "${{ matrix.libtorch_url }}" -o libtorch.zip
52+
unzip libtorch.zip
53+
rm libtorch.zip
4154
libtorch_dir="$(pwd)/libtorch"
4255
echo "LIBTORCH=$libtorch_dir" >> "$GITHUB_ENV"
4356
if [ -n "${LD_LIBRARY_PATH:-}" ]; then
@@ -66,7 +79,7 @@ jobs:
6679
exit 1
6780
fi
6881
69-
archive_name="silero_vad_server-${{ github.ref_name }}-x86_64-unknown-linux-gnu.tar.gz"
82+
archive_name="silero_vad_server-${{ github.ref_name }}-x86_64-unknown-linux-gnu${{ matrix.archive_suffix }}.tar.gz"
7083
mkdir -p dist
7184
cp "$binary_path" dist/silero_vad_server
7285
chmod +x dist/silero_vad_server
@@ -78,7 +91,7 @@ jobs:
7891
- name: Upload artifact
7992
uses: actions/upload-artifact@v4
8093
with:
81-
name: silero_vad_server-x86_64-unknown-linux-gnu
94+
name: silero_vad_server-x86_64-unknown-linux-gnu${{ matrix.artifact_suffix }}
8295
path: ${{ steps.package.outputs.archive }}
8396

8497
build-aarch64:
@@ -171,7 +184,7 @@ jobs:
171184
runs-on: ubuntu-latest
172185
needs:
173186
- build-x86_64
174-
- build-aarch64
187+
# - build-aarch64
175188
steps:
176189
- name: Download artifacts
177190
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)