Skip to content

Commit

Permalink
Use container for tests on the GPU runner.
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepd-nv committed Sep 23, 2024
1 parent 14aae79 commit d8742bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion .github/actions/build/action.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ runs:
ls -lahR ${{ env.ARTIFACTS_DIR }}
<% endif %>

# TODO: Remove
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
${{ env.ARTIFACTS_DIR }}
key: ${{ inputs.client-repo }}-${{ runner.os }}-build


- if: ${{ inputs.use-container }}
name: Build (in container)
shell: bash --noprofile --norc -xeuo pipefail {0}
Expand All @@ -71,7 +81,7 @@ runs:
--rm "${{ inputs.docker-image }}" \
/bin/bash -c "${{ env.REPO_DIR }}/continuous_integration/scripts/entrypoint ${{ env.REPO_DIR }}/continuous_integration/scripts/build ${{ inputs.build-type}} ${{ inputs.target-device }}"

- if: ${{ !inputs.use-container }}
- if: ${{ !inputs.use-container && steps.cache-build.outputs.cache-hit != 'true'}}
name: Build (without container)
shell: bash --noprofile --norc -xeuo pipefail {0}
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gh-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
target-device: ${{ inputs.target-device }}
runs-on: ${{ (inputs.host-platform == 'linux-x64' && 'linux-amd64-cpu16') || (inputs.host-platform == 'linux-aarch64' && 'linux-arm64-cpu16') || (inputs.host-platform == 'mac' && 'macos-latest') }}
build-type: ${{ inputs.build-type }}
use-container: ${{ inputs.host-platform == 'linux-x64' || inputs.host-platform == 'linux-aarch64'}}
use-container: false
host-platform: ${{ inputs.host-platform }}
dependencies-file: ""
build-mode: ${{ inputs.build-mode }}
Expand All @@ -46,7 +46,7 @@ jobs:
runs-on: ${{ (inputs.host-platform == 'linux-x64' && 'linux-amd64-gpu-v100-latest-1') || (inputs.host-platform == 'linux-aarch64' && 'linux-arm64-cpu16') || (inputs.host-platform == 'mac' && 'macos-latest') }}
runner-has-gpu: ${{ inputs.host-platform == 'linux-x64' }}
build-type: ${{ inputs.build-type }}
use-container: false
use-container: ${{ inputs.host-platform == 'linux-x64' }}
host-platform: ${{ inputs.host-platform }}
dependencies-file: ""
build-mode: ${{ inputs.build-mode }}
Expand Down

0 comments on commit d8742bf

Please sign in to comment.