From f13145281a1f53d4f852efc46aa4b93a80dcba25 Mon Sep 17 00:00:00 2001 From: Cloud Han Date: Thu, 23 Mar 2023 12:52:37 +0800 Subject: [PATCH 1/4] Linearize combinations from product(os, cuda-version) for fine-grind control --- .github/workflows/build-tests.yaml | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-tests.yaml b/.github/workflows/build-tests.yaml index 290f796e..cb3d4706 100644 --- a/.github/workflows/build-tests.yaml +++ b/.github/workflows/build-tests.yaml @@ -8,38 +8,38 @@ on: jobs: test: - name: "Test Examples Build (CUDA ${{ matrix.cuda-version }} on ${{ matrix.os }})" - runs-on: ${{ matrix.os }} + name: "Test Examples Build (CUDA ${{ matrix.cases.cuda-version }} on ${{ matrix.cases.os }})" + runs-on: ${{ matrix.cases.os }} timeout-minutes: 60 strategy: matrix: - os: - - ubuntu-18.04 - - windows-2019 - cuda-version: - - 10.1.243 - - 11.2.2 - - 11.6.2 + cases: + - { os: "ubuntu-18.04", cuda-version: "10.1.243" } + - { os: "ubuntu-18.04", cuda-version: "11.2.2" } + - { os: "ubuntu-18.04", cuda-version: "11.6.2" } + - { os: "windows-2019", cuda-version: "10.1.243" } + - { os: "windows-2019", cuda-version: "11.2.2" } + - { os: "windows-2019", cuda-version: "11.6.2" } steps: - uses: actions/checkout@v3 - uses: bazelbuild/setup-bazelisk@v2 - name: Mount bazel cache - if: ${{ !startsWith(matrix.os, 'windows') }} + if: ${{ !startsWith(matrix.cases.os, 'windows') }} uses: actions/cache@v3 with: path: ~/.cache/bazel - key: bazel-${{ matrix.os }}-cuda-${{ matrix.cuda-version }}-${{ hashFiles('.bazelversion') }} + key: bazel-${{ matrix.cases.os }}-cuda-${{ matrix.cases.cuda-version }}-${{ hashFiles('.bazelversion') }} - name: Install CUDA (Linux) uses: Jimver/cuda-toolkit@v0.2.10 - if: ${{ !startsWith(matrix.os, 'windows') }} + if: ${{ !startsWith(matrix.cases.os, 'windows') }} with: - cuda: ${{ matrix.cuda-version }} + cuda: ${{ matrix.cases.cuda-version }} sub-packages: '["nvcc", "cudart-dev"]' method: network - name: Show bin, include, lib (Linux) - if: ${{ !startsWith(matrix.os, 'windows') }} + if: ${{ !startsWith(matrix.cases.os, 'windows') }} run: | tree ${CUDA_PATH}/bin tree ${CUDA_PATH}/include @@ -47,19 +47,19 @@ jobs: - name: Install CUDA (Windows) uses: Jimver/cuda-toolkit@v0.2.10 - if: ${{ startsWith(matrix.os, 'windows') }} + if: ${{ startsWith(matrix.cases.os, 'windows') }} with: - cuda: ${{ matrix.cuda-version }} + cuda: ${{ matrix.cases.cuda-version }} sub-packages: '["nvcc", "cudart"]' method: network - name: Show bin, include, lib64 (Windows) - if: ${{ startsWith(matrix.os, 'windows') }} + if: ${{ startsWith(matrix.cases.os, 'windows') }} run: | tree /F $env:CUDA_PATH/bin tree /F $env:CUDA_PATH/include tree /F $env:CUDA_PATH/lib/x64 - name: Set Visual Studio Environment (Windows) - if: ${{ startsWith(matrix.os, 'windows') }} + if: ${{ startsWith(matrix.cases.os, 'windows') }} run: .github/workflows/Set-VSEnv.ps1 2019 - run: bazelisk build @rules_cuda_examples//basic:main From db46a648d3fdc9f5373f4f474bc3fc603f72882a Mon Sep 17 00:00:00 2001 From: Cloud Han Date: Thu, 23 Mar 2023 12:37:50 +0800 Subject: [PATCH 2/4] Remove windows cuda 11.2.2 --- .github/workflows/build-tests.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-tests.yaml b/.github/workflows/build-tests.yaml index cb3d4706..e616007c 100644 --- a/.github/workflows/build-tests.yaml +++ b/.github/workflows/build-tests.yaml @@ -18,7 +18,6 @@ jobs: - { os: "ubuntu-18.04", cuda-version: "11.2.2" } - { os: "ubuntu-18.04", cuda-version: "11.6.2" } - { os: "windows-2019", cuda-version: "10.1.243" } - - { os: "windows-2019", cuda-version: "11.2.2" } - { os: "windows-2019", cuda-version: "11.6.2" } steps: - uses: actions/checkout@v3 From 9c29f6bc2fb6d1dba609f5090a44405e61fcedb1 Mon Sep 17 00:00:00 2001 From: Cloud Han Date: Thu, 23 Mar 2023 13:11:32 +0800 Subject: [PATCH 3/4] More combinations for linux --- .github/workflows/build-tests.yaml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-tests.yaml b/.github/workflows/build-tests.yaml index e616007c..203f42b5 100644 --- a/.github/workflows/build-tests.yaml +++ b/.github/workflows/build-tests.yaml @@ -14,11 +14,12 @@ jobs: strategy: matrix: cases: - - { os: "ubuntu-18.04", cuda-version: "10.1.243" } - - { os: "ubuntu-18.04", cuda-version: "11.2.2" } - - { os: "ubuntu-18.04", cuda-version: "11.6.2" } - - { os: "windows-2019", cuda-version: "10.1.243" } - - { os: "windows-2019", cuda-version: "11.6.2" } + - { os: "ubuntu-18.04", cuda-version: "10.1.243", source: "nvidia" } + - { os: "ubuntu-18.04", cuda-version: "11.2.2", source: "nvidia" } + - { os: "ubuntu-20.04", cuda-version: "11.6.2", source: "nvidia" } + - { os: "ubuntu-22.04", cuda-version: "11.5.1-1ubuntu1", source: "ubuntu" } + - { os: "windows-2019", cuda-version: "10.1.243", source: "nvidia" } + - { os: "windows-2019", cuda-version: "11.6.2", source: "nvidia" } steps: - uses: actions/checkout@v3 @@ -30,19 +31,24 @@ jobs: path: ~/.cache/bazel key: bazel-${{ matrix.cases.os }}-cuda-${{ matrix.cases.cuda-version }}-${{ hashFiles('.bazelversion') }} - - name: Install CUDA (Linux) + - name: Install CUDA (NVIDIA, Linux) uses: Jimver/cuda-toolkit@v0.2.10 - if: ${{ !startsWith(matrix.cases.os, 'windows') }} + if: ${{ !startsWith(matrix.cases.os, 'windows') && matrix.cases.source == 'nvidia' }} with: cuda: ${{ matrix.cases.cuda-version }} sub-packages: '["nvcc", "cudart-dev"]' method: network - - name: Show bin, include, lib (Linux) - if: ${{ !startsWith(matrix.cases.os, 'windows') }} + - name: Show bin, include, lib (NVIDIA, Linux) + if: ${{ !startsWith(matrix.cases.os, 'windows') && matrix.cases.source == 'nvidia' }} run: | tree ${CUDA_PATH}/bin tree ${CUDA_PATH}/include tree ${CUDA_PATH}/lib64 + - name: Install CUDA (Ubuntu) + if: ${{ !startsWith(matrix.cases.os, 'windows') && matrix.cases.source == 'ubuntu' }} + run: | + sudo apt-get update + sudo apt-get install -y nvidia-cuda-dev=${{ matrix.cases.cuda-version }} - name: Install CUDA (Windows) uses: Jimver/cuda-toolkit@v0.2.10 From ead53f342eb4fe191d6a8142e8620c1dc8dbf481 Mon Sep 17 00:00:00 2001 From: Cloud Han Date: Thu, 23 Mar 2023 14:01:41 +0800 Subject: [PATCH 4/4] Comment out apt install toolkit --- .github/workflows/build-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-tests.yaml b/.github/workflows/build-tests.yaml index 203f42b5..5a2ae3b4 100644 --- a/.github/workflows/build-tests.yaml +++ b/.github/workflows/build-tests.yaml @@ -17,7 +17,7 @@ jobs: - { os: "ubuntu-18.04", cuda-version: "10.1.243", source: "nvidia" } - { os: "ubuntu-18.04", cuda-version: "11.2.2", source: "nvidia" } - { os: "ubuntu-20.04", cuda-version: "11.6.2", source: "nvidia" } - - { os: "ubuntu-22.04", cuda-version: "11.5.1-1ubuntu1", source: "ubuntu" } + # - { os: "ubuntu-22.04", cuda-version: "11.5.1-1ubuntu1", source: "ubuntu" } - { os: "windows-2019", cuda-version: "10.1.243", source: "nvidia" } - { os: "windows-2019", cuda-version: "11.6.2", source: "nvidia" } steps: