From c4baae079cc3327e7a24cf36abfd944ef09c4556 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 2 Oct 2024 11:48:12 +0100 Subject: [PATCH] build: Enable ARM64 worker This is based on a revert of commit ce49a6f4b8f363cebe9886518f9ba270f9745f66 with some modifications for a different worker configuration. Signed-off-by: Rob Bradford --- .github/workflows/integration-arm64.yaml | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/integration-arm64.yaml diff --git a/.github/workflows/integration-arm64.yaml b/.github/workflows/integration-arm64.yaml new file mode 100644 index 000000000..e5ba47201 --- /dev/null +++ b/.github/workflows/integration-arm64.yaml @@ -0,0 +1,54 @@ +name: Cloud Hypervisor Tests (ARM64) +on: [pull_request, merge_group] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + timeout-minutes: 60 + name: Tests (ARM64) + runs-on: bookworm-arm64 + steps: + - name: Fix workspace permissions + run: sudo chown -R runner:runner ${GITHUB_WORKSPACE} + - name: Code checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run unit tests (musl) + run: scripts/dev_cli.sh tests --unit --libc musl + - name: Load openvswitch module + run: sudo modprobe openvswitch + - name: Run integration tests (musl) + timeout-minutes: 30 + 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