guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 13/34: Add support for aarch64 in CI


From: Andy Wingo
Subject: [Guile-commits] 13/34: Add support for aarch64 in CI
Date: Mon, 20 May 2019 09:55:52 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 926275e123f72db3edd09922182be545a00ef993
Author: Andy Wingo <address@hidden>
Date:   Thu May 16 12:03:38 2019 +0200

    Add support for aarch64 in CI
---
 .gitlab-ci.yml | 13 ++++++++++---
 tests/Makefile | 24 +++++++++++++++++++++---
 2 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 891112e..f3600ae 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,9 +4,11 @@
 image: debian
 
 before_script:
-  - dpkg --add-architecture i386
+  - dpkg --add-architecture i386 --add-architecture arm64
   - apt-get update -qq
-  - apt-get install -y libc6-dev:amd64 libc6-dev:i386 gcc gcc-multilib make
+  - apt-get install -y \
+      libc6-dev:amd64 libc6-dev:i386 libc6-dev:arm64 \
+      gcc gcc-multilib gcc-aarch64-linux-gnu make
 
 x86-64:
   stage: test
@@ -16,4 +18,9 @@ x86-64:
 i686:
   stage: test
   script:
-    - make -C tests test-ia32
+    - make -C tests test-ia32 CC_IA32='gcc -m32'
+
+aarch64:
+  stage: test
+  script:
+    - make -C tests test-aarch64 CC_AARCH64=gcc-aarch64-linux-gnu
diff --git a/tests/Makefile b/tests/Makefile
index 7b6bbd4..a3b988c 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,8 +1,22 @@
 TESTS=$(sort $(basename $(wildcard *.c)))
-TARGETS=native
-
+TARGETS=native ia32 aarch64
+
+# Suitable values of cross-compiler variables for Debian, having previously 
done:
+#
+#   CC_IA32 = gcc -m32
+#   CC_AARCH64 = gcc-aarch64-linux-gnu
+#
+# The relevant packages that you need to run this:
+#
+#   dpkg --add-architecture i386 --add-architecture arm64
+#   apt-get update -qq
+#   apt-get install -y \
+#     libc6-dev:amd64 libc6-dev:i386 libc6-dev:arm64 \
+#     gcc gcc-multilib gcc-aarch64-linux-gnu make
+#
 CC = gcc
-CC_IA32 = gcc -m32
+CC_IA32='guix environment --pure -s i686-linux --ad-hoc gcc-toolchain glibc -- 
gcc'
+CC_AARCH64='guix environment --pure -s aarch64-linux --ad-hoc gcc-toolchain 
glibc -- gcc'
 CFLAGS = -Wall -O0 -g
 
 all: $(foreach TARGET,$(TARGETS),$(addprefix test-$(TARGET)-,$(TESTS)))
@@ -29,6 +43,10 @@ test-ia32-%: CC = $(CC_IA32)
 test-ia32-%: %.c lightening-ia32.o test.h
        $(CC) $(CFLAGS) $(CPPFLAGS) -I.. -o $@ lightening-ia32.o $<
 
+test-aarch64-%: CC = $(CC_AARCH64)
+test-aarch64-%: %.c lightening-aarch64.o test.h
+       $(CC) $(CFLAGS) $(CPPFLAGS) -I.. -o $@ lightening-aarch64.o $<
+
 .PRECIOUS: $(foreach TARGET,$(TARGETS),$(addprefix test-$(TARGET)-,$(TESTS)))
 .PRECIOUS: $(foreach TARGET,$(TARGETS),lightening-$(TARGET).o)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]