Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] GitHub action improve
@ 2020-12-14  2:07 sgn
  2020-12-14  2:16 ` ericonr
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: sgn @ 2020-12-14  2:07 UTC (permalink / raw)
  To: ml

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

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

https://github.com/sgn/void-packages github-action-improve
https://github.com/void-linux/void-packages/pull/27136

GitHub action improve


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-github-action-improve-27136.patch --]
[-- Type: text/x-diff, Size: 3102 bytes --]

From 06f4a9805dcb5cd74dcf848a3952e1152fc01985 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 14 Dec 2020 08:35:54 +0700
Subject: [PATCH 1/2] GitHub Action: fetch xtools instead of installing from
 repo

Avoid its dependencies inside build container.
---
 .github/workflows/build.yaml  |  3 ++-
 common/travis/fetch-xtools.sh | 26 +++++++++++++++++++++++---
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 8535d3b24b1..27213c47543 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -56,7 +56,7 @@ jobs:
           # Upgrade again (in case there was a xbps update)
           xbps-install -yu
           # Install git
-          xbps-install -y git xtools
+          xbps-install -y git
 
       - uses: actions/checkout@v1
         with:
@@ -67,6 +67,7 @@ jobs:
       - run: common/travis/prepare.sh
       - run: common/travis/fetch_upstream.sh
       - run: common/travis/changed_templates.sh
+      - run: common/travis/fetch-xtools.sh
 
       - name: Build packages
         run: |
diff --git a/common/travis/fetch-xtools.sh b/common/travis/fetch-xtools.sh
index 7abf44bcc12..d71b0fb46fa 100755
--- a/common/travis/fetch-xtools.sh
+++ b/common/travis/fetch-xtools.sh
@@ -5,6 +5,26 @@
 mkdir -p /tmp/bin
 
 /bin/echo -e '\x1b[32mInstalling xtools...\x1b[0m'
-wget -q -O - https://github.com/leahneukirchen/xtools/archive/master.tar.gz | \
-	gunzip | tar x -C /tmp/bin --wildcards "xtools-master/x*" \
-	--strip-components=1 || exit 1
+
+if command -v bsdtar >/dev/null; then
+	TAR=bsdtar
+	_tar_wildcard=
+elif command -v tar >/dev/null; then
+	TAR=tar
+	_tar_wildcard=--wildcards
+else
+	echo "tar and bsdtar: not found"
+	exit 1
+fi
+
+_link=https://github.com/leahneukirchen/xtools/archive/master.tar.gz
+if command -v xbps-fetch >/dev/null; then
+	xbps-fetch $_link >/dev/null 2>&1
+	cat ${_link##*/}
+else
+	wget -q -O - $_link
+fi |
+gunzip |
+$TAR xf - -C /tmp/bin --strip-components=1 ${_tar_wildcard} "xtools-master/x*" ||
+exit 1
+rm -f ${_link##*/}

From dd723c20b61136f7ac29226678df361c25bf1560 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Mon, 14 Dec 2020 09:04:18 +0700
Subject: [PATCH 2/2] GitHub Action: remove git after checkout

The exists of git inside container could interfere with build system
that sensitive to gitdir.
---
 .github/workflows/build.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 27213c47543..fde53f13e9e 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -61,6 +61,8 @@ jobs:
       - uses: actions/checkout@v1
         with:
           fetch-depth: 200
+      - name: Remove git after checkout to not interfere with build
+        run: xbps-remove git && xbps-remove -o
       - name: Create hostrepo
         run: ln -s "$(pwd)" /hostrepo
       - run: common/travis/set_mirror.sh

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

* Re: GitHub action improve
  2020-12-14  2:07 [PR PATCH] GitHub action improve sgn
@ 2020-12-14  2:16 ` ericonr
  2020-12-14  2:19 ` sgn
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ericonr @ 2020-12-14  2:16 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27136#issuecomment-744124101

Comment:
Have you taken a look at my changes in #26773 ? They include similar fixes...

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

* Re: GitHub action improve
  2020-12-14  2:07 [PR PATCH] GitHub action improve sgn
  2020-12-14  2:16 ` ericonr
@ 2020-12-14  2:19 ` sgn
  2020-12-14  2:19 ` [PR PATCH] [Closed]: " sgn
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sgn @ 2020-12-14  2:19 UTC (permalink / raw)
  To: ml

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

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27136#issuecomment-744124836

Comment:
> Have you taken a look at my changes in #26773 ? They include similar fixes...

No, I haven't look into PR for a while xD

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

* Re: [PR PATCH] [Closed]: GitHub action improve
  2020-12-14  2:07 [PR PATCH] GitHub action improve sgn
  2020-12-14  2:16 ` ericonr
  2020-12-14  2:19 ` sgn
@ 2020-12-14  2:19 ` sgn
  2020-12-14  2:24 ` sgn
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sgn @ 2020-12-14  2:19 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the void-packages repository

GitHub action improve
https://github.com/void-linux/void-packages/pull/27136

Description:


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

* Re: GitHub action improve
  2020-12-14  2:07 [PR PATCH] GitHub action improve sgn
                   ` (2 preceding siblings ...)
  2020-12-14  2:19 ` [PR PATCH] [Closed]: " sgn
@ 2020-12-14  2:24 ` sgn
  2020-12-14  2:26 ` ericonr
  2020-12-14  2:34 ` [PR PATCH] [Closed]: " sgn
  5 siblings, 0 replies; 7+ messages in thread
From: sgn @ 2020-12-14  2:24 UTC (permalink / raw)
  To: ml

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

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27136#issuecomment-744125931

Comment:
@ericonr Anyway, I think the change to `fetch-xtools.sh` and `xbps-remove git` could be merged now. As of it's now, the `show-files` step couldn't work.

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

* Re: GitHub action improve
  2020-12-14  2:07 [PR PATCH] GitHub action improve sgn
                   ` (3 preceding siblings ...)
  2020-12-14  2:24 ` sgn
@ 2020-12-14  2:26 ` ericonr
  2020-12-14  2:34 ` [PR PATCH] [Closed]: " sgn
  5 siblings, 0 replies; 7+ messages in thread
From: ericonr @ 2020-12-14  2:26 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27136#issuecomment-744126403

Comment:
I think my PR is ready to merge now, if you agree with my reasoning re. the wildcards.

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

* Re: [PR PATCH] [Closed]: GitHub action improve
  2020-12-14  2:07 [PR PATCH] GitHub action improve sgn
                   ` (4 preceding siblings ...)
  2020-12-14  2:26 ` ericonr
@ 2020-12-14  2:34 ` sgn
  5 siblings, 0 replies; 7+ messages in thread
From: sgn @ 2020-12-14  2:34 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the void-packages repository

GitHub action improve
https://github.com/void-linux/void-packages/pull/27136

Description:


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

end of thread, other threads:[~2020-12-14  2:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14  2:07 [PR PATCH] GitHub action improve sgn
2020-12-14  2:16 ` ericonr
2020-12-14  2:19 ` sgn
2020-12-14  2:19 ` [PR PATCH] [Closed]: " sgn
2020-12-14  2:24 ` sgn
2020-12-14  2:26 ` ericonr
2020-12-14  2:34 ` [PR PATCH] [Closed]: " sgn

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