same for linux

This commit is contained in:
coco875
2025-08-06 09:16:54 -06:00
committed by Lywx
parent 95e7d360c1
commit 1712046e9d
4 changed files with 11 additions and 4 deletions
+3 -2
View File
@@ -13,13 +13,14 @@ jobs:
matrix:
config: [Release, Debug]
standalone: [OFF, ON]
toolchain: [cmake/toolchain/linux-gnu.cmake, cmake/toolchain/linux-clang.cmake]
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=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }}
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }}
cmake --build build-cmake -j
- name: Create Package
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' }}
@@ -31,5 +32,5 @@ jobs:
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' }}
uses: actions/upload-artifact@v4
with:
name: torch-linux-x64
name: torch-linux-x64-${{ matrix.toolchain }}
path: torch-release
+2 -2
View File
@@ -30,7 +30,7 @@ jobs:
echo "/opt/homebrew/opt/gcc/bin" >> $GITHUB_PATH
- name: Build
run: |
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }}
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }}
cmake --build build-cmake -j
- name: Create Package
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' }}
@@ -41,5 +41,5 @@ jobs:
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' }}
uses: actions/upload-artifact@v4
with:
name: torch-mac-bin
name: torch-mac-bin-${{ matrix.toolchain }}
path: torch-release
+3
View File
@@ -0,0 +1,3 @@
set(CMAKE_C_COMPILER /usr/bin/clang)
set(CMAKE_CXX_COMPILER /usr/bin/clang++)
set(CMAKE_LINKER /usr/bin/ld)
+3
View File
@@ -0,0 +1,3 @@
set(CMAKE_C_COMPILER /usr/bin/gcc)
set(CMAKE_CXX_COMPILER /usr/bin/g++)
set(CMAKE_LINKER /usr/bin/ld)