diff --git a/.github/workflows/install-test.yml b/.github/workflows/install-test.yml index 025b773..3235746 100644 --- a/.github/workflows/install-test.yml +++ b/.github/workflows/install-test.yml @@ -57,8 +57,16 @@ jobs: printf "#!/bin/sh\nexec /usr/bin/pacman --disable-sandbox \"\$@\"\n" >/usr/local/bin/pacman chmod 0755 /usr/local/bin/pacman fi - pacman -Syu --noconfirm --needed qemu-system-x86 qemu-hw-display-virtio-gpu qemu-hw-display-virtio-vga qemu-img edk2-ovmf socat \ - imagemagick tesseract tesseract-data-eng mtools dosfstools jq openssh openssl python curl >/dev/null + # The tools come from our own Arch mirror first, the public ones + # after it. A mirror that drops one file must not fail the test: + # try again. + sed -i "1i Server = https://mirror.omarchy.org/\$repo/os/\$arch" /etc/pacman.d/mirrorlist + for attempt in 1 2 3; do + pacman -Syu --noconfirm --needed qemu-system-x86 qemu-hw-display-virtio-gpu qemu-hw-display-virtio-vga qemu-img edk2-ovmf socat \ + imagemagick tesseract tesseract-data-eng mtools dosfstools jq openssh openssl python curl >/dev/null && break + [ "$attempt" -lt 3 ] || { echo "::error::the test container could not install its tools"; exit 1; } + echo "pacman failed, attempt $attempt of 3; trying again in 15 s"; sleep 15 + done # test/integration installs its tools through Omarchy'"'"'s helper; they are installed above. printf "#!/bin/sh\nexit 0\n" >/usr/local/bin/omarchy-pkg-add chmod 0755 /usr/local/bin/omarchy-pkg-add diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index d95a3bd..188d856 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -139,8 +139,16 @@ jobs: printf "#!/bin/sh\nexec /usr/bin/pacman --disable-sandbox \"\$@\"\n" >/usr/local/bin/pacman chmod 0755 /usr/local/bin/pacman fi - pacman -Syu --noconfirm --needed qemu-system-x86 qemu-hw-display-virtio-gpu qemu-hw-display-virtio-vga qemu-img edk2-ovmf socat \ - imagemagick tesseract tesseract-data-eng mtools dosfstools jq openssh openssl python curl binutils >/dev/null + # The tools come from our own Arch mirror first, the public ones + # after it. A mirror that drops one file must not fail the test: + # try again. + sed -i "1i Server = https://mirror.omarchy.org/\$repo/os/\$arch" /etc/pacman.d/mirrorlist + for attempt in 1 2 3; do + pacman -Syu --noconfirm --needed qemu-system-x86 qemu-hw-display-virtio-gpu qemu-hw-display-virtio-vga qemu-img edk2-ovmf socat \ + imagemagick tesseract tesseract-data-eng mtools dosfstools jq openssh openssl python curl binutils >/dev/null && break + [ "$attempt" -lt 3 ] || { echo "::error::the test container could not install its tools"; exit 1; } + echo "pacman failed, attempt $attempt of 3; trying again in 15 s"; sleep 15 + done # test/integration installs its tools through Omarchy'"'"'s helper; they are installed above. printf "#!/bin/sh\nexit 0\n" >/usr/local/bin/omarchy-pkg-add chmod 0755 /usr/local/bin/omarchy-pkg-add diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index af8c1f2..6310014 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -46,7 +46,14 @@ jobs: sleep 1 done echo "systemd: $state" - pacman -Syu --noconfirm --needed python parted diffutils jq >/dev/null + # From our own Arch mirror first, and a second and third try: a + # mirror that drops one file must not fail the tests. + sed -i "1i Server = https://mirror.omarchy.org/\$repo/os/\$arch" /etc/pacman.d/mirrorlist + for attempt in 1 2 3; do + pacman -Syu --noconfirm --needed python parted diffutils jq >/dev/null && break + [ "$attempt" -lt 3 ] || { echo "::error::the test container could not install its tools"; exit 1; } + sleep 15 + done useradd -m tester cp -r /src /home/tester/omarchy-iso chown -R tester /home/tester/omarchy-iso