1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-05-06 23:47:31 +00:00

ci: Generalize GITHUB_RUNNER_CI_ARM64

`GITHUB_RUNNER_CI_ARM64` is turned on for self hosted runners without
virtualization to skipped those tests depend on virtualization. This may
happen to other archs/runners as well, let's generalize it to
`GITHUB_RUNNER_CI_NON_VIRT` so we can reuse it on other archs.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
Ruoqing He 2025-03-21 09:45:52 +08:00
parent e84f7c2c4b
commit 5e81f67ceb
4 changed files with 6 additions and 6 deletions

View File

@ -115,7 +115,7 @@ jobs:
- name: Skip tests that depend on virtualization capable runners when needed
if: ${{ endsWith(inputs.instance, '-arm') }}
run: |
echo "GITHUB_RUNNER_CI_ARM64=true" >> "$GITHUB_ENV"
echo "GITHUB_RUNNER_CI_NON_VIRT=true" >> "$GITHUB_ENV"
- name: Running `${{ matrix.command }}` for ${{ matrix.component.name }}
run: |
cd ${{ matrix.component.path }}

View File

@ -25,7 +25,7 @@ func setupCheckHostIsVMContainerCapable(assert *assert.Assertions, cpuInfoFile s
}
func TestCCCheckCLIFunction(t *testing.T) {
if os.Getenv("GITHUB_RUNNER_CI_ARM64") == "true" {
if os.Getenv("GITHUB_RUNNER_CI_NON_VIRT") == "true" {
t.Skip("Skipping the test as the GitHub self hosted runners for ARM64 do not support Virtualization")
}

View File

@ -18,7 +18,7 @@ func getExpectedHostDetails(tmpdir string) (HostInfo, error) {
}
func TestEnvGetEnvInfoSetsCPUType(t *testing.T) {
if os.Getenv("GITHUB_RUNNER_CI_ARM64") == "true" {
if os.Getenv("GITHUB_RUNNER_CI_NON_VIRT") == "true" {
t.Skip("Skipping the test as the GitHub self hosted runners for ARM64 do not support Virtualization")
}
testEnvGetEnvInfoSetsCPUTypeGeneric(t)

View File

@ -375,7 +375,7 @@ func TestEnvGetMetaInfo(t *testing.T) {
}
func TestEnvGetHostInfo(t *testing.T) {
if os.Getenv("GITHUB_RUNNER_CI_ARM64") == "true" {
if os.Getenv("GITHUB_RUNNER_CI_NON_VIRT") == "true" {
t.Skip("Skipping the test as the GitHub self hosted runners for ARM64 do not support Virtualization")
}
@ -439,7 +439,7 @@ func TestEnvGetHostInfoNoProcVersion(t *testing.T) {
}
func TestEnvGetEnvInfo(t *testing.T) {
if os.Getenv("GITHUB_RUNNER_CI_ARM64") == "true" {
if os.Getenv("GITHUB_RUNNER_CI_NON_VIRT") == "true" {
t.Skip("Skipping the test as the GitHub self hosted runners for ARM64 do not support Virtualization")
}
@ -471,7 +471,7 @@ func TestEnvGetEnvInfo(t *testing.T) {
}
func TestEnvGetEnvInfoNoHypervisorVersion(t *testing.T) {
if os.Getenv("GITHUB_RUNNER_CI_ARM64") == "true" {
if os.Getenv("GITHUB_RUNNER_CI_NON_VIRT") == "true" {
t.Skip("Skipping the test as the GitHub self hosted runners for ARM64 do not support Virtualization")
}