-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ubuntu24.04 precompile image support
Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile support Signed-off-by: shiva kumar <[email protected]> ubuntu24.04 precompile image support ubuntu24.04 precompile image support Signed-off-by: shiva kumar <[email protected]>
- Loading branch information
Showing
5 changed files
with
102 additions
and
70 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 |
---|---|---|
|
@@ -25,10 +25,10 @@ on: | |
- opened | ||
- synchronize | ||
branches: | ||
- ci-precompile-ubuntu24.04 | ||
- test-ubuntu24.04 | ||
push: | ||
branches: | ||
- ci-precompile-ubuntu24.04 | ||
- test-ubuntu24.04 | ||
|
||
jobs: | ||
set-driver-version-matrix: | ||
|
@@ -165,10 +165,6 @@ jobs: | |
needs: | ||
- precompiled-build-image | ||
- set-driver-version-matrix | ||
outputs: | ||
matrix_values_not_empty: ${{ steps.set_kernel_version.outputs.matrix_values_not_empty }} | ||
matrix_values: ${{ steps.set_kernel_version.outputs.matrix_values }} | ||
dist: ${{ steps.set-driver-version-matrix.outputs.dist }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
@@ -180,13 +176,10 @@ jobs: | |
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set kernel version | ||
id: set_kernel_version | ||
env: | ||
DIST: ${{ matrix.dist }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
echo "matrix_values_not_empty=0" >> $GITHUB_OUTPUT | ||
if [ "$DIST" == "ubuntu22.04" ]; then | ||
export BASE_TARGET="jammy" | ||
export LTS_KERNEL="5.15" | ||
|
@@ -213,22 +206,66 @@ jobs: | |
echo "Skipping e2e tests" | ||
exit 0 | ||
fi | ||
for i in "${!KERNEL_VERSIONS[@]}"; do | ||
KERNEL_VERSIONS[$i]="${KERNEL_VERSIONS[$i]}-$DIST" | ||
done | ||
# Convert array to JSON format and assign | ||
echo "[]" > $GITHUB_WORKSPACE/matrix_values.json | ||
printf '%s\n' "${KERNEL_VERSIONS[@]}" | jq -R . | jq -s . > $GITHUB_WORKSPACE/matrix_values.json | ||
echo "matrix_values=$(cat $GITHUB_WORKSPACE/matrix_values.json | jq -c .)" >> $GITHUB_OUTPUT | ||
echo "matrix_values_not_empty=1" >> $GITHUB_OUTPUT | ||
echo "[]" > ./matrix_values_$DIST.json | ||
printf '%s\n' "${KERNEL_VERSIONS[@]}" | jq -R . | jq -s . > ./matrix_values_$DIST.json | ||
e2e-tests-nvidiadriver: | ||
- name: Upload kernel matrix values as artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: matrix-values-${{ matrix.dist }} | ||
path: ./matrix_values_${{ matrix.dist }}.json | ||
|
||
collect-e2e-test-matrix: | ||
runs-on: linux-amd64-cpu4 | ||
needs: | ||
- determine-e2e-test-matrix | ||
- set-driver-version-matrix | ||
if: ${{ needs.determine-e2e-test-matrix.outputs.matrix_values_not_empty == '1' }} | ||
outputs: | ||
matrix_values_not_empty: ${{ steps.set_kernel_version.outputs.matrix_values_not_empty }} | ||
matrix_values: ${{ steps.set_kernel_version.outputs.matrix_values }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Set and append matrix values for ubuntu | ||
id: set_kernel_version | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
echo "matrix_values_not_empty=0" >> $GITHUB_OUTPUT | ||
# combined_values="[]" | ||
kernel_versions=() | ||
# Read and merge kernel_version values from dist files | ||
DIST=("ubuntu22.04" "ubuntu24.04") | ||
for d in "${DIST[@]}"; do | ||
artifact_name="matrix-values-${d}" | ||
file_path="./matrix_values_${d}.json" | ||
echo "Attempting to download artifact: $artifact_name" | ||
if gh run download --name "$artifact_name" --dir ./; then | ||
echo "Successfully downloaded artifact: $artifact_name" | ||
value=$(jq -r '.[]' "$file_path") | ||
kernel_versions+=($value) | ||
echo "matrix_values_not_empty=1" >> $GITHUB_OUTPUT | ||
fi | ||
done | ||
echo "Collected Kernel Versions: ${kernel_versions[@]}" | ||
combined_values=$(printf '%s\n' "${kernel_versions[@]}" | jq -R . | jq -s -c . | tr -d ' \n') | ||
echo "Combined Kernel Versions JSON: $combined_values" | ||
echo "matrix_values=$combined_values" >> $GITHUB_OUTPUT | ||
e2e-tests-nvidiadriver: | ||
runs-on: linux-amd64-cpu4 | ||
needs: | ||
- collect-e2e-test-matrix | ||
- set-driver-version-matrix | ||
if: ${{ needs.collect-e2e-test-matrix.outputs.matrix_values_not_empty == '1' }} | ||
strategy: | ||
matrix: | ||
kernel_version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }} | ||
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }} | ||
kernel_version: ${{ fromJson(needs.collect-e2e-test-matrix.outputs.matrix_values) }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
@@ -238,36 +275,41 @@ jobs: | |
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set and Calculate test vars | ||
run: | | ||
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 | ||
echo "PRIVATE_REGISTRY=ghcr.io" >> $GITHUB_ENV | ||
KERNEL_VERSION="${{ matrix.kernel_version }}" | ||
# Extract the last segment after the last dash | ||
DIST=${KERNEL_VERSION##*-} | ||
echo "DIST=$DIST" >> $GITHUB_ENV | ||
KERNEL_VERSION=${KERNEL_VERSION%-*} | ||
echo "KERNEL_VERSION=$KERNEL_VERSION" >> $GITHUB_ENV | ||
driver_branch_json="${{ needs.set-driver-version-matrix.outputs.driver_branch }}" | ||
DRIVER_BRANCHES=($(echo "$driver_branch_json" | jq -r '.[]')) | ||
echo "DRIVER_BRANCHES=${DRIVER_BRANCHES[*]}" >> $GITHUB_ENV | ||
- 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 }} | ||
DIST: ${{ env.DIST }} | ||
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_${{ matrix.dist }}.yaml" | ||
|
||
holodeck_config: "tests/holodeck_${{ env.DIST }}.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 | ||
- name: Calculate holodeck instance hostname | ||
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 | ||
echo "PRIVATE_REGISTRY=ghcr.io" >> $GITHUB_ENV | ||
KERNEL_VERSION="${{ matrix.kernel_version }}" | ||
echo "KERNEL_VERSION=$KERNEL_VERSION" >> $GITHUB_ENV | ||
echo "DIST=${{ matrix.dist }}" >> $GITHUB_ENV | ||
driver_branch_json="${{ needs.set-driver-version-matrix.outputs.driver_branch }}" | ||
DRIVER_BRANCHES=($(echo "$driver_branch_json" | jq -r '.[]')) | ||
echo "DRIVER_BRANCHES=${DRIVER_BRANCHES[*]}" >> $GITHUB_ENV | ||
# step added to skip azure e2e tests and publish the image | ||
# FIXME -- remove step once azure kernel upgrade starts working | ||
|
@@ -352,16 +394,12 @@ jobs: | |
runs-on: linux-amd64-cpu4 | ||
needs: | ||
- set-driver-version-matrix | ||
- determine-e2e-test-matrix | ||
- collect-e2e-test-matrix | ||
- e2e-tests-nvidiadriver | ||
strategy: | ||
matrix: | ||
driver_branch: ${{ fromJson(needs.set-driver-version-matrix.outputs.driver_branch) }} | ||
kernel_version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }} | ||
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }} | ||
exclude: | ||
- dist: ubuntu24.04 | ||
driver_branch: 535 | ||
kernel_version: ${{ fromJson(needs.collect-e2e-test-matrix.outputs.matrix_values) }} | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
@@ -375,17 +413,16 @@ jobs: | |
- name: Set image vars | ||
run: | | ||
echo "PRIVATE_REGISTRY=ghcr.io" >> $GITHUB_ENV | ||
echo "DIST=${{ matrix.dist }}" >> $GITHUB_ENV | ||
- name: Download built image artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: driver-images-${{ matrix.driver_branch }}-${{ matrix.kernel_version }}-${{ env.DIST }} | ||
name: driver-images-${{ matrix.driver_branch }}-${{ matrix.kernel_version }} | ||
path: ./ | ||
|
||
- name: Publish image | ||
run: | | ||
image_path="./driver-images-${{ matrix.driver_branch }}-${{ matrix.kernel_version }}-${{ env.DIST }}.tar" | ||
image_path="./driver-images-${{ matrix.driver_branch }}-${{ matrix.kernel_version }}.tar" | ||
echo "uploading $image_path" | ||
docker load -i $image_path | ||
docker push ${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver_branch }}-${{ matrix.kernel_version }}-${{ env.DIST }} | ||
docker push ${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver_branch }}-${{ matrix.kernel_version }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,5 @@ if [[ $status -eq 0 ]]; then | |
else | ||
export should_continue=true | ||
fi | ||
#SHIVA | ||
export should_continue=true |