short name of toolchain

This commit is contained in:
coco875
2025-08-06 09:16:54 -06:00
committed by Lywx
parent a2d8818a60
commit edd75fc809
3 changed files with 16 additions and 16 deletions
+5 -5
View File
@@ -13,24 +13,24 @@ jobs:
matrix:
config: [Release, Debug]
standalone: [OFF, ON]
toolchain: [cmake/toolchain/linux-gnu.cmake, cmake/toolchain/linux-clang.cmake]
toolchain: [linux-gnu, linux-clang]
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 }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }}
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }} -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/${{ matrix.toolchain }}.cmake
cmake --build build-cmake -j
- name: Create Package
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' }}
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' && matrix.toolchain == 'linux-gnu' }}
run: |
mkdir torch-release
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' && matrix.standalone == 'ON' }}
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' && matrix.toolchain == 'linux-gnu' }}
uses: actions/upload-artifact@v4
with:
name: torch-linux-x64-${{ matrix.toolchain }}
name: torch-linux-x64
path: torch-release
+7 -7
View File
@@ -13,33 +13,33 @@ jobs:
matrix:
config: [Release, Debug]
standalone: [OFF, ON]
toolchain: [cmake/toolchain/macos-clang.cmake, cmake/toolchain/macos-clang-llvm.cmake, cmake/toolchain/macos-gnu.cmake]
toolchain: [macos-clang, macos-clang-llvm, macos-gnu]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install cmake ninja xcodes
- name: Download llvm
if: ${{ matrix.toolchain == 'cmake/toolchain/macos-clang-llvm.cmake' }}
if: ${{ matrix.toolchain == 'macos-clang-llvm' }}
run: |
brew install llvm lld
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
- name: Download gnu
if: ${{ matrix.toolchain == 'cmake/toolchain/macos-gnu.cmake' }}
if: ${{ matrix.toolchain == 'macos-gnu' }}
run: |
brew install gcc
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 }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }}
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }} -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/${{ matrix.toolchain }}.cmake
cmake --build build-cmake -j
- name: Create Package
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' }}
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' && matrix.toolchain == 'macos-clang' }}
run: |
mkdir torch-release
mv build-cmake/torch torch-release/
- name: Publish packaged artifacts
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' }}
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' && matrix.toolchain == 'macos-clang' }}
uses: actions/upload-artifact@v4
with:
name: torch-mac-bin-${{ matrix.toolchain }}
name: torch-mac-bin
path: torch-release
+4 -4
View File
@@ -12,19 +12,19 @@ jobs:
strategy:
matrix:
config: [Release, Debug]
toolchain: [cmake/toolchain/windows-msvc.cmake, cmake/toolchain/windows-clang-cl.cmake]
toolchain: [windows-msvc, windows-clang-cl]
standalone: [OFF, ON]
generate: [Visual Studio 17 2022, Ninja]
arch: [x64, Win32]
exclude:
- toolchain: cmake/toolchain/windows-clang-cl.cmake
- toolchain: windows-clang-cl
arch: Win32
steps:
- uses: actions/checkout@v4
- name: Build Visual Studio
if: ${{ matrix.generate == 'Visual Studio 17 2022' }}
run: |
cmake -S . -B "build/${{ matrix.arch }}" -G "${{ matrix.generate }}" -DCMAKE_TOOLCHAIN_FILE="${{ matrix.toolchain }}" -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DCMAKE_BUILD_TYPE:STRING=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }}
cmake -S . -B "build/${{ matrix.arch }}" -G "${{ matrix.generate }}" -DCMAKE_TOOLCHAIN_FILE="cmake/toolchain/${{ matrix.toolchain }}.cmake" -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DCMAKE_BUILD_TYPE:STRING=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }}
cmake --build ./build/${{ matrix.arch }}
- name: Setup Variables
if: ${{ matrix.generate == 'Ninja' }}
@@ -34,7 +34,7 @@ jobs:
- name: Build Ninja
if: ${{ matrix.generate == 'Ninja' }}
run: |
cmake -S . -B "build/${{ matrix.arch }}" -G "${{ matrix.generate }}" -DCMAKE_TOOLCHAIN_FILE="${{ matrix.toolchain }}" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }}
cmake -S . -B "build/${{ matrix.arch }}" -G "${{ matrix.generate }}" -DCMAKE_TOOLCHAIN_FILE="cmake/toolchain/${{ matrix.toolchain }}.cmake" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }}
cmake --build ./build/${{ matrix.arch }}
- name: Publish packaged artifacts
if: ${{ matrix.config == 'Release' && matrix.generate == 'Visual Studio 17 2022' && matrix.standalone == 'ON' }}