summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2018-10-30 13:22:15 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2018-10-31 10:58:15 +0100
commitf882a542a3eb24e78e51aa6410a3a67c0efb4e97 (patch)
tree77bf1242b18cd9366923e740d70e0a43025b4668 /.gitlab-ci.yml
parent445c205139f4b0986bc4f56ad94494275fe68e59 (diff)
gitlab-ci: arm64 cross compiling
First I tried to build in a full sysroot, but I didn't figure out why ld never found the libraries (this was on fedora, which might have been part of the problem - if you just need a toolchain for kernel corss-building fedora is perfectly fine). Then I tried using debian's multiarch stuff, which worked a lot better, except there's some minor gotchas: - some libraries conflict and can't be multi-arch installed - some libraries are buggy and cause conflicts when installing - pkgconfig and ld get confused with some other libraries and pick the first one they find (i.e. the x86_64 one, not the arm64 one). That means we need a new docker image with just the cross libaries installed as -dev packages, and none of the native ones. Next up I tried to run the tests. Meson has really nice support for an exe wrapper, and qemu happily runs arm64 on x86_64. With that I managed to run some tests successfully (it's not even that slow!). But most are run through a script, and the script doesn't know about the exe wrapper and hence fails miserably. I discussed this a bit with Dylan and he filed an upstream meson issue: https://github.com/mesonbuild/meson/issues/4427#issuecomment-433553689 Another option would be to use binfmt-misc handling (which works neatly locally), but on the runners we have I can't control that. Maybe I can beg Daniel Stone ... For not let's just mark this stage as optional and that failures are allowed. v2: Use the new gitlab 1.4 feature to rebuild docker images when necessary. Cc: Sean Paul <sean@poorly.run> Cc: Eric Anholt <eric@anholt.net> Cc: Dylan Baker <dylan@pnwbakers.com> Cc: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Eric Anholt <eric@anholt.net> (v1) Reviewed-by: Petri Latvala <petri.latvala@intel.com> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bec09e3e..2c17ec61 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -57,6 +57,15 @@ build:tests-debian-meson:
paths:
- meson-test-list.txt
+build:tests-debian-meson-arm64:
+ image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-arm64:latest
+ stage: build
+ script:
+ - PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/ meson --cross-file meson-cross-arm64.txt build
+ - ninja -C build
+ artifacts:
+ paths:
+ - build
build:tests-debian-autotools:
image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
@@ -77,6 +86,14 @@ test:ninja-test:
stage: test
script: ninja -C build test
+test:ninja-test-arm64:
+ when: manual
+ image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-arm64:latest
+ dependencies:
+ - build:tests-debian-meson-arm64
+ stage: test
+ script: ninja -C build test
+
test:test-list-diff:
dependencies:
- build:tests-debian-autotools
@@ -117,6 +134,22 @@ containers:igt-debian:
- docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian -f Dockerfile.debian .
- docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian
+containers:igt-debian-arm64:
+ stage: containers
+ image: docker:stable
+ only:
+ changes:
+ - Dockerfile.debian-arm64
+ services:
+ - docker:dind
+ variables:
+ DOCKER_HOST: tcp://docker:2375
+ DOCKER_DRIVER: overlay2
+ script:
+ - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+ - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-arm64 -f Dockerfile.debian-arm64 .
+ - docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-arm64
+
containers:igt-fedora:
stage: containers
image: docker:stable