From cdafe5344d09b5f7fd731dec90657ed0c1a5b5f8 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 29 Feb 2024 07:36:30 +0000 Subject: [PATCH] build: Add SGX, VFIO and rate limit testing to MQ Run these workflows as part of the merge queue to help improve testing coverage. Signed-off-by: Rob Bradford --- .github/workflows/integration-rate-limiter.yaml | 12 +++++++----- .github/workflows/integration-sgx.yaml | 13 ++++++++----- .github/workflows/integration-vfio.yaml | 13 ++++++++----- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.github/workflows/integration-rate-limiter.yaml b/.github/workflows/integration-rate-limiter.yaml index 50f7f7dfb..2911e32db 100644 --- a/.github/workflows/integration-rate-limiter.yaml +++ b/.github/workflows/integration-rate-limiter.yaml @@ -1,21 +1,23 @@ name: Cloud Hypervisor Tests (Rate-Limiter) -on: - push: - branches: - - main +on: [merge_group, pull_request] jobs: build: name: Tests (Rate-Limiter) - runs-on: jammy-rate-limiter + runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'jammy-rate-limiter' }} steps: - name: Fix workspace permissions if: ${{ github.event_name != 'pull_request' }} run: sudo chown -R github-runner:github-runner ${GITHUB_WORKSPACE} - name: Code checkout + if: ${{ github.event_name != 'pull_request' }} uses: actions/checkout@v4 with: fetch-depth: 0 - name: Run rate-limiter integration tests + if: ${{ github.event_name != 'pull_request' }} timeout-minutes: 10 run: scripts/dev_cli.sh tests --integration-rate-limiter + - name: Skipping build for PR + if: ${{ github.event_name == 'pull_request' }} + run: echo "Skipping build for PR" diff --git a/.github/workflows/integration-sgx.yaml b/.github/workflows/integration-sgx.yaml index 1332ac65e..012bad1c0 100644 --- a/.github/workflows/integration-sgx.yaml +++ b/.github/workflows/integration-sgx.yaml @@ -1,24 +1,27 @@ name: Cloud Hypervisor Tests (SGX) -on: - push: - branches: - - main +on: [merge_group, pull_request] jobs: build: name: Tests (SGX) - runs-on: jammy-sgx + runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'jammy-sgx' }} steps: - name: Fix workspace permissions if: ${{ github.event_name != 'pull_request' }} run: sudo chown -R github-runner:github-runner ${GITHUB_WORKSPACE} - name: Code checkout + if: ${{ github.event_name != 'pull_request' }} uses: actions/checkout@v4 with: fetch-depth: 0 - name: Run SGX integration tests + if: ${{ github.event_name != 'pull_request' }} timeout-minutes: 10 run: scripts/dev_cli.sh tests --integration-sgx - name: Run SGX integration tests for musl + if: ${{ github.event_name != 'pull_request' }} timeout-minutes: 10 run: scripts/dev_cli.sh tests --integration-sgx --libc musl + - name: Skipping build for PR + if: ${{ github.event_name == 'pull_request' }} + run: echo "Skipping build for PR" diff --git a/.github/workflows/integration-vfio.yaml b/.github/workflows/integration-vfio.yaml index 5973c841f..45fda7cc5 100644 --- a/.github/workflows/integration-vfio.yaml +++ b/.github/workflows/integration-vfio.yaml @@ -1,24 +1,27 @@ name: Cloud Hypervisor Tests (VFIO) -on: - push: - branches: - - main +on: [merge_group, pull_request] jobs: build: name: Tests (VFIO) - runs-on: jammy-vfio + runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'jammy-vfio' }} steps: - name: Fix workspace permissions if: ${{ github.event_name != 'pull_request' }} run: sudo chown -R github-runner:github-runner ${GITHUB_WORKSPACE} - name: Code checkout + if: ${{ github.event_name != 'pull_request' }} uses: actions/checkout@v4 with: fetch-depth: 0 - name: Run VFIO integration tests + if: ${{ github.event_name != 'pull_request' }} timeout-minutes: 15 run: scripts/dev_cli.sh tests --integration-vfio - name: Run VFIO integration tests for musl + if: ${{ github.event_name != 'pull_request' }} timeout-minutes: 15 run: scripts/dev_cli.sh tests --integration-vfio --libc musl + - name: Skipping build for PR + if: ${{ github.event_name == 'pull_request' }} + run: echo "Skipping build for PR"