Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [RFC] enable tests in CI
Date: Wed, 02 Dec 2020 19:14:52 +0100	[thread overview]
Message-ID: <20201202181452.I-YLi8uVEe4MklyKBsK68M7oUUSLtq-FyJIsC-CkgNE@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26773@inbox.vuxu.org>

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

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages ci
https://github.com/void-linux/void-packages/pull/26773

[RFC] enable tests in CI
This probably needs some work in templates to define a cheap `do_check` and a more expensive `do_all_checks` or whatever.

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

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

From 9fad2c20a36d05efa30e3bebfb62cd7b5fc2696c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sat, 28 Nov 2020 15:48:53 -0300
Subject: [PATCH 1/3] [temporary] test make's test suite.

---
 srcpkgs/make/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/make/template b/srcpkgs/make/template
index 0aebcbc70be..eecf8233b05 100644
--- a/srcpkgs/make/template
+++ b/srcpkgs/make/template
@@ -1,4 +1,5 @@
 # Template file for 'make'
+# time to test
 pkgname=make
 version=4.3
 revision=3

From 7c06a588b3820738322e4206df9250deb4224aac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sat, 28 Nov 2020 15:47:04 -0300
Subject: [PATCH 2/3] .github/workflows: run tests on CI for native builds.

Also fix "list contents" step by adding a fetch-xtools step.
---
 .github/workflows/build.yaml | 18 ++++++++++--------
 common/travis/build.sh       |  6 +++++-
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 33186037f8d..6fd7047fe3c 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -34,19 +34,20 @@ jobs:
         PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
         ARCH: '${{ matrix.config.arch }}'
         BOOTSTRAP: '${{ matrix.config.bootstrap }}'
+        TEST: '${{ matrix.config.test }}'
         HOSTREPO: /hostrepo
 
     strategy:
       fail-fast: false
       matrix:
         config:
-          - { arch: x86_64, bootstrap: x86_64 }
-          - { arch: i686, bootstrap: i686 }
-          - { arch: aarch64, bootstrap: x86_64 }
-          - { arch: armv7l, bootstrap: x86_64 }
-          - { arch: x86_64-musl, bootstrap: x86_64-musl }
-          - { arch: armv6l-musl, bootstrap: x86_64-musl }
-          - { arch: aarch64-musl, bootstrap: x86_64-musl }
+          - { arch: x86_64, bootstrap: x86_64, test: 1 }
+          - { arch: i686, bootstrap: i686, test: 1 }
+          - { arch: aarch64, bootstrap: x86_64, test: 0 }
+          - { arch: armv7l, bootstrap: x86_64, test: 0 }
+          - { arch: x86_64-musl, bootstrap: x86_64-musl, test: 1 }
+          - { arch: armv6l-musl, bootstrap: x86_64-musl, test: 0 }
+          - { arch: aarch64-musl, bootstrap: x86_64-musl, test: 0 }
 
     steps:
       - name: Prepare container
@@ -73,9 +74,10 @@ jobs:
           (
           here="$(pwd)"
           cd /
-          "$here/common/travis/build.sh" "$BOOTSTRAP" "$ARCH"
+          "$here/common/travis/build.sh" "$BOOTSTRAP" "$ARCH" "$TEST"
           )
 
+      - run: common/travis/fetch-xtools.sh
       - name: Show files
         run: |
           (
diff --git a/common/travis/build.sh b/common/travis/build.sh
index 1c45910ea69..2f16bd740dc 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -6,6 +6,10 @@ if [ "$1" != "$2" ]; then
 	arch="-a $2"
 fi
 
+if [ "$3" = 1 ]; then
+	test="-Q"
+fi
+
 PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
 
 NPROCS=1
@@ -16,7 +20,7 @@ fi
 export FTP_RETRIES=10
 
 for pkg in ${PKGS}; do
-	/hostrepo/xbps-src -j$NPROCS -H "$HOME"/hostdir $arch pkg "$pkg"
+	/hostrepo/xbps-src -j$NPROCS -H "$HOME"/hostdir $arch $test pkg "$pkg"
 	[ $? -eq 1 ] && exit 1
 done
 

From 8939cf7dc4b035037aa0a996e03f1eacdade3ab6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Wed, 2 Dec 2020 15:06:37 -0300
Subject: [PATCH 3/3] common/travis/fetch-xtools: make it work inside void
 masterdir.

---
 common/travis/fetch-xtools.sh | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/common/travis/fetch-xtools.sh b/common/travis/fetch-xtools.sh
index 7abf44bcc12..9dfc940c6b5 100755
--- a/common/travis/fetch-xtools.sh
+++ b/common/travis/fetch-xtools.sh
@@ -2,9 +2,18 @@
 #
 # fetch-xtools.sh
 
+TAR=tar
+command -v bsdtar >/dev/null && TAR=bsdtar
+URL="https://github.com/leahneukirchen/xtools/archive/master.tar.gz"
+FILE="xtools.tar.gz"
+
 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 wget >/dev/null; then
+	wget -q -O "$FILE" "$URL" || exit 1
+else
+	xbps-fetch -o "$FILE" "$URL" || exit 1
+fi
+
+gunzip < "$FILE" | $TAR x -C /tmp/bin --strip-components=1 || exit 1

  parent reply	other threads:[~2020-12-02 18:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26773@inbox.vuxu.org>
2020-12-02 18:07 ` ericonr
2020-12-02 18:14 ` ericonr [this message]
2020-12-02 18:20 ` ericonr
2020-12-02 18:32 ` ericonr
2020-12-02 18:38 ` ericonr
2020-12-02 18:44 ` ericonr
2020-12-07 22:19 ` ericonr
2020-12-07 23:23 ` ericonr
2020-12-07 23:24 ` [RFC] enable tests in CI and introduce XBPS_CHECK_PKGS=full ericonr
2020-12-07 23:27 ` [PR PATCH] [Updated] " ericonr
2020-12-07 23:29 ` ericonr
2020-12-07 23:30 ` ericonr
2020-12-08 15:27 ` ericonr
2020-12-08 15:37 ` ericonr
2020-12-08 17:35 ` Chocimier
2020-12-08 18:19 ` ericonr
2020-12-12  6:54 ` [PR PATCH] [Updated] " ericonr
2020-12-14  2:20 ` ericonr
2020-12-14  2:22 ` [PR REVIEW] " sgn
2020-12-14  2:25 ` ericonr
2020-12-14  2:36 ` [PR PATCH] [Updated] " ericonr
2020-12-14  2:49 ` ericonr
2020-12-14  2:51 ` ericonr
2020-12-14  3:18 ` [PR PATCH] [Merged]: " ericonr

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=20201202181452.I-YLi8uVEe4MklyKBsK68M7oUUSLtq-FyJIsC-CkgNE@z \
    --to=ericonr@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).