|
25 | 25 |
|
26 | 26 | jobs:
|
27 | 27 | build:
|
| 28 | + name: Build (${{ inputs.host-platform }}, Python "${{ inputs.python-version }}") |
28 | 29 | if: ${{ github.repository_owner == 'nvidia' }}
|
29 |
| - uses: |
30 |
| - ./.github/workflows/gh-build.yml |
31 |
| - with: |
32 |
| - client-repo: ${{ github.event.repository.name }} |
33 |
| - target-device: ${{ inputs.target-device }} |
34 |
| - runs-on: ${{ (inputs.host-platform == 'linux-x64' && 'linux-amd64-cpu8') || |
35 |
| - (inputs.host-platform == 'linux-aarch64' && 'linux-arm64-cpu8') || |
36 |
| - (inputs.host-platform == 'win-x64' && 'windows-2019') }} |
37 |
| - # (inputs.host-platform == 'win-x64' && 'windows-amd64-cpu8') }} |
38 |
| - build-type: ${{ inputs.build-type }} |
39 |
| - host-platform: ${{ inputs.host-platform }} |
40 |
| - build-mode: ${{ inputs.build-mode }} |
41 |
| - upload-enabled: ${{ inputs.upload-enabled }} |
42 |
| - python-version: ${{ inputs.python-version }} |
43 |
| - cuda-version: ${{ inputs.cuda-version }} |
44 |
| - dependencies-file: "" |
45 |
| - secrets: inherit |
| 30 | + permissions: |
| 31 | + id-token: write # This is required for configure-aws-credentials |
| 32 | + contents: read # This is required for actions/checkout |
| 33 | + runs-on: ${{ (inputs.host-platform == 'linux-x64' && 'linux-amd64-cpu8') || |
| 34 | + (inputs.host-platform == 'linux-aarch64' && 'linux-arm64-cpu8') || |
| 35 | + (inputs.host-platform == 'win-x64' && 'windows-2019') }} |
| 36 | + # (inputs.host-platform == 'win-x64' && 'windows-amd64-cpu8') }} |
| 37 | + outputs: |
| 38 | + CUDA_CORE_ARTIFACT_NAME: ${{ steps.pass_env.outputs.CUDA_CORE_ARTIFACT_NAME }} |
| 39 | + CUDA_CORE_ARTIFACTS_DIR: ${{ steps.pass_env.outputs.CUDA_CORE_ARTIFACTS_DIR }} |
| 40 | + CUDA_BINDINGS_ARTIFACT_NAME: ${{ steps.pass_env.outputs.CUDA_BINDINGS_ARTIFACT_NAME }} |
| 41 | + CUDA_BINDINGS_ARTIFACTS_DIR: ${{ steps.pass_env.outputs.CUDA_BINDINGS_ARTIFACTS_DIR }} |
| 42 | + steps: |
| 43 | + - name: Checkout ${{ github.event.repository.name }} |
| 44 | + uses: actions/checkout@v4 |
| 45 | + with: |
| 46 | + fetch-depth: 0 |
| 47 | + |
| 48 | + - name: Set up build environment |
| 49 | + uses: ./.github/actions/setup |
| 50 | + with: |
| 51 | + client-repo: ${{ github.event.repository.name }} |
| 52 | + build-type: ${{ inputs.build-type }} |
| 53 | + target-device: "${{ inputs.target-device }}" |
| 54 | + host-platform: ${{ inputs.host-platform }} |
| 55 | + build-mode: ${{ inputs.build-mode }} |
| 56 | + upload-enabled: ${{ inputs.upload-enabled }} |
| 57 | + python-version: ${{ inputs.python-version }} |
| 58 | + cuda-version: ${{ inputs.cuda-version }} |
| 59 | + |
| 60 | + - name: Call build action |
| 61 | + uses: ./.github/actions/build |
| 62 | + with: |
| 63 | + build-type: ${{ inputs.build-type }} |
| 64 | + target-device: "${{ inputs.target-device }}" |
| 65 | + host-platform: ${{ inputs.host-platform }} |
| 66 | + upload-enabled: ${{ inputs.upload-enabled }} |
| 67 | + |
| 68 | + - name: Pass environment variables |
| 69 | + id: pass_env |
| 70 | + run: | |
| 71 | + echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_NAME}" >> $GITHUB_OUTPUT |
| 72 | + echo "CUDA_CORE_ARTIFACTS_DIR=${CUDA_CORE_ARTIFACTS_DIR}" >> $GITHUB_OUTPUT |
| 73 | + echo "CUDA_BINDINGS_ARTIFACT_NAME=${CUDA_BINDINGS_ARTIFACT_NAME}" >> $GITHUB_OUTPUT |
| 74 | + echo "CUDA_BINDINGS_ARTIFACTS_DIR=${CUDA_BINDINGS_ARTIFACTS_DIR}" >> $GITHUB_OUTPUT |
| 75 | +
|
| 76 | + test: |
| 77 | + # TODO: improve the name once a separate test matrix is defined |
| 78 | + name: Test (CUDA ${{ inputs.cuda-version }}) |
| 79 | + # TODO: enable testing once linux-aarch64 & win-64 GPU runners are up |
| 80 | + if: ${{ (github.repository_owner == 'nvidia') && |
| 81 | + startsWith(inputs.host-platform, 'linux-x64') }} |
| 82 | + permissions: |
| 83 | + id-token: write # This is required for configure-aws-credentials |
| 84 | + contents: read # This is required for actions/checkout |
| 85 | + runs-on: ${{ (inputs.host-platform == 'linux-x64' && 'linux-amd64-gpu-v100-latest-1') }} |
| 86 | + # TODO: use a different (nvidia?) container, or just run on bare image |
| 87 | + container: |
| 88 | + options: -u root --security-opt seccomp=unconfined --privileged --shm-size 16g |
| 89 | + image: condaforge/miniforge3:latest |
| 90 | + env: |
| 91 | + NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} |
| 92 | + needs: |
| 93 | + - build |
| 94 | + steps: |
| 95 | + - name: Checkout ${{ github.event.repository.name }} |
| 96 | + uses: actions/checkout@v4 |
| 97 | + with: |
| 98 | + fetch-depth: 0 |
| 99 | + |
| 100 | + # TODO: we probably don't need this? |
| 101 | + # - name: Setup |
| 102 | + # if: ${{ inputs.has-built != 'true' }} |
| 103 | + # uses: ./.github/actions/setup |
| 104 | + # with: |
| 105 | + # client-repo: ${{ github.event.repository.name }} |
| 106 | + # build-type: ${{ inputs.build-type }} |
| 107 | + # target-device: "${{ inputs.target-device }}" |
| 108 | + # host-platform: ${{ inputs.host-platform }} |
| 109 | + # build-mode: ${{ inputs.build-mode }} |
| 110 | + # upload-enabled: ${{ inputs.upload-enabled }} |
| 111 | + # python-version: ${{ inputs.python-version }} |
| 112 | + |
| 113 | + - name: Call test action |
| 114 | + uses: ./.github/actions/test |
| 115 | + with: |
| 116 | + test-options: ${{ inputs.build-type }} |
| 117 | + env: |
| 118 | + CUDA_CORE_ARTIFACT_NAME: ${{ needs.build.outputs.CUDA_CORE_ARTIFACT_NAME }} |
| 119 | + CUDA_CORE_ARTIFACTS_DIR: ${{ needs.build.outputs.CUDA_CORE_ARTIFACTS_DIR }} |
| 120 | + CUDA_BINDINGS_ARTIFACT_NAME: ${{ needs.build.outputs.CUDA_BINDINGS_ARTIFACT_NAME }} |
| 121 | + CUDA_BINDINGS_ARTIFACTS_DIR: ${{ needs.build.outputs.CUDA_BINDINGS_ARTIFACTS_DIR }} |
| 122 | + PYTHON_VERSION: ${{ inputs.python-version }} |
| 123 | + CTK_BUILD_VER: ${{ inputs.cuda-version }} |
| 124 | + HOST_PLATFORM: ${{ inputs.host-platform }} |
0 commit comments