All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH] Add a skeleton Travis-CI config
Date: Wed,  3 Oct 2018 17:27:15 -0500	[thread overview]
Message-ID: <20181003222715.28667-1-robh@kernel.org> (raw)

It's convenient to use Travis-CI for doing kernel builds. Doing so
requires a github repo, Travis-CI enabled for that repo, and a
.travis.yml file in the repository. This commit addresses the last part.
Each repository branch must have a .travis.yml file in order to run
Travis-CI jobs.

Obviously, we can't create a single configuration that works for
everyone as every developer will want to run different configs and
build targets. Therefore, this only adds a skeleton .travis.yml file.
With this a user can either set $CONFIG and $TARGET in their Travis-CI
environment or customized builds can be triggered remotely.

Here's an example of setting up a matrix build of different
architectures:

body='{
  "request": {
    "branch": "master",
    "config" : {
      "env": {
        "global": "CONFIG=defconfig TARGET=all",
        "matrix": [
          "ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-",
          "ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-",
          "ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu-"
        ]
      }
    }
  }
}'

curl -s -X POST \
   -H "Content-Type: application/json" \
   -H "Accept: application/json" \
   -H "Travis-API-Version: 3" \
   -H "Authorization: token $TOKEN" \
   -d "$body" \
   https://api.travis-ci.org/repo/robherring%2Flinux/requests

Additionally, it is possible to override 'scripts' or any other part of
the config as well.

Signed-off-by: Rob Herring <robh@kernel.org>
---
I'm wondering if there's other interest in this. If so, please chime in.

Maybe I should be looking at Gitlab CI instead, but Travis I know 
already and Gitlab just seems to be the shiniest new thing. In any case, 
both could coexist.

Rob

 .travis.yml | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000000..ba1e59dd44f6
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,23 @@
+language: c
+
+sudo: false
+dist: trusty
+
+cache:
+  apt: true
+
+env:
+  - CONFIG=allnoconfig TARGET=all
+
+addons:
+  apt:
+    packages:
+      - build-essential
+      - bc
+      - gcc-arm-linux-gnueabihf
+      - gcc-aarch64-linux-gnu
+      - gcc-powerpc-linux-gnu
+
+script:
+  - make $CONFIG
+  - make $TARGET
-- 
2.17.1


             reply	other threads:[~2018-10-03 22:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 22:27 Rob Herring [this message]
2018-10-04  8:32 ` [PATCH] Add a skeleton Travis-CI config Daniel Vetter
2018-10-04 19:10   ` Rob Herring
2018-10-04 19:22     ` Daniel Vetter

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=20181003222715.28667-1-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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 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.