mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Unfortunately with a single ARM64 machine this has now become a bottleneck for landing PRs. Copy the methodology we use for existing jobs that we only run on the MQ by creating dummy jobs that run on the GH hosted runner (ubuntu-latest) allowing the PR to transition into the MQ by passing the required checks. Signed-off-by: Rob Bradford <rbradford@meta.com>
63 lines
2.8 KiB
YAML
63 lines
2.8 KiB
YAML
name: Cloud Hypervisor Tests (ARM64)
|
|
on: [pull_request, merge_group]
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event_name }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
timeout-minutes: 120
|
|
name: Tests (ARM64)
|
|
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'bookworm-arm64' }}
|
|
steps:
|
|
- name: Fix workspace permissions
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
run: sudo chown -R runner:runner ${GITHUB_WORKSPACE}
|
|
- name: Code checkout
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Run unit tests (musl)
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
run: scripts/dev_cli.sh tests --unit --libc musl
|
|
- name: Load openvswitch module
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
run: sudo modprobe openvswitch
|
|
- name: Run integration tests (musl)
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
timeout-minutes: 60
|
|
run: scripts/dev_cli.sh tests --integration --libc musl
|
|
- name: Install Azure CLI
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
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=arm64] https://packages.microsoft.com/repos/azure-cli/ bookworm main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
|
|
sudo apt update
|
|
sudo apt install -y azure-cli
|
|
- name: Download Windows image
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
shell: bash
|
|
run: |
|
|
IMG_BASENAME=windows-11-iot-enterprise-aarch64.raw
|
|
IMG_PATH=$HOME/workloads/$IMG_BASENAME
|
|
IMG_GZ_PATH=$HOME/workloads/$IMG_BASENAME.gz
|
|
IMG_GZ_BLOB_NAME=windows-11-iot-enterprise-aarch64-9-min.raw.gz
|
|
cp "scripts/$IMG_BASENAME.sha1" "$HOME/workloads/"
|
|
pushd "$HOME/workloads"
|
|
if sha1sum "$IMG_BASENAME.sha1" --check; then
|
|
exit
|
|
fi
|
|
popd
|
|
mkdir -p "$HOME/workloads"
|
|
az storage blob download --container-name private-images --file "$IMG_GZ_PATH" --name "$IMG_GZ_BLOB_NAME" --connection-string "${{ secrets.CH_PRIVATE_IMAGES }}"
|
|
gzip -d $IMG_GZ_PATH
|
|
- name: Run Windows guest integration tests
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
timeout-minutes: 30
|
|
run: scripts/dev_cli.sh tests --integration-windows --libc musl
|
|
- name: Skipping build for PR
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
run: echo "Skipping build for PR"
|