Skip to content

Commit

Permalink
Pre-compiled image e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Sep 11, 2024
1 parent 55ef518 commit 205c36a
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 14 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@
name: image

on:
pull_request:
types:
- opened
- synchronize
branches:
- main
- release-*
# pull_request:
# types:
# - opened
# - synchronize
# branches:
# - main
# - release-*
push:
branches:
- main
- release-*
# - main
# - release-*
- no-test

jobs:
image:
Expand Down
64 changes: 59 additions & 5 deletions .github/workflows/precompiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,19 @@
name: Precompiled images

on:
schedule:
- cron: '00 09 * * *' # scheduled job
on:
# pull_request:
# types:
# - opened
# - synchronize
# branches:
# - main
# - release-*
push:
branches:
# - main
# - release-*
- e2etestdriver-test

jobs:
set-driver-version-matrix:
Expand All @@ -32,12 +43,14 @@ jobs:
id: extract_driver_branch
run: |
# get driver-branch
DRIVER_BRANCH=("535" "550")
# DRIVER_BRANCH=("535" "550")
DRIVER_BRANCH=("535")
driver_branch_json=$(printf '%s\n' "${DRIVER_BRANCH[@]}" | jq -R . | jq -cs .)
echo "driver_branch=$driver_branch_json" >> $GITHUB_OUTPUT
# get kernel flavors
KERNEL_FLAVORS=("aws" "azure" "generic" "nvidia" "oracle")
# KERNEL_FLAVORS=("aws" "azure" "generic" "nvidia" "oracle")
KERNEL_FLAVORS=("aws")
kernel_flavors_json=$(printf '%s\n' "${KERNEL_FLAVORS[@]}" | jq -R . | jq -cs .)
echo "kernel_flavors=$kernel_flavors_json" >> $GITHUB_OUTPUT
Expand All @@ -59,7 +72,7 @@ jobs:
REPO_FULL_NAME="${{ github.repository }}"
echo "LABEL_IMAGE_SOURCE=https://github.com/${REPO_FULL_NAME}" >> $GITHUB_ENV
GENERATE_ARTIFACTS="true"
GENERATE_ARTIFACTS="false"
echo "PUSH_ON_BUILD=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
echo "BUILD_MULTI_ARCH_IMAGES=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
Expand Down Expand Up @@ -97,6 +110,23 @@ jobs:
run: |
source kernel_version.txt && \
make DRIVER_VERSIONS=${DRIVER_VERSIONS} DRIVER_BRANCH=${{ matrix.driver-branch }} build-${DIST}-${DRIVER_VERSION}
- name: Check driver image locally
env:
DIST: "ubuntu22.04"
run: |
echo "SHIVA#############"
docker images
driver_branch_json='${{ needs.set-driver-version-matrix.outputs.driver_branch }}'
driver_branch=$(echo "$driver_versions_json" | jq -r '.[]')
for DRIVER_BRANCH in $driver_branch; do
echo "SHIVA for loop 11"
docker images "${{ env.PRIVATE_REGISTRY }}/nvidia/driver:${DRIVER_BRANCH}-{{ matrix.kernel_version }}-{DIST}"
fi
echo "SHIVA"
determine-e2e-test-matrix:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -169,6 +199,12 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Holodeck
uses: NVIDIA/[email protected]
env:
Expand Down Expand Up @@ -196,6 +232,24 @@ jobs:
KERNEL_VERSION="${{ matrix.kernel_version }}"
echo "KERNEL_VERSION=$KERNEL_VERSION" >> $GITHUB_ENV
- name: Check driver image locally
env:
DIST: "ubuntu22.04"
run: |
echo "SHIVA======"
docker images
driver_branch_json='${{ needs.set-driver-version-matrix.outputs.driver_branch }}'
driver_branch=$(echo "$driver_versions_json" | jq -r '.[]')
for DRIVER_BRANCH in $driver_branch; do
echo "SHIVA for loop 11"
docker images "${{ env.PRIVATE_REGISTRY }}/nvidia/driver:${DRIVER_BRANCH}-{{ matrix.kernel_version }}-{DIST}"
fi
echo "SHIVA"
exit 1
- name: Upgrade the kernel for Precompiled e2e test
env:
UPGRADE_KERNEL_SCRIPT: "./tests/scripts/upgrade-kernel.sh"
Expand Down

0 comments on commit 205c36a

Please sign in to comment.