|
| 1 | +name: Cloud Hypervisor Tests (x86-64) |
| 2 | +on: [pull_request, merge_group] |
| 3 | +concurrency: |
| 4 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 5 | + cancel-in-progress: true |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + timeout-minutes: 60 |
| 10 | + strategy: |
| 11 | + fail-fast: false |
| 12 | + matrix: |
| 13 | + runner: ['garm-jammy', "garm-jammy-amd"] |
| 14 | + libc: ["musl", 'gnu'] |
| 15 | + name: Tests (x86-64) |
| 16 | + runs-on: ${{ github.event_name == 'pull_request' && !(matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') && 'ubuntu-latest' || format('{0}-16', matrix.runner) }} |
| 17 | + steps: |
| 18 | + - name: Code checkout |
| 19 | + if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }} |
| 20 | + uses: actions/checkout@v6 |
| 21 | + with: |
| 22 | + fetch-depth: 0 |
| 23 | + - name: Install Docker |
| 24 | + if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }} |
| 25 | + run: | |
| 26 | + sudo apt-get update |
| 27 | + sudo apt-get -y install ca-certificates curl gnupg |
| 28 | + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg |
| 29 | + sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg |
| 30 | + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
| 31 | + sudo apt-get update |
| 32 | + sudo apt install -y docker-ce docker-ce-cli |
| 33 | + - name: Prepare for VDPA |
| 34 | + if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }} |
| 35 | + run: scripts/prepare_vdpa.sh |
| 36 | + - name: Run unit tests |
| 37 | + if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }} |
| 38 | + run: scripts/dev_cli.sh tests --unit --libc ${{ matrix.libc }} |
| 39 | + - name: Load openvswitch module |
| 40 | + if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }} |
| 41 | + run: sudo modprobe openvswitch |
| 42 | + - name: Run integration tests |
| 43 | + if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }} |
| 44 | + timeout-minutes: 40 |
| 45 | + run: scripts/dev_cli.sh tests --integration --libc ${{ matrix.libc }} |
| 46 | + - name: Run live-migration integration tests |
| 47 | + if: ${{ github.event_name != 'pull_request' || (matrix.runner == 'garm-jammy' && matrix.libc == 'gnu') }} |
| 48 | + timeout-minutes: 20 |
| 49 | + run: scripts/dev_cli.sh tests --integration-live-migration --libc ${{ matrix.libc }} |
| 50 | + - name: Skipping build for PR |
| 51 | + if: ${{ github.event_name == 'pull_request' && matrix.runner != 'garm-jammy' && matrix.libc != 'gnu' }} |
| 52 | + run: echo "Skipping build for PR" |
0 commit comments