-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pre-compiled end-to-end gpu driver validation
Signed-off-by: shiva kumar <[email protected]>
- Loading branch information
Showing
6 changed files
with
126 additions
and
67 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# Copyright 2024 NVIDIA CORPORATION | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Pre-Compiled End-to-end tests | ||
|
||
on: | ||
workflow_run: | ||
workflows: [image] | ||
types: | ||
- completed | ||
branches: | ||
- e2etestdriver | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
branches: | ||
# - main | ||
# - release-* | ||
- e2etestdriver | ||
push: | ||
branches: | ||
# - main | ||
# - release-* | ||
- e2etestdriver | ||
|
||
jobs: | ||
e2e-tests-nvidiadriver: | ||
strategy: | ||
matrix: | ||
flavor: | ||
- aws | ||
- azure | ||
- generic | ||
- nvidia | ||
- oracle | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Holodeck | ||
uses: NVIDIA/[email protected] | ||
env: | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SSH_KEY: ${{ secrets.AWS_SSH_KEY }} | ||
with: | ||
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }} | ||
holodeck_config: "tests/holodeck.yaml" | ||
|
||
- name: Get public dns name | ||
id: get_public_dns_name | ||
uses: mikefarah/yq@master | ||
with: | ||
cmd: yq '.status.properties[] | select(.name == "public-dns-name") | .value' /github/workspace/.cache/holodeck.yaml | ||
|
||
- name: Set and Calculate test vars | ||
run: | | ||
echo "instance_hostname=ubuntu@${{ steps.get_public_dns_name.outputs.result }}" >> $GITHUB_ENV | ||
echo "private_key=${{ github.workspace }}/key.pem" >> $GITHUB_ENV | ||
echo "${{ secrets.AWS_SSH_KEY }}" > ${{ github.workspace }}/key.pem && chmod 400 ${{ github.workspace }}/key.pem | ||
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV | ||
DRIVER_VERSIONS=$(grep '^DRIVER_VERSIONS ?=' versions.mk | awk -F' ?= ' '{print $2}') | ||
echo "DRIVER_VERSIONS=$DRIVER_VERSIONS" >> $GITHUB_ENV | ||
echo "PRIVATE_REGISTRY=ghcr.io" >>$GITHUB_ENV | ||
- name: Precompiled e2e test- upgrade kernel and Validate gpu driver | ||
env: | ||
TEST_CASE_KERNEL_UPGRADE: "./tests/cases/nvidia-kernel-upgrade.sh" | ||
TEST_CASE: "./tests/cases/nvidia-driver.sh" | ||
OPERATOR_OPTIONS: "--set driver.usePrecompiled=true --set driver.repository=${PRIVATE_REGISTRY}/nvidia" | ||
run: | | ||
rc=0 | ||
for driver_version in ${DRIVER_VERSIONS}; do | ||
echo "Running e2e for DRIVER_VERSION=$driver_version" | ||
status=0 | ||
./tests/ci-run-e2e.sh ${TEST_CASE_KERNEL_UPGRADE} ${driver_version} ${OPERATOR_OPTIONS} || status=$? | ||
if [ $status -ne 0 ]; then | ||
echo "Kernel upgrade failed" | ||
rc=$status | ||
else | ||
./tests/script/remote_retry.sh | ||
DRIVER_BRANCH=$(echo "${driver_version}" | cut -d '.' -f 1) | ||
DRIVER_VERSION="${DRIVER_BRANCH}" | ||
./tests/ci-run-e2e.sh ${TEST_CASE} ${DRIVER_VERSION} ${OPERATOR_OPTIONS} || status=$? | ||
if [ $status -ne 0 ]; then | ||
echo "e2e validation failed for driver version $DRIVER_VERSION with status $status" | ||
rc=$status | ||
fi | ||
fi | ||
done | ||
./tests/scripts/pull.sh /tmp/logs logs | ||
exit $rc | ||
- name: Archive test logs | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nvidiadriver-Precompiled-e2e-test-logs | ||
path: ./logs/ | ||
retention-days: 15 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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