mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
gha: ci: Add skeleton of vfio job
This job will run on a nested virt capable Azure VM (improving test concurrency). This is just a placeholder while we adapt the test to GHA. Fixes: #6555 Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
parent
5ce0b4743f
commit
717f775f30
7
.github/workflows/ci.yaml
vendored
7
.github/workflows/ci.yaml
vendored
@ -88,3 +88,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tarball-suffix: -${{ inputs.tag }}
|
tarball-suffix: -${{ inputs.tag }}
|
||||||
commit-hash: ${{ inputs.commit-hash }}
|
commit-hash: ${{ inputs.commit-hash }}
|
||||||
|
|
||||||
|
run-vfio-tests:
|
||||||
|
needs: build-kata-static-tarball-amd64
|
||||||
|
uses: ./.github/workflows/run-vfio-tests.yaml
|
||||||
|
with:
|
||||||
|
tarball-suffix: -${{ inputs.tag }}
|
||||||
|
commit-hash: ${{ inputs.commit-hash }}
|
||||||
|
37
.github/workflows/run-vfio-tests.yaml
vendored
Normal file
37
.github/workflows/run-vfio-tests.yaml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: CI | Run vfio tests
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
tarball-suffix:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
commit-hash:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run-vfio:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
vmm: ['clh', 'qemu']
|
||||||
|
runs-on: garm-ubuntu-2204
|
||||||
|
env:
|
||||||
|
GOPATH: ${{ github.workspace }}
|
||||||
|
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.commit-hash }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bash tests/functional/vfio/gha-run.sh install-dependencies
|
||||||
|
|
||||||
|
- name: get-kata-tarball
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
|
||||||
|
path: kata-artifacts
|
||||||
|
|
||||||
|
- name: Run vfio tests
|
||||||
|
run: bash tests/functional/vfio/gha-run.sh run
|
33
tests/functional/vfio/gha-run.sh
Executable file
33
tests/functional/vfio/gha-run.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (c) Microsoft Corporation.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
kata_tarball_dir="${2:-kata-artifacts}"
|
||||||
|
vfio_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
|
source "${vfio_dir}/../../common.bash"
|
||||||
|
|
||||||
|
function install_dependencies() {
|
||||||
|
info "Installing the dependencies needed for running the vfio tests"
|
||||||
|
}
|
||||||
|
|
||||||
|
function run() {
|
||||||
|
info "Running cri-containerd tests using ${KATA_HYPERVISOR} hypervisor"
|
||||||
|
}
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
action="${1:-}"
|
||||||
|
case "${action}" in
|
||||||
|
install-dependencies) install_dependencies ;;
|
||||||
|
run) run ;;
|
||||||
|
*) >&2 die "Invalid argument" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
Loading…
Reference in New Issue
Block a user