From 8797abb53155c2f6be0e2fd5d03d84da361b752e Mon Sep 17 00:00:00 2001 From: Naveen M K Date: Sun, 16 May 2021 22:10:36 +0530 Subject: [PATCH] use gha groups correctly --- .ci/ci-check.py | 35 ++++++++++++++++++++++++----------- mingw-w64-meson/PKGBUILD | 2 +- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.ci/ci-check.py b/.ci/ci-check.py index fd79f2c3be..42f200559b 100644 --- a/.ci/ci-check.py +++ b/.ci/ci-check.py @@ -9,7 +9,9 @@ import sys import tarfile import tempfile import typing +from contextlib import contextmanager from pathlib import Path +from sys import stdout logging.basicConfig(level=logging.INFO, format="%(message)s") logger = logging.getLogger(__file__) @@ -86,18 +88,29 @@ def run_pip_check(pkg: str) -> None: logger.info("All dependencies are correct satisfied for %s", pkg) -def main(): - print("::group:: Outputs") - for pkgloc in ARTIFACTS_LOCATION.glob("*.pkg.tar.*"): - pkgname = "-".join(pkgloc.name.split("-")[:-3]) - logger.info("Pkgname: %s", pkgname) - logger.info("Installing Package.") - install_package(pkgloc, local=True) - rdeps = get_rdeps(pkgname) - for dep in rdeps: - install_package(dep, local=False) +@contextmanager +def gha_group(title: str) -> typing.Generator: + print(f"\n::group::{title}") + stdout.flush() + try: + yield + finally: print("::endgroup::") - run_pip_check(pkgname) + stdout.flush() + + +def main(): + for pkgloc in ARTIFACTS_LOCATION.glob("*.pkg.tar.*"): + with gha_group(f"Debug: {pkgloc.name}"): + pkgname = "-".join(pkgloc.name.split("-")[:-3]) + logger.info("Pkgname: %s", pkgname) + logger.info("Installing Package.") + install_package(pkgloc, local=True) + rdeps = get_rdeps(pkgname) + for dep in rdeps: + install_package(dep, local=False) + with gha_group(f"Pip Output: {pkgloc.name}"): + run_pip_check(pkgname) def check_whether_we_should_run() -> bool: diff --git a/mingw-w64-meson/PKGBUILD b/mingw-w64-meson/PKGBUILD index 8ed8acb9f7..c1b723d0c6 100644 --- a/mingw-w64-meson/PKGBUILD +++ b/mingw-w64-meson/PKGBUILD @@ -4,7 +4,7 @@ _realname=meson pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.58.0 -pkgrel=2 +pkgrel=1 pkgdesc="High-productivity build system (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')