threads / patch / 52335

patchci: add Cirrus-CI config for FreeBSD CI

Subject: [PATCH] ci: add Cirrus-CI config for FreeBSD CI

## tl;dr

6 messages between Nov 25, 2019 and Dec 20, 2019. Diffs are folded; open one to read it.

replies: 5people: 3as markdown or json

Ed Maste· Nov 25, 2019, 20:37 UTC · lore
From: Ed Maste <emaste@freebsd.org>

Cirrus-CI is relatively unique among hosted CI providers in supporting FreeBSD (in addition to Linux, Windows, and macOS). Add a Cirrus-CI config to facilitate building and testing on FreeBSD.

Signed-off-by: Ed Maste <emaste@freebsd.org>
---
6 i18n tests are currently failing and need investigation.
Example result: https://cirrus-ci.com/task/5394512637067264
Test log: https://api.cirrus-ci.com/v1/task/5394512637067264/logs/test.log
 .cirrus.yml | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 .cirrus.yml
Show changes to .cirrus.yml +12 −0
diff --git a/.cirrus.yml b/.cirrus.yml
new file mode 100644
index 0000000000..47d871ded5
--- /dev/null
+++ b/.cirrus.yml
@@ -0,0 +1,12 @@
+env:
+  CIRRUS_CLONE_DEPTH: 1
+
+freebsd_12_task:
+  freebsd_instance:
+    image: freebsd-12-1-release-amd64
+  install_script:
+    pkg install -y gettext gmake perl5
+  build_script:
+    - gmake
+  test_script:
+    - gmake test
-- 
2.24.0
brian m. carlson· Nov 26, 2019, 00:44 UTC · re: Ed Maste · lore

Re: [PATCH] ci: add Cirrus-CI config for FreeBSD CI

On 2019-11-25 at 20:37:40, Ed Maste wrote:
Show 7 quoted lines
> From: Ed Maste <emaste@freebsd.org>
> 
> Cirrus-CI is relatively unique among hosted CI providers in supporting
> FreeBSD (in addition to Linux, Windows, and macOS).  Add a Cirrus-CI
> config to facilitate building and testing on FreeBSD.
> 
> Signed-off-by: Ed Maste <emaste@freebsd.org>

I'm all for automated testing on FreeBSD, but we would need someone to triage and address any failures reasonably quickly. Is that something you'd be okay with doing, or is there someone else who would be okay with doing that?

> ---
> 6 i18n tests are currently failing and need investigation.
> Example result: https://cirrus-ci.com/task/5394512637067264
> Test log: https://api.cirrus-ci.com/v1/task/5394512637067264/logs/test.log

Could we fix these issues first so we don't have CI suddenly start failing?

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Ed Maste· Nov 26, 2019, 13:31 UTC · re: brian m. carlson · lore

Re: [PATCH] ci: add Cirrus-CI config for FreeBSD CI

On Mon, 25 Nov 2019 at 19:44, brian m. carlson <sandals@crustytoothpaste.net> wrote:

Show 14 quoted lines
>
> On 2019-11-25 at 20:37:40, Ed Maste wrote:
> > From: Ed Maste <emaste@freebsd.org>
> >
> > Cirrus-CI is relatively unique among hosted CI providers in supporting
> > FreeBSD (in addition to Linux, Windows, and macOS).  Add a Cirrus-CI
> > config to facilitate building and testing on FreeBSD.
> >
> > Signed-off-by: Ed Maste <emaste@freebsd.org>
>
> I'm all for automated testing on FreeBSD, but we would need someone to
> triage and address any failures reasonably quickly.  Is that something
> you'd be okay with doing, or is there someone else who would be okay
> with doing that?

We're currently experimenting with a migration of the FreeBSD repo from Subversion to git, so long term there will be many with a vested interest in triaging and addressing failures. In the near term though I'd be able to take this on.

Show 6 quoted lines
> > 6 i18n tests are currently failing and need investigation.
> > Example result: https://cirrus-ci.com/task/5394512637067264
> > Test log: https://api.cirrus-ci.com/v1/task/5394512637067264/logs/test.log
>
> Could we fix these issues first so we don't have CI suddenly start
> failing?

Indeed, that makes sense. I think the failures may be an issue with the test though; here's the first failure:

expecting success of 4210.6 '-c grep.patternType=fixed log --grep does not find
non-reencoded values (latin1 + locale)':
                cat >expect <<-\EOF &&
                latin1
                utf8
                EOF
                LC_ALL="is_IS.UTF-8" git -c grep.patternType=fixed log
--encoding=ISO-8859-1 --format=%s --grep="_" >actual &&
                test_cmp expect actual
fatal: command line, '_': illegal byte sequence
This was added in 4e2443b1813 with this note in the commit message:
| It's possible that this
| test breaks the "basic" and "extended" backends on some systems that
| are more anal than glibc about the encoding of locale issues with
| POSIX functions that I can remember, but PCRE is more careful about
| the validation.
I've CC'd Ævar Arnfjörð Bjarmason for advice on this.
Ed Maste· Nov 27, 2019, 14:01 UTC · re: brian m. carlson · lore

Re: [PATCH] ci: add Cirrus-CI config for FreeBSD CI

On Mon, 25 Nov 2019 at 19:44, brian m. carlson <sandals@crustytoothpaste.net> wrote:

Show 5 quoted lines
>
> I'm all for automated testing on FreeBSD, but we would need someone to
> triage and address any failures reasonably quickly.  Is that something
> you'd be okay with doing, or is there someone else who would be okay
> with doing that?

Renato Botelho <garga@freebsd.org> is the maintainer of the devel/git port/package on FreeBSD and has now also joined this list and offered to help triage and address issues.

> Could we fix these issues first so we don't have CI suddenly start
> failing?

After some further investigation I believe these tests are technically invalid but work with glibc because of its looser requirements. I've sent a patch (t4210: skip i18n tests that don't work on FreeBSD) to address the failures.

Ed Maste· Nov 27, 2019, 15:17 UTC · re: Ed Maste · lore

Re: [PATCH] ci: add Cirrus-CI config for FreeBSD CI

On Wed, 27 Nov 2019 at 09:01, Ed Maste <emaste@freebsd.org> wrote:
Show 5 quoted lines
>
> After some further investigation I believe these tests are technically
> invalid but work with glibc because of its looser requirements. I've
> sent a patch (t4210: skip i18n tests that don't work on FreeBSD) to
> address the failures.

And a now-passing test run on FreeBSD with the change : https://cirrus-ci.com/task/5657957240406016

Ed Maste· Dec 20, 2019, 02:11 UTC · re: Ed Maste · lore

[PATCH v2] CI: add FreeBSD CI support via Cirrus-CI

Currently testing on FreeBSD 12.1.
Signed-off-by: Ed Maste <emaste@FreeBSD.org>
---
Since v1, create an unprivileged user and build/test using that user.
CI run with this change: https://cirrus-ci.com/task/6565294088126464
 .cirrus.yml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 .cirrus.yml
Show changes to .cirrus.yml +15 −0
diff --git a/.cirrus.yml b/.cirrus.yml
new file mode 100644
index 0000000000..c2f5fe385a
--- /dev/null
+++ b/.cirrus.yml
@@ -0,0 +1,15 @@
+env:
+  CIRRUS_CLONE_DEPTH: 1
+
+freebsd_12_task:
+  freebsd_instance:
+    image: freebsd-12-1-release-amd64
+  install_script:
+    pkg install -y gettext gmake perl5
+  create_user_script:
+    - pw useradd git
+    - chown -R git:git .
+  build_script:
+    - su git -c gmake
+  test_script:
+    - su git -c 'gmake test'
-- 
2.24.0

← back to recent threads