From: Warner Losh <imp@bsdimp.com>
To: Wainer dos Santos Moschetta <wainersm@redhat.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
"Kyle Evans" <kevans@freebsd.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Willian Rampazzo" <willianr@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v3 2/6] gitlab-ci: Adapt JOBS variable for FreeBSD runners
Date: Thu, 20 May 2021 14:02:37 -0600 [thread overview]
Message-ID: <CANCZdfqmsPWxXcKva7DDcwxm9Rx7UnmOLNJ=0PeE87t9qQ+aHw@mail.gmail.com> (raw)
In-Reply-To: <228ce204-508b-3b77-abdd-2132bf9df431@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]
On Thu, May 20, 2021 at 12:18 PM Wainer dos Santos Moschetta <
wainersm@redhat.com> wrote:
> Hi,
>
> On 5/19/21 3:45 PM, Philippe Mathieu-Daudé wrote:
> > 'nproc' is not available on FreeBSD:
> >
> > $ JOBS=$(expr $(nproc) + 1)
> > bash: line 119: nproc: command not found
> > expr: syntax error
> >
> > Instead, use 'sysctl -n hw.ncpu'.
> >
> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > ---
> > .gitlab-ci.d/buildtest-template.yml | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/.gitlab-ci.d/buildtest-template.yml
> b/.gitlab-ci.d/buildtest-template.yml
> > index 58b01744751..fe4f18595ac 100644
> > --- a/.gitlab-ci.d/buildtest-template.yml
> > +++ b/.gitlab-ci.d/buildtest-template.yml
> > @@ -1,6 +1,16 @@
> > .environment_variables_template:
> > before_script:
> > - - JOBS=$(expr $(nproc) + 1)
> > + - if
> > + test $(uname) = "FreeBSD"
> > + ;
> > + then
> > + JOBS=$(sysctl -n hw.ncpu)
> > + ;
> > + else
> > + JOBS=$(expr $(nproc) + 1)
> > + ;
> > + fi
> > + - echo "=== Using $JOBS simultaneous jobs ==="
>
> It has grown to beyond variables definitions. I suggest to rename it to
> something like `.before_script_template` (pure creativity, see?).
>
Also, would it help if FreeBSD were to add nproc in the future?
Warner
[-- Attachment #2: Type: text/html, Size: 2095 bytes --]
next prev parent reply other threads:[~2021-05-20 20:04 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 18:45 [PATCH v3 0/6] gitlab-ci: Allow using " Philippe Mathieu-Daudé
2021-05-19 18:45 ` [PATCH v3 1/6] gitlab-ci: Extract &environment_variables template Philippe Mathieu-Daudé
2021-05-19 19:12 ` Willian Rampazzo
2021-05-20 18:00 ` Wainer dos Santos Moschetta
2021-05-19 18:45 ` [PATCH v3 2/6] gitlab-ci: Adapt JOBS variable for FreeBSD runners Philippe Mathieu-Daudé
2021-05-19 19:11 ` Willian Rampazzo
2021-05-20 5:50 ` Thomas Huth
2021-05-20 18:18 ` Wainer dos Santos Moschetta
2021-05-20 20:02 ` Warner Losh [this message]
2021-05-19 18:45 ` [PATCH v3 3/6] gitlab-ci: Run GNU make via the $MAKE variable Philippe Mathieu-Daudé
2021-05-19 19:10 ` Willian Rampazzo
2021-05-20 7:56 ` Thomas Huth
2021-05-20 18:26 ` Wainer dos Santos Moschetta
2021-05-19 18:45 ` [PATCH v3 4/6] gitlab-ci: Add ccache in $PATH and display statistics Philippe Mathieu-Daudé
2021-05-19 19:14 ` Willian Rampazzo
2021-05-20 8:02 ` Thomas Huth
2021-05-20 11:27 ` Philippe Mathieu-Daudé
2021-05-21 10:48 ` Thomas Huth
2021-05-21 10:50 ` Daniel P. Berrangé
2021-05-21 11:02 ` Thomas Huth
2021-05-21 11:53 ` Daniel P. Berrangé
2021-05-21 12:27 ` Philippe Mathieu-Daudé
2021-05-21 12:52 ` Daniel P. Berrangé
2021-05-21 14:21 ` Philippe Mathieu-Daudé
2021-05-25 5:49 ` Philippe Mathieu-Daudé
2021-05-24 13:51 ` Stefan Hajnoczi
2021-05-25 5:50 ` Philippe Mathieu-Daudé
2021-05-21 12:36 ` Willian Rampazzo
2021-05-21 13:02 ` Thomas Huth
2021-05-19 18:45 ` [PATCH v3 5/6] gitlab-ci: Simplify before/after script for Avocado based jobs Philippe Mathieu-Daudé
2021-05-19 19:42 ` Willian Rampazzo
2021-05-20 8:04 ` Thomas Huth
2021-05-19 18:45 ` [PATCH v3 6/6] gitlab-ci: Add FreeBSD jobs Philippe Mathieu-Daudé
2021-05-19 19:43 ` Willian Rampazzo
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='CANCZdfqmsPWxXcKva7DDcwxm9Rx7UnmOLNJ=0PeE87t9qQ+aHw@mail.gmail.com' \
--to=imp@bsdimp.com \
--cc=alex.bennee@linaro.org \
--cc=f4bug@amsat.org \
--cc=kevans@freebsd.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
--cc=willianr@redhat.com \
--subject='Re: [PATCH v3 2/6] gitlab-ci: Adapt JOBS variable for FreeBSD runners' \
/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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.