[Git][NTPsec/ntpsec][master] Add cross-compile CI job

Mark Atwood gitlab at mg.gitlab.com
Fri Jun 1 21:53:58 UTC 2018


Mark Atwood pushed to branch master at NTPsec / ntpsec


Commits:
80ffcbb6 by Matt Selsky at 2018-06-01T04:49:25Z
Add cross-compile CI job

Skip the python minimum version check when cross-building since waf doesn't
correctly handle it yet

- - - - -


3 changed files:

- .gitlab-ci.yml
- INSTALL
- pylib/wscript


Changes:

=====================================
.gitlab-ci.yml
=====================================
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -479,3 +479,12 @@ debian-stable-mDNS-refclocks:
     - python ./waf configure --refclock=all build check
   tags:
     - gitlab-org
+
+cross-build:
+  <<: *job_definition
+  script:
+    - PYTHON_VERSION=2.7 PYTAG=cpython27 pyext_PATTERN="%s.so" PYTHON_LDFLAGS='-lpthread -ldl' ./waf configure --cross-compiler=arm-linux-gnueabihf-gcc-5 --cross-cflags '-I/srv/arm-local/include -I/srv/arm-local/include/python2.7' --cross-ldflags '-L/srv/arm-local/lib' --pythondir=/srv/arm-local/lib/python2.7/dist-packages --pythonarchdir=/srv/arm-local/lib/python2.7/dist-packages build
+  tags:
+    - ubuntu-1604-lts
+  only:
+    - branches at NTPsec/ntpsec


=====================================
INSTALL
=====================================
--- a/INSTALL
+++ b/INSTALL
@@ -251,11 +251,13 @@ operates.
 == Cross-compiling ==
 
 Set up a cross-compile environment for the target architecture.  At minimum
-it will need its own binaries for the OpenSSL library.
+it will need OpenSSL headers/libraries and Python headers/libraries.
 
 Configure NTPSec with:
 
-  waf configure --cross-compiler=/path/to/your/cross/cc
+  PYTHON_VERSION=2.7 PYTAG=cpython27 pyext_PATTERN="%s.so" PYTHON_LDFLAGS='-lpthread -ldl' \
+  ./waf configure --cross-compiler=/path/to/your/cross/cc \
+  --pythondir=/usr/local/lib/python2.7/dist-packages --pythonarchdir=/usr/local/lib/python2.7/dist-packages
 
 There are also --cross-cflags and --cross-ldflags to supply the cross compiler
 with appropriate values.


=====================================
pylib/wscript
=====================================
--- a/pylib/wscript
+++ b/pylib/wscript
@@ -4,7 +4,8 @@ def options(opt):
 
 def configure(conf):
     conf.load('python')
-    conf.check_python_version((2, 6, 0))
+    if not conf.env.ENABLE_CROSS:
+        conf.check_python_version((2, 6, 0))
     conf.check_python_headers(features='pyext')  # Extension-only, no embedded
 
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/80ffcbb6336f3b7a1ae9e5059031068b634967ad

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/80ffcbb6336f3b7a1ae9e5059031068b634967ad
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180601/c0e51b8c/attachment.html>


More information about the vc mailing list