summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-08-23 11:05:02 +0200
committerGitHub <noreply@github.com>2022-08-23 11:05:02 +0200
commit00616643de7aad6d60a655b999bfbc23323fa37d (patch)
tree96b92eff8a6f92855a842fd9179456f2f6d39018 /.github
parent6b5e82408dbaf67bf86f81432be02ae02d30c182 (diff)
parent0e961391c17d4e487b323b6f3e0d3a1b183ba64a (diff)
downloadsystemd-00616643de7aad6d60a655b999bfbc23323fa37d.tar.gz
Merge pull request #24352 from DaanDeMeyer/mkosi-opensuse
mkosi: Update to latest commit
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/mkosi.yml16
-rwxr-xr-x.github/workflows/run_mkosi.sh39
2 files changed, 7 insertions, 48 deletions
diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml
index dddeb5fcb3..fa0a22a577 100644
--- a/.github/workflows/mkosi.yml
+++ b/.github/workflows/mkosi.yml
@@ -51,7 +51,7 @@ jobs:
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- - uses: systemd/mkosi@f37c19e7217a41c52d9a9a8769e98496255e2e2d
+ - uses: systemd/mkosi@d93967b94225ca63b3f5c18045db815439897b5c
- name: Install
run: sudo apt-get update && sudo apt-get install --no-install-recommends python3-pexpect python3-jinja2
@@ -70,22 +70,20 @@ jobs:
KernelCommandLine=${{ env.KERNEL_CMDLINE }}
EOF
- echo systemd-stable/ >> .gitignore
-
- name: Build ${{ matrix.distro }}
- run: ./.github/workflows/run_mkosi.sh build
+ run: sudo python3 -m mkosi build
- name: Show ${{ matrix.distro }} image summary
- run: ./.github/workflows/run_mkosi.sh summary
+ run: sudo python3 -m mkosi summary
- name: Boot ${{ matrix.distro }} systemd-nspawn
- run: ./.github/workflows/run_mkosi.sh boot ${{ env.KERNEL_CMDLINE }}
+ run: sudo python3 -m mkosi boot ${{ env.KERNEL_CMDLINE }}
- name: Check ${{ matrix.distro }} systemd-nspawn
- run: ./.github/workflows/run_mkosi.sh shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"
+ run: sudo python3 -m mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"
- name: Boot ${{ matrix.distro }} QEMU
- run: ./.github/workflows/run_mkosi.sh qemu
+ run: sudo timeout -k 30 10m python3 -m mkosi qemu
- name: Check ${{ matrix.distro }} QEMU
- run: ./.github/workflows/run_mkosi.sh shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"
+ run: sudo python3 -m mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"
diff --git a/.github/workflows/run_mkosi.sh b/.github/workflows/run_mkosi.sh
deleted file mode 100755
index acdb3fcee1..0000000000
--- a/.github/workflows/run_mkosi.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env bash
-# SPDX-License-Identifier: LGPL-2.1-or-later
-# shellcheck disable=SC2064
-
-set -eu
-set -o pipefail
-
-EC=0
-TEMPFILE="$(mktemp)"
-TEMP_EXTRA_TREE="$(mktemp --directory)"
-trap "rm -rf '$TEMPFILE' '$TEMP_EXTRA_TREE'" EXIT
-
-# We need isc-dhcp-server to be installed for the networkd unit tests, but we don't want to
-# run it by default. mktemp creates the directory as 700, so change it, otherwise it will
-# affect the image's root folder permissions.
-chmod 755 "$TEMP_EXTRA_TREE"
-mkdir -p "$TEMP_EXTRA_TREE/etc/systemd/system/"
-ln -s /dev/null "$TEMP_EXTRA_TREE/etc/systemd/system/isc-dhcp-server.service"
-ln -s /dev/null "$TEMP_EXTRA_TREE/etc/systemd/system/isc-dhcp-server6.service"
-
-for ((i = 0; i < 5; i++)); do
- EC=0
- (sudo timeout -k 30 10m python3 -m mkosi --extra-tree="$TEMP_EXTRA_TREE" "$@") |& tee "$TEMPFILE" || EC=$?
- if [[ $EC -eq 0 ]]; then
- # The command passed — let's return immediately
- break
- fi
-
- if ! grep -E "Failed to dissect image .+: Connection timed out" "$TEMPFILE"; then
- # The command failed for other reason than the dissect-related timeout -
- # let's exit with the same EC
- exit $EC
- fi
-
- # The command failed due to the dissect-related timeout — let's try again
- sleep 1
-done
-
-exit $EC