Use older base image #270
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
# Trigger the workflow on push or pull request | |
on: | |
push: | |
paths: | |
- 'zram-config' | |
- '**.bash' | |
- 'tests/**' | |
- '.github/workflows/test-action.yml' | |
pull_request: | |
paths: | |
- 'zram-config' | |
- '**.bash' | |
- 'tests/**' | |
- '.github/workflows/test-action.yml' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup environment | |
id: setup | |
run: | | |
sudo -E bash -c set | |
sudo add-apt-repository ppa:canonical-server/server-backports | |
sudo apt-get update | |
sudo apt-get install --yes gnupg xz-utils expect systemd-container qemu-user-static qemu-utils qemu-system-arm libfdt-dev isc-dhcp-client iproute2 | |
echo "imagexz=$(basename "$(curl "https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz" -s -L -I -o /dev/null -w '%{url_effective}')")" >> $GITHUB_OUTPUT | |
echo "image=$(echo "$(basename "$(curl "https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz" -s -L -I -o /dev/null -w '%{url_effective}')")" | sed -e 's/.xz//')" >> $GITHUB_OUTPUT | |
# echo "imagexz=$(basename "$(curl "https://downloads.raspberrypi.org/raspios_lite_armhf_latest" -s -L -I -o /dev/null -w '%{url_effective}')")" >> $GITHUB_OUTPUT | |
# echo "image=$(echo "$(basename "$(curl "https://downloads.raspberrypi.org/raspios_lite_armhf_latest" -s -L -I -o /dev/null -w '%{url_effective}')")" | sed -e 's/.xz//')" >> $GITHUB_OUTPUT | |
- name: Create Bridge | |
run: | | |
sudo ip link add name br0 type bridge | |
sudo ip addr add 192.168.100.1/24 dev br0 | |
sudo ip link set br0 up | |
- name: Create TAP device | |
run: | | |
sudo ip tuntap add dev tap0 mode tap user $USER | |
sudo ip link set tap0 up | |
sudo ip link set tap0 master br0 | |
- name: Cache Raspberry Pi OS 32bit image | |
uses: actions/cache@v4 | |
with: | |
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: | | |
cp "${{ steps.setup.outputs.image }}" raspios.img | |
sudo expect ./tests/run.exp | |
shell: bash | |
- name: Copy logs | |
if: always() | |
run: sudo ./tests/image.bash "copy-logs" "raspios.img" | |
- name: Upload logs | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs.tar | |
path: logs.tar |