Skip to content

Commit 99889bd

Browse files
Michael Santanatmonjalo
Michael Santana
authored andcommitted
ci: introduce Travis builds for GitHub repositories
GitHub is a service used by developers to store repositories. GitHub provides service integrations that allow 3rd party services to access developer repositories and perform actions. One of these services is Travis-CI, a simple continuous integration platform. This series introduces the ability for any github mirrors of the DPDK project, including developer mirrors, to kick off builds under the travis CI infrastructure. For now, this just means compilation - no other kinds of automated run exists yet. In the future, this can be expanded to execute and report results for any test-suites that might exist. This is a simple initial implementation of a travis build for the DPDK project. It doesn't require any changes from individual developers to enable, but will allow those developers who opt-in to GitHub and the travis service to get automatic builds for every push they make. The files added under .ci/ exist so that in the future, other CI support platforms (such as cirrus, appveyor, etc.) could have a common place to put their requisite scripts without polluting the main tree. Signed-off-by: Aaron Conole <[email protected]> Signed-off-by: Michael Santana <[email protected]> Acked-by: Bruce Richardson <[email protected]> Acked-by: Luca Boccassi <[email protected]> Reviewed-by: Honnappa Nagarahalli <[email protected]> Acked-by: Thomas Monjalon <[email protected]>
1 parent 866bc67 commit 99889bd

File tree

5 files changed

+136
-0
lines changed

5 files changed

+136
-0
lines changed

.ci/linux-build.sh

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh -xe
2+
3+
on_error() {
4+
if [ $? = 0 ]; then
5+
exit
6+
fi
7+
FILES_TO_PRINT="build/meson-logs/testlog.txt build/.ninja_log build/meson-logs/meson-log.txt"
8+
9+
for pr_file in $FILES_TO_PRINT; do
10+
if [ -e "$pr_file" ]; then
11+
cat "$pr_file"
12+
fi
13+
done
14+
}
15+
trap on_error EXIT
16+
17+
if [ "$AARCH64" = "1" ]; then
18+
# convert the arch specifier
19+
OPTS="$OPTS --cross-file config/arm/arm64_armv8_linuxapp_gcc"
20+
fi
21+
22+
OPTS="$OPTS --default-library=$DEF_LIB"
23+
meson build --werror -Dexamples=all $OPTS
24+
ninja -C build

.ci/linux-setup.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
python3 -m pip install --upgrade meson --user

.travis.yml

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
language: c
2+
compiler:
3+
- gcc
4+
- clang
5+
6+
dist: xenial
7+
8+
os:
9+
- linux
10+
11+
addons:
12+
apt:
13+
update: true
14+
packages: &required_packages
15+
- [libnuma-dev, linux-headers-$(uname -r), python3-setuptools, python3-wheel, python3-pip, ninja-build]
16+
17+
aarch64_packages: &aarch64_packages
18+
- *required_packages
19+
- [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross]
20+
21+
extra_packages: &extra_packages
22+
- *required_packages
23+
- [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4]
24+
25+
before_install: ./.ci/${TRAVIS_OS_NAME}-setup.sh
26+
27+
sudo: false
28+
29+
env:
30+
- DEF_LIB="static"
31+
- DEF_LIB="shared"
32+
- DEF_LIB="static" OPTS="-Denable_kmods=false"
33+
- DEF_LIB="shared" OPTS="-Denable_kmods=false"
34+
35+
matrix:
36+
include:
37+
- env: DEF_LIB="static" OPTS="-Denable_kmods=false" AARCH64=1
38+
compiler: gcc
39+
addons:
40+
apt:
41+
packages:
42+
- *aarch64_packages
43+
- env: DEF_LIB="shared" OPTS="-Denable_kmods=false" AARCH64=1
44+
compiler: gcc
45+
addons:
46+
apt:
47+
packages:
48+
- *aarch64_packages
49+
- env: DEF_LIB="static"
50+
compiler: gcc
51+
addons:
52+
apt:
53+
packages:
54+
- *extra_packages
55+
- env: DEF_LIB="shared"
56+
compiler: gcc
57+
addons:
58+
apt:
59+
packages:
60+
- *extra_packages
61+
- env: DEF_LIB="static" OPTS="-Denable_kmods=false"
62+
compiler: gcc
63+
addons:
64+
apt:
65+
packages:
66+
- *extra_packages
67+
- env: DEF_LIB="shared" OPTS="-Denable_kmods=false"
68+
compiler: gcc
69+
addons:
70+
apt:
71+
packages:
72+
- *extra_packages
73+
- env: DEF_LIB="static"
74+
compiler: clang
75+
addons:
76+
apt:
77+
packages:
78+
- *extra_packages
79+
- env: DEF_LIB="shared"
80+
compiler: clang
81+
addons:
82+
apt:
83+
packages:
84+
- *extra_packages
85+
- env: DEF_LIB="static" OPTS="-Denable_kmods=false"
86+
compiler: clang
87+
addons:
88+
apt:
89+
packages:
90+
- *extra_packages
91+
- env: DEF_LIB="shared" OPTS="-Denable_kmods=false"
92+
compiler: clang
93+
addons:
94+
apt:
95+
packages:
96+
- *extra_packages
97+
98+
99+
script: ./.ci/${TRAVIS_OS_NAME}-build.sh

MAINTAINERS

+6
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ F: config/rte_config.h
119119
F: buildtools/gen-pmdinfo-cfile.sh
120120
F: buildtools/symlink-drivers-solibs.sh
121121

122+
Public CI
123+
M: Aaron Conole <[email protected]>
124+
M: Michael Santana <[email protected]>
125+
F: .travis.yml
126+
F: .ci/
127+
122128
ABI versioning
123129
M: Neil Horman <[email protected]>
124130
F: doc/guides/rel_notes/deprecation.rst

doc/guides/contributing/patches.rst

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ The mailing list for DPDK development is `[email protected] <http://mails.dpdk.org/ar
3232
Contributors will need to `register for the mailing list <http://mails.dpdk.org/listinfo/dev>`_ in order to submit patches.
3333
It is also worth registering for the DPDK `Patchwork <http://patches.dpdk.org/project/dpdk/list/>`_
3434

35+
If you are using the GitHub service, you can link your repository to
36+
the ``travis-ci.org`` build service. When you push patches to your GitHub
37+
repository, the travis service will automatically build your changes.
38+
3539
The development process requires some familiarity with the ``git`` version control system.
3640
Refer to the `Pro Git Book <http://www.git-scm.com/book/>`_ for further information.
3741

0 commit comments

Comments
 (0)