Add cross-build support to cuda-toolkit 12.9 #46
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] | |
| pull_request: | |
| jobs: | |
| create-recipes: | |
| name: create-recipes (${{ matrix.os }}, cuda ${{ matrix.cuda-version }}${{ matrix.cross-arch != '' && format(', native + cross-{0}', matrix.cross-arch) || '' }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| cuda-version: "12.9" | |
| - os: ubuntu-latest | |
| cuda-version: "13.0" | |
| - os: ubuntu-latest | |
| cuda-version: "13.2" | |
| - os: ubuntu-latest | |
| cuda-version: "13.3" | |
| - os: ubuntu-24.04-arm | |
| cuda-version: "13.2" | |
| - os: ubuntu-24.04-arm | |
| cuda-version: "13.3" | |
| # Windows: | |
| # cuda <13.2 requires Visual Studio 2022, available on windows-2022 runner | |
| - os: windows-2022 | |
| cuda-version: "12.9" | |
| cross-arch: "armv8" # test x86_64 -> arm64 cross-building, in addition to native | |
| - os: windows-2022 | |
| cuda-version: "13.0" | |
| # cuda >=13.2 can run on windows-latest (Visual Studio 2026) | |
| - os: windows-latest | |
| cuda-version: "13.2" | |
| - os: windows-latest | |
| cuda-version: "13.3" | |
| # 13.4.0-preview developer preview: Windows x86_64 and arm64 | |
| - os: windows-11-arm | |
| cuda-version: "13.4" | |
| cross-arch: "x86_64" # test arm64 -> x86_64 cross-building, in addition to native | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Conan | |
| uses: conan-io/setup-conan@v1 | |
| with: | |
| profile_detect: false | |
| - name: Autodetect conan profile | |
| run: conan profile detect --name autodetected | |
| - name: Install Conan profile config | |
| run: conan config install .github/conan-config -t dir | |
| - name: conan create cuda-toolkit | |
| run: conan create recipes/cuda-toolkit/${{ matrix.cuda-version }} && conan cache clean "*" | |
| - name: conan create cuda-toolkit (cross-building for ${{ matrix.cross-arch }}) | |
| if: matrix.cross-arch != '' | |
| run: conan create recipes/cuda-toolkit/${{ matrix.cuda-version }} -s arch=${{ matrix.cross-arch }} && conan cache clean "*" | |
| - name: conan test cuda-toolkit (cross-building for ${{ matrix.cross-arch }}) | |
| if: matrix.cross-arch != '' | |
| run: conan test recipes/cuda-toolkit/${{ matrix.cuda-version }}/test_package cuda-toolkit/13.4.0-preview -s arch=${{ matrix.cross-arch }} -c tools.cmake.cmaketoolchain:generator=Ninja | |
| - name: build cuda-samples | |
| if: (matrix.cuda-version == '13.2' || (matrix.cuda-version == '13.4' && startsWith(matrix.os, 'windows'))) | |
| working-directory: samples/cuda-samples | |
| run: | | |
| conan source . | |
| conan install . --build=missing -cc core.version_ranges:resolve_prereleases=True | |
| conan build . -cc core.version_ranges:resolve_prereleases=True | |
| # Build llama-cpp for Windows arm64, both natively and crossbuilt from x86_64 | |
| - name: conan create llama-cpp | |
| if: matrix.cuda-version == '13.4' && startsWith(matrix.os, 'windows') | |
| working-directory: samples/llama-cpp | |
| run: conan create all --version=b6565 -cc core.version_ranges:resolve_prereleases=True --build=missing -pr clang-cl-arm64 | |
| # Skip the following for 13.4-preview | |
| - name: conan create cudnn | |
| if: matrix.cuda-version != '13.4' && !contains(matrix.os, '-arm') | |
| run: conan create recipes/cudnn/9.x --version 9.24.0 --build=missing | |
| - name: conan create cudnn-frontend | |
| if: matrix.cuda-version != '13.4' && !contains(matrix.os, '-arm') | |
| run: conan create recipes/cudnn-frontend/all --version 1.12.1 | |
| - name: conan create cudss | |
| if: matrix.cuda-version != '13.4' && !contains(matrix.os, '-arm') | |
| run: conan create recipes/cudss/0.7.1 --version 0.7.1 | |
| - name: conan create cusparselt | |
| if: matrix.cuda-version != '13.4' && !contains(matrix.os, '-arm') | |
| run: conan create recipes/cusparselt/0.8.1 --version 0.8.1 | |
| - name: conan create cutlass | |
| if: matrix.cuda-version != '13.4' && !contains(matrix.os, '-arm') | |
| run: conan create recipes/cutlass/all --version 4.3.5 |