2024-02-27 18:23:34 +00:00
|
|
|
name: Cloud Hypervisor Tests (Windows Guest)
|
2024-02-28 11:54:27 +00:00
|
|
|
on: [merge_group, pull_request]
|
2024-02-28 15:17:57 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2024-02-27 18:23:34 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Tests (Windows Guest)
|
2024-02-28 11:54:27 +00:00
|
|
|
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'garm-jammy' }}
|
2024-02-27 18:23:34 +00:00
|
|
|
steps:
|
|
|
|
- name: Code checkout
|
2024-02-28 11:54:27 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2024-02-27 18:23:34 +00:00
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Install Docker
|
2024-02-28 11:54:27 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2024-02-27 18:23:34 +00:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install ca-certificates curl gnupg
|
|
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
|
|
|
sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg
|
|
|
|
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
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt install -y docker-ce docker-ce-cli
|
|
|
|
- name: Install Azure CLI
|
2024-02-28 11:54:27 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2024-02-27 18:23:34 +00:00
|
|
|
run: |
|
|
|
|
sudo apt install -y ca-certificates curl apt-transport-https lsb-release gnupg
|
|
|
|
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
|
|
|
|
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ jammy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y azure-cli
|
|
|
|
- name: Download Windows image
|
2024-02-28 11:54:27 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2024-02-27 18:23:34 +00:00
|
|
|
run: |
|
|
|
|
mkdir $HOME/workloads
|
|
|
|
az storage blob download --container-name private-images --file "$HOME/workloads/windows-server-2022-amd64-2.raw" --name windows-server-2022-amd64-2.raw --connection-string "${{ secrets.CH_PRIVATE_IMAGES }}"
|
|
|
|
- name: Run Windows guest integration tests
|
2024-02-28 11:54:27 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2024-02-27 18:23:34 +00:00
|
|
|
timeout-minutes: 15
|
|
|
|
run: scripts/dev_cli.sh tests --integration-windows
|
|
|
|
- name: Run Windows guest integration tests for musl
|
2024-02-28 11:54:27 +00:00
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
2024-02-27 18:23:34 +00:00
|
|
|
timeout-minutes: 15
|
|
|
|
run: scripts/dev_cli.sh tests --integration-windows --libc musl
|
2024-02-28 11:54:27 +00:00
|
|
|
- name: Skipping build for PR
|
|
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
|
|
run: echo "Skipping build for PR"
|