Переглянути джерело

add BUILD_ARCH in drone.yml

tags/v0.0.58^0
Peter Vivell 6 роки тому
джерело
коміт
82dd1862af
2 змінених файлів з 6 додано та 2 видалено
  1. 5
    2
      Dockerfile
  2. 1
    0
      drone.yml

+ 5
- 2
Dockerfile Переглянути файл

@@ -30,14 +30,17 @@ RUN printf '#-------------------------------------------------------------------
30 30
 \n' > /etc/apt/sources.list
31 31
 
32 32
 # Build deps and clean up
33
+# Crossbuilding: https://wiki.debian.org/CrossCompiling#Building_with_dpkg-buildpackage
33 34
 ARG BUILD_DEPS
35
+ARG BUILD_ARCH
34 36
 RUN export DEBIAN_FRONTEND=noninteractive && \
35
-    dpkg --add-architecture armhf && \
37
+    for ARCH in ${BUILD_ARCH} ; do dpkg --add-architecture ${ARCH} ; done && \
36 38
     apt-get -q  update && \
37 39
     apt-get -qy -o Dpkg::Use-Pty=0 upgrade && \
38 40
     apt-get -qy -o Dpkg::Use-Pty=0 install --no-install-recommends apt-utils && \
39 41
     apt-get -qy -o Dpkg::Use-Pty=0 install --no-install-recommends ${BUILD_DEPS} \
40
-        build-essential crossbuild-essential-armhf debhelper ca-certificates curl git iproute2 wget nano && \
42
+        build-essential debhelper ca-certificates curl git iproute2 wget nano && \
43
+    for ARCH in ${BUILD_ARCH} ; do apt-get -qy -o Dpkg::Use-Pty=0 install --no-install-recommends crossbuild-essential-${ARCH} ; done && \
41 44
     apt-get clean && rm -rf /var/lib/apt/lists/*
42 45
 
43 46
 # Default command

+ 1
- 0
drone.yml Переглянути файл

@@ -41,6 +41,7 @@ steps:
41 41
     build_args: # custom args for docker build, e.g. additional BUILD_DEPS etc.
42 42
       - DEB_RELEASE=stretch
43 43
       - BUILD_DEPS=libhidapi-dev libssl-dev zip
44
+      - BUILD_ARCH=i386 armhf # amd64 arm64 armel armhf i386 mips mips64el mipsel powerpc ppc64el s390x
44 45
 
45 46
 
46 47
 - name: build

Завантаження…
Відмінити
Зберегти