mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
add more config
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user