The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ci: Add 32-bit builds

+147 -2
+20 -2
.gitlab-ci.yml
··· 10 10 .monado.debian:buster: 11 11 variables: 12 12 FDO_DISTRIBUTION_VERSION: buster 13 - FDO_DISTRIBUTION_TAG: "2019-04-28.0" 13 + FDO_DISTRIBUTION_TAG: "2019-04-28.1" 14 14 15 15 # Variables for build and usage of Debian 10 (Buster) + Android NDK image 16 16 .monado.debian:buster-ndk: ··· 50 50 # Each most-derived job has a script to set up stuff for it. 51 51 FDO_DISTRIBUTION_EXEC: "bash .gitlab-ci/${CI_JOB_NAME}.sh" 52 52 53 - # Debian Buster (x64) 53 + # Debian Buster (x64 + i386) 54 54 debian:container_prep: 55 55 stage: container_prep 56 56 extends: ··· 175 175 - .monado.build-meson # local 176 176 variables: 177 177 MESON_ARGS: -Ddocs=disabled 178 + 179 + # Cross-compiling 180 + debian:meson:32bit: 181 + extends: 182 + - .monado.debian:buster # local 183 + - .fdo.distribution-image@debian # from ci-templates 184 + - .monado.build-meson # local 185 + variables: 186 + MESON_ARGS: --prefix /usr --libdir /usr/lib/i386-linux-gnu --cross-file ../.gitlab-ci/i386-cross.txt 187 + 188 + debian:cmake:32bit: 189 + extends: 190 + - .monado.debian:buster # local 191 + - .fdo.distribution-image@debian # from ci-templates 192 + - .monado.build-cmake # local 193 + variables: 194 + # OpenCV and local OpenHMD doesn't play nicely with us in multi-arch. 195 + CMAKE_ARGS: -DCMAKE_TOOLCHAIN_FILE=../.gitlab-ci/i386.cmake -DBUILD_WITH_OPENCV=off -DBUILD_WITH_OPENHMD=off 178 196 179 197 # Base of Android NDK builds. 180 198 # Takes the last :-delimited part of the name as the ABI to build for,
+4
.gitlab-ci/debian:container_prep.sh
··· 2 2 3 3 ( 4 4 cd $(dirname $0) 5 + bash ./install-cross.sh 6 + ) 7 + ( 8 + cd $(dirname $0) 5 9 bash ./build-openxr-openhmd.sh 6 10 )
+17
.gitlab-ci/i386-cross.txt
··· 1 + [binaries] 2 + c = '/usr/bin/i686-linux-gnu-gcc' 3 + cpp = '/usr/bin/i686-linux-gnu-g++' 4 + ar = '/usr/bin/i686-linux-gnu-ar' 5 + strip = '/usr/bin/i686-linux-gnu-strip' 6 + objcopy = '/usr/bin/i686-linux-gnu-objcopy' 7 + ld= '/usr/bin/i686-linux-gnu-ld' 8 + pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config' 9 + 10 + [properties] 11 + needs_exe_wrapper = False 12 + 13 + [host_machine] 14 + system = 'linux' 15 + cpu_family = 'x86' 16 + cpu = 'i386' 17 + endian = 'little'
+37
.gitlab-ci/i386.cmake
··· 1 + # Toolchain file for 32-bit x86 linux build on 64-bit x86 linux 2 + # Developed for use with Debian and its derivatives 3 + # 4 + # Copyright 2019-2020 Collabora, Ltd. 5 + # SPDX-License-Identifier: BSL-1.0 6 + 7 + set(CMAKE_SYSTEM_NAME Linux) 8 + 9 + set(TARGET i686-linux-gnu) 10 + set(PREFIX ${TARGET}-) 11 + set(SUFFIX) # required for 12 + set(CMAKE_C_COMPILER ${PREFIX}gcc${SUFFIX}) 13 + set(CMAKE_CXX_COMPILER ${PREFIX}g++${SUFFIX}) 14 + 15 + set(CMAKE_C_COMPILER_AR ${PREFIX}gcc-ar${SUFFIX}) 16 + set(CMAKE_CXX_COMPILER_AR ${PREFIX}gcc-ar${SUFFIX}) 17 + set(CMAKE_C_COMPILER_RANLIB ${PREFIX}gcc-ranlib${SUFFIX}) 18 + set(CMAKE_CXX_COMPILER_RANLIB ${PREFIX}gcc-ranlib${SUFFIX}) 19 + set(CMAKE_NM ${PREFIX}gcc-nm${SUFFIX}) 20 + set(CMAKE_OBJCOPY ${PREFIX}objcopy) 21 + set(CMAKE_OBJDUMP ${PREFIX}objdump) 22 + set(CMAKE_RANLIB ${PREFIX}ranlib) 23 + set(CMAKE_STRIP ${PREFIX}strip) 24 + 25 + set(PKG_CONFIG_EXECUTABLE ${PREFIX}pkg-config) 26 + 27 + if(NOT CMAKE_INSTALL_PREFIX) 28 + set(CMAKE_INSTALL_PREFIX /usr/${TARGET}) 29 + endif() 30 + 31 + set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/i386-linux-gnu;/usr/lib32;/usr/${TARGET}/lib) 32 + 33 + set(CMAKE_FIND_ROOT_PATH /usr/${TARGET}) 34 + 35 + # set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 36 + # set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 37 + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+69
.gitlab-ci/install-cross.sh
··· 1 + #!/bin/bash 2 + 3 + # Based on https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/.gitlab-ci/container/x86_build.sh 4 + 5 + set -e 6 + set -o xtrace 7 + 8 + export DEBIAN_FRONTEND=noninteractive 9 + 10 + CROSS_ARCHITECTURES="i386" 11 + for arch in $CROSS_ARCHITECTURES; do 12 + dpkg --add-architecture $arch 13 + done 14 + 15 + apt-get update 16 + 17 + for arch in $CROSS_ARCHITECTURES; do 18 + # OpenCV and libuvc aren't on this list because 19 + # they apparently can't be installed in both architectures at once 20 + apt-get install -y --no-install-recommends --no-remove \ 21 + crossbuild-essential-${arch} \ 22 + libelf-dev:${arch} \ 23 + libavcodec-dev:${arch} \ 24 + libegl1-mesa-dev:${arch} \ 25 + libgl1-mesa-dev:${arch} \ 26 + libglvnd-dev:${arch} \ 27 + libhidapi-dev:${arch} \ 28 + libudev-dev:${arch} \ 29 + libusb-1.0-0-dev:${arch} \ 30 + libv4l-dev:${arch} \ 31 + libvulkan-dev:${arch} \ 32 + libwayland-dev:${arch} \ 33 + libx11-dev:${arch} \ 34 + libxcb-randr0-dev:${arch} \ 35 + libxrandr-dev:${arch} \ 36 + libxxf86vm-dev:${arch} 37 + 38 + if [ "$arch" != "i386" ]; then 39 + mkdir /var/cache/apt/archives/${arch} 40 + apt-get install -y --no-remove \ 41 + libstdc++6:${arch} 42 + fi 43 + done 44 + 45 + 46 + # for 64bit windows cross-builds 47 + # apt-get install -y --no-remove \ 48 + # libz-mingw-w64-dev \ 49 + # mingw-w64 \ 50 + # wine \ 51 + # wine32 \ 52 + # wine64 53 + 54 + 55 + apt-get autoremove -y --purge 56 + apt-get clean 57 + 58 + # Generate cross build files for Meson 59 + for arch in $CROSS_ARCHITECTURES; do 60 + cross_file="/cross_file-$arch.txt" 61 + /usr/share/meson/debcrossgen --arch "$arch" -o "$cross_file" 62 + if [ "$arch" = "i386" ]; then 63 + # Work around a bug in debcrossgen that should be fixed in the next release 64 + sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" "$cross_file" 65 + fi 66 + 67 + # Rely on qemu-user being configured in binfmt_misc on the host 68 + sed -i -e '/\[properties\]/a\' -e "needs_exe_wrapper = False" "$cross_file" 69 + done