Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] Allow build & check packages in addition to changed templates
Date: Sat, 23 Dec 2023 23:06:46 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47887@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1756 bytes --]

There is a new pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages build-check-extra
https://github.com/void-linux/void-packages/pull/47887

Allow build & check packages in addition to changed templates
To use, add "[ci check pkg1 pkg2 ...]" in PR title or body.

The idea is that sometimes I change some package but I want to test if another package (depending on the changed package) builds and checks ok (example #47610, or when updating ipython / cython / etc try build&check sagemath to see everything is fine, etc).

The implementation is just passing the pr title and body in the environment and have changed_templates.sh scan these for "[ci check ...]"

#### Testing the changes
- I tested the changes in this PR: **YES**

See: https://github.com/tornaria/void-packages/actions/runs/7310706260/job/19919574047

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/47887.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-build-check-extra-47887.patch --]
[-- Type: text/x-diff, Size: 1757 bytes --]

From 56e87bf7b253843719f7503121d028b15c37ddd8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 23 Dec 2023 14:07:40 -0300
Subject: [PATCH] Allow build & check extra packages

To use, add "[ci check pkg1 pkg2 ...]" in PR title or body.
---
 .github/workflows/build.yaml       |  2 ++
 common/travis/changed_templates.sh | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 031ff6e9243c2..ac26a3cd8778d 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -69,6 +69,8 @@ jobs:
         BOOTSTRAP: '${{ matrix.config.host }}'
         TEST: '${{ matrix.config.test }}'
         HOSTREPO: /hostrepo
+        PR_TITLE: '${{ github.event.pull_request.title }}'
+        PR_BODY: '${{ github.event.pull_request.body }}'
 
     strategy:
       fail-fast: false
diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 074c991d33afe..958629b8fee9a 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -2,6 +2,9 @@
 #
 # changed_templates.sh
 
+ci_check=$( echo -e "$PR_TITLE\n$PR_BODY" |
+	sed -ne 's/.*\[ci \+check \+\([^]]*[^ ]\) *].*/\1/p' )
+
 tip="$(git rev-list -1 --parents HEAD)"
 case "$tip" in
 	# This is a merge commit, pick last parent
@@ -27,3 +30,11 @@ git diff-tree -r --no-renames --name-only --diff-filter=AM \
 	xargs ./xbps-src sort-dependencies |
 	tee /tmp/templates |
 	sed "s/^/  /" >&2
+
+if [ -n "$ci_check" ]; then
+	/bin/echo -e '\x1b[32mAdditional packages to build and check:\x1b[0m'
+	printf "%s\n" $ci_check |
+		xargs ./xbps-src sort-dependencies |
+		tee -a /tmp/templates |
+		sed "s/^/  /" >&2
+fi

             reply	other threads:[~2023-12-23 22:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-23 22:06 tornaria [this message]
2023-12-23 22:09 ` classabbyamp
2023-12-24  0:21 ` tornaria
2024-03-23  1:44 ` github-actions
2024-03-23 11:57 ` tornaria
2024-06-22  1:47 ` github-actions
2024-06-22  8:47 ` tornaria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47887@inbox.vuxu.org \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).