Skip to content

Commit

Permalink
Use custom action runner
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <mrtops03@gmail.com>
  • Loading branch information
ecdye committed Jun 2, 2024
1 parent cbab557 commit 36dd37f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ jobs:
path: ${{ steps.setup.outputs.image }}
key: ${{ steps.setup.outputs.image }}
- name: Build image
run: sudo -E ./tests/image.bash "setup" "${{ steps.setup.outputs.imagexz }}" "${{ steps.setup.outputs.image }}"
shell: bash
- name: Run tests
run: |
sudo -E ./tests/image.bash "setup" "${{ steps.setup.outputs.imagexz }}" "${{ steps.setup.outputs.image }}"
cp "${{ steps.setup.outputs.image }}" raspios.img
shell: bash
- name: Run tests
uses: pguyot/arm-runner-action@v2
base_image: file://raspios.img
cpu: cortex-a7
cpu_info: cpuinfo/raspberrypi_3b
commands: |
sudo expect ./tests/run.exp
shell: bash
- name: Copy logs
Expand Down
2 changes: 1 addition & 1 deletion tests/image.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if [[ $1 == "setup" ]]; then
gpg -q --trust-model always --verify "${2}.sig" "$2"
xz "$2" -d
fi
qemu-img resize -f raw "$3" 8G
qemu-img resize -f raw "$3" 4G
echo ", +" | sfdisk -N 2 "$3"
imageFile "mount" "$3"
rsync -avr --exclude="*.img" --exclude="*.sig" --exclude="tests/fs" --exclude="tests/dtb" --exclude="tests/kernel" ./ tests/fs/opt/zram
Expand Down
2 changes: 1 addition & 1 deletion tests/run.exp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set timeout -1
set loginUser "pi"
set loginPassword "raspberry"

spawn qemu-system-aarch64 -machine "raspi3b" -cpu arm1176 -m 1G -drive "format=raw,file=raspios.img" -dtb "./tests/dtb/bcm2710-rpi-3-b.dtb" -kernel "./tests/kernel/kernel8.img" -append "loglevel=0 quiet console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 fsck.repair=yes rootwait init=/bin/bash" -nographic -serial mon:stdio
# spawn qemu-system-aarch64 -machine "raspi3b" -cpu arm1176 -m 1G -drive "format=raw,file=raspios.img" -dtb "./tests/dtb/bcm2710-rpi-3-b.dtb" -kernel "./tests/kernel/kernel8.img" -append "loglevel=0 quiet console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 fsck.repair=yes rootwait init=/bin/bash" -nographic -serial mon:stdio

# Setup user
expect "root@(none):/# "
Expand Down

0 comments on commit 36dd37f

Please sign in to comment.