add more config

This commit is contained in:
coco875
2025-08-06 09:16:54 -06:00
committed by Lywx
parent a53ba76155
commit ba8c71bed3
3 changed files with 14 additions and 4 deletions
+5 -1
View File
@@ -9,13 +9,16 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
config: [Release, Debug]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install cmake ninja-build libbz2-dev
- name: Build
run: |
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config }}
cmake --build build-cmake -j
- name: Create Package
run: |
@@ -23,6 +26,7 @@ jobs:
mv build-cmake/torch torch-release/
cp "$(ldconfig -p | grep libbz2.so.1.0 | tr ' ' '\n' | grep /| head -n1)" torch-release/
- name: Publish packaged artifacts
if: ${{ matrix.config == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: torch-linux-x64
+5 -1
View File
@@ -9,19 +9,23 @@ on:
jobs:
build:
runs-on: macOS-latest
strategy:
matrix:
config: [Release, Debug]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install cmake ninja xcodes
- name: Build
run: |
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config }}
cmake --build build-cmake -j
- name: Create Package
run: |
mkdir torch-release
mv build-cmake/torch torch-release/
- name: Publish packaged artifacts
if: ${{ matrix.config == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: torch-mac-bin
+4 -2
View File
@@ -11,15 +11,17 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
config: [Release, Debug]
toolchain: [v143, clangcl]
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T ${{ matrix.toolchain }} -A x64 -DCMAKE_BUILD_TYPE:STRING=Release
cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T ${{ matrix.toolchain }} -A x64 -DCMAKE_BUILD_TYPE:STRING=${{ matrix.config }}
cmake --build ./build/x64
- name: Publish packaged artifacts
if: ${{ matrix.config == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: torch-windows-x64-${{ matrix.toolchain }}
path: build/x64/Debug/torch.exe
path: build/x64/Release/torch.exe