Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] GitHub action improve
Date: Mon, 14 Dec 2020 03:07:06 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27136@inbox.vuxu.org> (raw)

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

             reply	other threads:[~2020-12-14  2:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14  2:07 sgn [this message]
2020-12-14  2:16 ` ericonr
2020-12-14  2:19 ` [PR PATCH] [Closed]: " sgn
2020-12-14  2:19 ` sgn
2020-12-14  2:24 ` sgn
2020-12-14  2:26 ` ericonr
2020-12-14  2:34 ` [PR PATCH] [Closed]: " sgn

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-27136@inbox.vuxu.org \
    --to=sgn@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).