diff --git a/hack/ci/ci.sh b/hack/ci/ci.sh index 5d8eab61c1..9519a3973d 100755 --- a/hack/ci/ci.sh +++ b/hack/ci/ci.sh @@ -20,6 +20,7 @@ IMAGE_URL="https://objectstorage.us-ashburn-1.oraclecloud.com/n/id0lmbbwgcdv/b/p trap "limactl delete --force $LIMA_VM_NAME" EXIT +echo "::group::Starting VM" limactl --yes start --plain --name=$LIMA_VM_NAME --cpus $(nproc) --memory 8 --nested-virt \ --set ".images=[{\"location\":\"$IMAGE_URL\", \"arch\": \"x86_64\"}]" \ "$SCRIPT_DIR/template.lima.yml" @@ -28,12 +29,16 @@ limactl shell $LIMA_VM_NAME mkdir -p /var/tmp/podman-container-tools limactl copy "$REPO_DIR" $LIMA_VM_NAME:/var/tmp/podman-container-tools/podman +echo "::endgroup::" + set +e limactl shell --preserve-env --workdir /var/tmp/podman-container-tools/podman $LIMA_VM_NAME ./hack/ci/runner.sh "${@}" rc=$? +echo "::group::Collecting logs" limactl copy $LIMA_VM_NAME:/var/tmp/podman-container-tools/podman/hack/ci/logs/ $SCRIPT_DIR/logs +echo "::endgroup::" # TODO: figure out how to cache the binaries from the build job to the actual test tasks # Copy the binaries out of the VM in gh actions so we can upload them as artifact diff --git a/hack/ci/runner.sh b/hack/ci/runner.sh index f38d6571c1..7ba0f68435 100755 --- a/hack/ci/runner.sh +++ b/hack/ci/runner.sh @@ -9,6 +9,8 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) source "$SCRIPT_DIR/lib.sh" +echo "::group::Test Setup" + parse_args "$@" PRESERVE_ENVS="CI_USE_REGISTRY_CACHE,CI_DESIRED_COMPOSEFS,OCI_RUNTIME,CGROUP_MANAGER,STORAGE_FS,STORAGE_OPTIONS_OVERLAY,STORAGE_OPTIONS_VFS,PODMAN_UPGRADE_FROM" @@ -127,15 +129,14 @@ fi $SUDO git config --global user.name "Podman CI" $SUDO git config --global user.email "no-reply@podman.io" +echo "::endgroup::" # Test Setup + ### LOG various relevant things -echo -echo "#################" -echo "Setup complete, logging versions" -echo "#################" - +echo "::group::Logging system info" "$SCRIPT_DIR/logcollector.sh" packages "$SCRIPT_DIR/logcollector.sh" ip +echo "::endgroup::" # Logging system info mkdir -p "$SCRIPT_DIR/logs" # Log the journal at the end. @@ -228,9 +229,6 @@ function run_machine() { $SUDO make ${MODE}machine } -echo -echo "#################" echo "Starting Test" -echo "#################" run_$TEST