Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Allow build & check packages in addition to changed templates
@ 2023-12-23 22:06 tornaria
  2023-12-23 22:09 ` classabbyamp
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tornaria @ 2023-12-23 22:06 UTC (permalink / raw)
  To: ml

[-- 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-23 11:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-23 22:06 [PR PATCH] Allow build & check packages in addition to changed templates tornaria
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

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).