Skip to content

Commit cc795d6

Browse files
committed
[DO_NOT_MERGE] [TEST] Trying ARM runners
Enable GitHub CI for Arm FVP using Shrinkwrap on Arm64 runners This patch introduces a GitHub CI workflow to enable automated build and test validation for Arm FVP platforms using Shrinkwrap. The workflow leverages GitHub-hosted Arm64 runners to perform firmware testing on an architecture-aligned host, improving validation accuracy. What is Shrinkwrap? Shrinkwrap is a tool that simplifies the process of building and running firmware on Arm Fixed Virtual Platforms (FVP). It enables automated testing and validation, reducing manual effort. Why is this needed? - Ensures firmware validation on an Arm64 machine, reducing failures. - Provides a closer match to real-world deployment environments. - Helps identify regressions earlier, improving upstream stability. - Moves away from x86-based CI, reducing inconsistencies. How does this work? 1. Checks out the repository. 2. Installs required dependencies (git, python3, pip, etc.). 3. Clones Shrinkwrap from Arm GitLab. 4. Downloads and extracts the kernel image and root filesystem. 5. Runs Shrinkwrap for build and test execution. Signed-off-by: Aishwarya TCV <aishwarya.tcv@arm.com>
1 parent 4ce9e8d commit cc795d6

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Run Shrinkwrap to Validate Arm Platform
2+
3+
on:
4+
workflow_dispatch: # Manually triggered workflow
5+
6+
jobs:
7+
shrinkwrap:
8+
runs-on: ubuntu-22.04-arm
9+
10+
steps:
11+
- name: Checkout Repository
12+
uses: actions/checkout@v4
13+
14+
- name: Install Required System Packages
15+
run: |
16+
set -e # Exit immediately on error
17+
apt-get update -qq
18+
apt-get install -y git netcat-openbsd python3 python3-pip telnet wget
19+
20+
- name: Install Python Dependencies
21+
run: pip3 install pyyaml termcolor tuxmake
22+
23+
- name: Clone Shrinkwrap, Download Required Files, and Execute Tests
24+
run: |
25+
set -e # Exit immediately if any command fails
26+
27+
# Clone Shrinkwrap repository
28+
echo "Cloning Shrinkwrap repository..."
29+
git clone https://git.gitlab.arm.com/tooling/shrinkwrap.git
30+
export PATH=$PWD/shrinkwrap/shrinkwrap:$PATH
31+
32+
# Verify Shrinkwrap installation
33+
echo "Verifying Shrinkwrap installation..."
34+
shrinkwrap --help || { echo "Shrinkwrap not found"; exit 1; }
35+
36+
# Define URLs for Kernel Image and Root Filesystem
37+
KERNEL_URL="https://kciapistagingstorage1.file.core.windows.net/production/kbuild-gcc-12-arm64-kselftest-67bb89e7e3e60eeff6099cdc/Image?sv=2022-11-02&ss=f&srt=sco&sp=r&se=2026-10-18T13:36:18Z&st=2024-10-17T05:36:18Z&spr=https&sig=xFxYOOh5uXJWeN9I3YKAUvpGGQivo89HKZbD78gcxvc%3D"
38+
ROOTFS_URL="https://storage.kernelci.org/images/rootfs/debian/bookworm/20240715.0/arm64/rootfs.ext4.xz"
39+
40+
# Download Kernel Image and Root Filesystem
41+
echo "Downloading Kernel Image and Root Filesystem..."
42+
cd shrinkwrap
43+
wget -O Image "$KERNEL_URL"
44+
wget -O rootfs.ext4.xz "$ROOTFS_URL"
45+
unxz rootfs.ext4.xz
46+
cd -
47+
48+
# Run Shrinkwrap Build Process
49+
echo "Starting Shrinkwrap Build..."
50+
shrinkwrap -R null build --overlay=arch/v9.4.yaml ns-edk2.yaml
51+
52+
# Run Shrinkwrap Test Execution
53+
echo "Executing Shrinkwrap Tests..."
54+
shrinkwrap -R null run \
55+
--overlay='{"run":{"params":{"-C bp.pl011_uart0.shutdown_tag": "login:"}}}' \
56+
--rtvar=KERNEL=$PWD/shrinkwrap/Image \
57+
--rtvar=ROOTFS=$PWD/shrinkwrap/rootfs.ext4 \
58+
--rtvar=CMDLINE="console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda1 ip=dhcp acpi=force" \
59+
ns-edk2.yaml

0 commit comments

Comments
 (0)