docs: 重构文档信息架构并简化CI工作流 #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CMAKE_BUILD_TYPE: Release | |
| jobs: | |
| format-check: | |
| name: Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Check C/C++/CUDA formatting | |
| uses: jidicula/clang-format-action@v4.13.0 | |
| with: | |
| clang-format-version: '17' | |
| check-path: '.' | |
| exclude-regex: '(^|/)(build|\.git)(/|$)' | |
| configure-cpu: | |
| name: Configure CPU Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install build tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake ninja-build g++ | |
| - name: Configure without CUDA | |
| run: | | |
| cmake -S . -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \ | |
| -DTC_ENABLE_CUDA=OFF \ | |
| -DTC_BUILD_TESTS=OFF \ | |
| -DTC_BUILD_BENCHMARKS=OFF \ | |
| -DTC_BUILD_PYTHON=OFF \ | |
| -DTC_BUILD_DOCS=OFF | |
| - name: Verify install rules | |
| run: cmake --install build --prefix "$RUNNER_TEMP/tensorcraft-install" |