diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 07e7691cc9..56773bdb65 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -323,6 +323,19 @@ jobs: pr-number: ${{ inputs.pr-number }} target-branch: ${{ inputs.target-branch }} + run-k8s-tests-on-nvidia-gpu: + if: ${{ inputs.skip-test != 'yes' }} + needs: publish-kata-deploy-payload-amd64 + uses: ./.github/workflows/run-k8s-tests-on-nvidia-gpu.yaml + with: + registry: ghcr.io + repo: ${{ github.repository_owner }}/kata-deploy-ci + tag: ${{ inputs.tag }}-arm64 + commit-hash: ${{ inputs.commit-hash }} + pr-number: ${{ inputs.pr-number }} + target-branch: ${{ inputs.target-branch }} + secrets: inherit + run-kata-coco-tests: if: ${{ inputs.skip-test != 'yes' }} needs: diff --git a/.github/workflows/run-k8s-tests-on-nvidia-gpu.yaml b/.github/workflows/run-k8s-tests-on-nvidia-gpu.yaml new file mode 100644 index 0000000000..64502b4c19 --- /dev/null +++ b/.github/workflows/run-k8s-tests-on-nvidia-gpu.yaml @@ -0,0 +1,83 @@ +name: CI | Run NVIDIA GPU kubernetes tests on arm64 +on: + workflow_call: + inputs: + registry: + required: true + type: string + repo: + required: true + type: string + tag: + required: true + type: string + pr-number: + required: true + type: string + commit-hash: + required: false + type: string + target-branch: + required: false + type: string + default: "" + +jobs: + run-nvidia-gpu-tests-on-amd64: + strategy: + fail-fast: false + matrix: + vmm: + - qemu-nvidia-gpu + k8s: + - kubeadm + runs-on: amd64-nvidia-a100 + environment: nvidia + env: + DOCKER_REGISTRY: ${{ inputs.registry }} + DOCKER_REPO: ${{ inputs.repo }} + DOCKER_TAG: ${{ inputs.tag }} + GH_PR_NUMBER: ${{ inputs.pr-number }} + KATA_HYPERVISOR: ${{ matrix.vmm }} + KUBERNETES: ${{ matrix.k8s }} + USING_NFD: "false" + K8S_TEST_HOST_TYPE: all + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.commit-hash }} + fetch-depth: 0 + + - name: Rebase atop of the latest target branch + run: | + ./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch" + env: + TARGET_BRANCH: ${{ inputs.target-branch }} + + - name: Deploy Kata + timeout-minutes: 10 + run: bash tests/integration/kubernetes/gha-run.sh deploy-kata + + - name: Install `bats` + run: bash tests/integration/kubernetes/gha-run.sh install-bats + + - name: Run tests + timeout-minutes: 30 + run: bash tests/integration/kubernetes/gha-run.sh run-nv-tests + + - name: Collect artifacts ${{ matrix.vmm }} + if: always() + run: bash tests/integration/kubernetes/gha-run.sh collect-artifacts + continue-on-error: true + + - name: Archive artifacts ${{ matrix.vmm }} + uses: actions/upload-artifact@v4 + with: + name: k8s-tests-${{ matrix.vmm }}-${{ matrix.k8s }}-${{ inputs.tag }} + path: /tmp/artifacts + retention-days: 1 + + - name: Delete kata-deploy + if: always() + timeout-minutes: 5 + run: bash tests/integration/kubernetes/gha-run.sh cleanup