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 b8117b7 commit 8d532b6
Showing 1 changed file with 31 additions and 17 deletions.
48 changes: 31 additions & 17 deletions .github/workflows/precompiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@ jobs:
needs:
- determine-e2e-test-matrix
- set-driver-version-matrix
# SHIVA
if: false
# if: ${{ needs.determine-e2e-test-matrix.outputs.matrix_values_not_empty == '1' }}
if: ${{ needs.determine-e2e-test-matrix.outputs.matrix_values_not_empty == '1' }}
strategy:
matrix:
kernel_version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }}
Expand Down Expand Up @@ -241,10 +239,26 @@ jobs:
KERNEL_VERSION="${{ matrix.kernel_version }}"
echo "KERNEL_VERSION=$KERNEL_VERSION" >> $GITHUB_ENV
# - name: Download Docker image artifact
# uses: actions/download-artifact@v3
# with:
# name: driver-images-${{ matrix.driver-branch }}_${{ matrix.flavor }}
- name: Install GitHub CLI
run: |
sudo apt-get update
sudo apt-get install -y gh
- name: Download built image
DIST: "ubuntu22.04"
run:
driver_branch_json='${{ needs.set-driver-version-matrix.outputs.driver_branch }}'
driver_branch=$(echo "$driver_branch_json" | jq -r '.[]')
for DRIVER_BRANCH in $driver_branch; do
echo "Downloading driver-images-${DRIVER_BRANCH}-${KERNEL_VERSION}-${DIST}"
echo \"gh api --method GET "/repos/${{ github.repository }}/actions/artifacts" \
jq ".artifacts[] | select(.name == \"$driver-images-${DRIVER_BRANCH}-${KERNEL_VERSION}-${DIST}\") | .archive_download_url" | \
xargs curl -o ./artifacts/$image.tar -L\"
gh api --method GET "/repos/${{ github.repository }}/actions/artifacts" \
jq ".artifacts[] | select(.name == \"$driver-images-${DRIVER_BRANCH}-${KERNEL_VERSION}-${DIST}\") | .archive_download_url" | \
xargs curl -o ./artifacts/$image.tar -L
done
exit 1

- name: Upgrade the kernel for Precompiled e2e test
env:
Expand Down Expand Up @@ -308,8 +322,8 @@ jobs:
- determine-e2e-test-matrix
strategy:
matrix:
kernel_version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }}
driver-branch: ${{ fromJson(needs.set-driver-version-matrix.outputs.driver_branch) }}
kernel-version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }}
driver_branch: ${{ fromJson(needs.set-driver-version-matrix.outputs.driver_branch) }}
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -325,16 +339,16 @@ jobs:
- name: Download Docker image artifact
uses: actions/download-artifact@v4
with:
name: driver-images-*-${{ matrix.kernel_version }}-${{ env.DIST }}
path: ./image/
name: driver-images-${{ matrix.driver-branch}}-${{ matrix.kernel-version }}-${{ env.DIST }}
path: ./

- name: Push built image
run: |
ls ./image/*
# docker load -i ${{ matrix.driver-branch }}-${{ matrix.kernel_version }}-${{ env.DIST }}.tar
# docker tag driver:${{ matrix.driver-branch }}-${{ matrix.kernel_version }}-${{ env.DIST }} \
# ${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver-branch }}-${{ matrix.kernel_version }}-${{ env.DIST }}
# docker push ${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver-branch }}-${{ matrix.kernel_version }}-${{ env.DIST }}
ls ./*
# docker load -i ${{ matrix.driver-branch }}-${{ matrix.kernel-version }}-${{ env.DIST }}.tar
# docker tag driver:${{ matrix.driver-branch }}-${{ matrix.kernel-version }}-${{ env.DIST }} \
# ${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver-branch }}-${{ matrix.kernel-version }}-${{ env.DIST }}
# docker push ${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver-branch }}-${{ matrix.kernel-version }}-${{ env.DIST }}
- name: Remove built image tar
run: rm -f driver-images-${{ matrix.driver-branch }}-${{ matrix.kernel_version }}-${{ env.DIST }}.tar
run: rm -f driver-images-${{ matrix.driver-branch }}-${{ matrix.kernel-version }}-${{ env.DIST }}.tar

0 comments on commit 8d532b6

Please sign in to comment.