1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451
|
language: c
#sudo: false
#cache:
# ccache: true
os: linux
# - linux
# - osx
dist: xenial
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/5FH2DUYXQEOJQZPDA7KSHVBRANKXV3X2/
# https://github.com/junaruga/ci-multi-arch-test/blob/master/.travis.yml
# Definitions using YAML's anchor (&) and reference (*).
.com.github.junaruga.ci-multi-arch-test.matrix-definitions:
# Recommended way 1. It's easy to implement.
# But the way using "-p yes" (binfmt_misc persistent option)
# might be slower than below alternative ways.
- &test_in_container
# language: bash or generic is good to run container.
language: bash
services: docker
install:
- ls /proc/sys/fs/binfmt_misc/
- |
if [ "$(uname -m)" = x86_64 ]; then
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
fi
- ls /proc/sys/fs/binfmt_misc/
- |
travis_retry docker build --rm -t sample \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
-f Dockerfile-${OS_NAME} \
.
script:
- docker run --rm -t sample build-aux/conf-make-check.sh
# A case to check only "uname"'s result without building a container.
- &test_uname_in_container
language: bash
services: docker
install:
- ls /proc/sys/fs/binfmt_misc/
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- ls /proc/sys/fs/binfmt_misc/
script:
- docker run --rm -t "${BASE_IMAGE}" uname -a
# Recommended way 2. This way does not use binfmt_misc persistent option.
# It uses multiarch/qemu-user-static:$arch container in Dockerfile.
- &test_in_container_qemu
language: bash
services: docker
install:
- ls /proc/sys/fs/binfmt_misc/
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- ls /proc/sys/fs/binfmt_misc/
- |
travis_retry docker build --rm -t sample \
--build-arg ARCH=${ARCH} \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
-f Dockerfile-${OS_NAME} \
.
script:
- docker run --rm -t sample build-aux/conf-make-check.sh
# The way to use compatible os images (multiarch's ubuntu image etc) is deprecated.
# But it might be faster than above recommended ways. fails
- &test_in_container_compatible_image
language: bash
services: docker
install:
- ls /proc/sys/fs/binfmt_misc/
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- ls /proc/sys/fs/binfmt_misc/
- |
travis_retry docker build --rm -t sample \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
-f Dockerfile-${OS_NAME} \
.
script:
- docker run --rm -t sample build-aux/conf-make-check.sh
- &inspect_image
addons:
apt:
config:
retries: true
update: true
sources:
- sourceline: 'ppa:projectatomic/ppa'
packages:
- jq
- skopeo
services: docker
before_install:
- BASE_IMAGE="$BASE_IMAGE@$(script/print-manifest-arch-digest.sh "$BASE_IMAGE" "$MANIFEST_ARCH")"
# https://github.com/junaruga/ci-multi-arch-native-container-test/blob/master/.travis.yml
# - DIST=fedora
# - BASE_IMAGE="${DIST}:31"
# - PODMAN=docker
- &test_multi_arch_native_container_test
services: docker
install:
# Install podman on Ubuntu.
# https://github.com/containers/libpod/blob/master/install.md#ubuntu
- sudo add-apt-repository -y ppa:projectatomic/ppa
- sudo apt-get update -qq
- sudo apt-get -qq -y install podman uidmap strace
- apt list podman
- apt-cache show podman
- dpkg-query -L podman
- uname -a
# To emphasize printing the kernel release
- uname -r
- nproc
- env
- id
- $PODMAN --version
- $PODMAN version || true
- $PODMAN info || true
- strace -f $PODMAN info || true
- $PODMAN info --debug || true
# Incompatibilities of podman from docker on Travis CI
# https://github.com/containers/libpod/issues/3679
- mkdir -p /etc/containers
- echo -e "[registries.search]\nregistries = ['docker.io']" | sudo tee /etc/containers/registries.conf
- |
travis_retry "${PODMAN}" build --rm \
--build-arg BASE_IMAGE="${BASE_IMAGE}" \
--build-arg EXTRA_PKGS="${EXTRA_PKGS}" \
--build-arg FORCE_ARCH_32="${FORCE_ARCH_32}" \
--build-arg EXTRA_ARCH_32_PKGS="${EXTRA_ARCH_32_PKGS}" \
-f "Dockerfile-${DIST}" \
-t my-container \
.
script:
- |
"${PODMAN}" run ${PODMAN_EXTRA_OPTS} --rm -t \
-e CC="${CC:-gcc}" \
-e CFLAGS="${CFLAGS}" \
-e SETARCH="${SETARCH}" \
my-container bash -cx "setarch --list && $SETARCH uname -m && $SETARCH build-aux/conf-make-check.sh"
- &test_native
script:
# skip duplicate compilers and overly strict clang++
#- if [ "$TRAVIS_OS_NAME" = "osx" -a "$XCC" = "gcc" ]; then exit 0; fi
# ruby swallows the space as in CC="clang -fsanitize=address", and overrides
# CC after the env matrix
- if test x$ASAN = x1; then CC="clang-3.8 -fsanitize=address"; else true; fi
- ./configure $CONF
- make -j4
- if test x$ASAN = x1; then make -C tests tests; else true; fi
- make -j4 check-log
- if [ "$VG" = "1" ]; then travis_wait 30 make -j4 check-valgrind; else true; fi
- if [ "$DISTCHECK" = "1" ]; then travis_wait 40 make -j4 distcheck; else true; fi
addons:
apt:
packages:
- libtext-diff-perl
- pkg-config
matrix:
fast_finish: true
include:
- name: x86_64-distcheck
env: CFLAGS="-O2 -D_FORTIFY_SOURCE=2 -march=native" DISTCHECK=1
<<: *test_native
- name: x86_64-valgrind
compiler: gcc
addons:
apt:
packages:
- valgrind
env: CONF="--enable-debug --enable-unsafe --enable-norm-compat" VG=1
<<: *test_native
- name: x86_64-warn-dmax
compiler: gcc
env: CONF="--disable-nullslack --enable-warn-dmax"
<<: *test_native
- name: x86_64-g++
compiler: g++
env: CONF="--enable-debug --enable-unsafe --enable-norm-compat"
<<: *test_native
# osx is not free anymore
#- name: x86_64-osx
# compiler: gcc
# os: osx
# env: CONF="--enable-unsafe --enable-norm-compat"
# <<: *test_native
- name: x86_64-clang
compiler: clang
env: CFLAGS="-O2 -D_FORTIFY_SOURCE=2 -march=native" CONF="--disable-constraint-handler"
<<: *test_native
- name: x86_64-disable-extensions
compiler: gcc
env: CONF="--disable-extensions"
<<: *test_native
#- name: x86_64-osx-disable-extensions
# compiler: clang
# os: osx
# env: CONF="--disable-extensions"
- name: x86_64-clang-asan
compiler: clang
addons:
apt:
packages:
- clang-3.8
env: ASAN=1 CONF="--enable-debug --enable-unsafe --enable-norm-compat"
<<: *test_native
# ---------------------------
# ARM, 64-bit, Little-endian (fails only memcmp16_s, but fast)
- name: ubuntu-aarch64-linux-native
arch: arm64
# fails gmtime_s, localtime_s
- name: ubuntu-aarch64-linux
env:
- BASE_IMAGE=arm64v8/ubuntu
- OS_NAME=ubuntu
<<: *test_in_container
#- name: ubuntu-aarch64-linux-qemu
# env:
# - ARCH=aarch64
# - BASE_IMAGE=arm64v8/ubuntu
# - OS_NAME=ubuntu-qemu
# <<: *test_in_container_qemu
#- name: ubuntu-aarch64-linux-compatible-image
# env:
# - BASE_IMAGE=multiarch/ubuntu-debootstrap:arm64-bionic
# <<: *test_in_container_compatible_image
# ARM, 32-bit, Little-endian
- name: ubuntu-arm32-linux
env:
- BASE_IMAGE=arm32v7/ubuntu
- OS_NAME=ubuntu
<<: *test_in_container
# fails gmtime, localtime
- name: ubuntu-arm32-linux-qemu
env:
- ARCH=arm
- BASE_IMAGE=arm32v7/ubuntu
- OS_NAME=ubuntu-qemu
<<: *test_in_container_qemu
#- name: ubuntu-arm32-linux-compatible-image
# env:
# - BASE_IMAGE=multiarch/ubuntu-debootstrap:armhf-bionic
# <<: *test_in_container_compatible_image
# PowerPC, 64-bit, Little-endian
- name: ubuntu-ppc64le-linux
env:
- BASE_IMAGE=ppc64le/ubuntu
- OS_NAME=ubuntu
<<: *test_in_container
# passes
- name: ubuntu-ppc64le-linux-native
os: linux-ppc64le
# IBM Z and LinuxONE, 64-bit, Big-endian
#- name: ubuntu-s390x-linux-uname
# env:
# - BASE_IMAGE=s390x/ubuntu
# <<: *test_uname_in_container
# fails gmtime, localtime
#- name: ubuntu-s390x-linux
# env:
# - BASE_IMAGE=s390x/ubuntu
# - OS_NAME=ubuntu
# <<: *test_in_container
# fails gmtime, localtime
- name: ubuntu-s390x-linux-qemu
env:
- ARCH=s390x
- BASE_IMAGE=s390x/ubuntu
- OS_NAME=ubuntu-qemu
addons:
apt:
packages:
- diffutils
<<: *test_in_container_qemu
# PowerPC, 64-bit, Big-endian
#- name: ubuntu-ppc64-linux-compatible-image
# env:
# - BASE_IMAGE=multiarch/ubuntu-debootstrap:powerpc-xenial
# <<: *test_in_container_compatible_image
# Intel, 32-bit, Little-endian, passes
- name: debian-i386-linux
env:
- BASE_IMAGE=i386/debian
- OS_NAME=debian
<<: *test_in_container
# ARM, 64-bit, Little-endian, passes
- name: debian-aarch64-linux
env:
- BASE_IMAGE=arm64v8/debian
- OS_NAME=debian
<<: *test_in_container
# ARM, 32-bit, Little-endian, passes
- name: debian-arm32-linux
env:
- BASE_IMAGE=arm32v7/debian
- OS_NAME=debian
<<: *test_in_container
# PowerPC, 64-bit, Little-endian
- name: debian-ppc64le-linux
env:
- BASE_IMAGE=ppc64le/debian
- OS_NAME=debian
<<: *test_in_container
# IBM Z and LinuxONE, 64-bit, Big-endian
# Works fine, but 24min instead of 5
#- name: debian-s390x-linux
# env:
# - BASE_IMAGE=s390x/debian
# - OS_NAME=debian
# <<: *test_in_container
# Intel, 32-bit, Little-endian. outdated
#- name: centos-i386-linux
# env:
# - BASE_IMAGE=i386/centos
# - OS_NAME=centos
# <<: *test_in_container
# ARM, 64-bit, Little-endian
- name: centos-aarch64-linux
env:
- BASE_IMAGE=arm64v8/centos
- OS_NAME=centos
<<: *test_in_container
# PowerPC, 64-bit, Little-endian
- name: centos-ppc64le-linux
env:
- BASE_IMAGE=ppc64le/centos
- OS_NAME=centos
<<: *test_in_container
# ARM, 64-bit, Little-endian
- name: fedora-aarch64-linux
env:
- BASE_IMAGE=arm64v8/fedora
- OS_NAME=fedora
<<: *test_in_container
# ARM, 64-bit, Little-endian. from ci-multi-arch-native-container-test
# fails memcmp16_s
- name: aarch64-fedora-docker
arch: arm64
env:
- SETARCH=
- CC=
- DIST=fedora
- BASE_IMAGE="${DIST}:31"
- PODMAN=docker
<<: *test_multi_arch_native_container_test
# IBM Z, 64-bit, Big-endian. from ci-multi-arch-native-container-test
# 4x faster than the other s390x tests
- name: s390x-fedora-docker
arch: s390x
env:
- SETARCH=
- CC=
- DIST=fedora
- BASE_IMAGE="${DIST}:31"
- PODMAN=docker
<<: *test_multi_arch_native_container_test
# PowerPC, 64-bit, Little-endian. passes (31min)
- name: fedora-ppc64le-linux
env:
- BASE_IMAGE=ppc64le/fedora
- OS_NAME=fedora
<<: *test_in_container
# IBM Z, 64-bit, Big-endian. passes (31min)
# Works fine, but too slow
#- name: fedora-s390x-linux
# env:
# - BASE_IMAGE=s390x/fedora
# - OS_NAME=fedora
# <<: *test_in_container
# Intel, 64-bit, Little-endian
- name: rhel-x86_64-linux-native
env:
- BASE_IMAGE=registry.access.redhat.com/ubi8:8.0
- OS_NAME=rhel
<<: *test_in_container
# ARM, 64-bit, Little-endian. outdated
#- name: rhel-aarch64-linux
# env:
# - BASE_IMAGE=registry.access.redhat.com/ubi8:8.0
# - OS_NAME=rhel
# - MANIFEST_ARCH=arm64
# <<: *inspect_image
# <<: *test_in_container
# PowerPC, 64-bit, Little-endian
- name: rhel-ppc64le-linux-native
os: linux-ppc64le
env:
- BASE_IMAGE=registry.access.redhat.com/ubi8:8.0
- OS_NAME=rhel
<<: *test_in_container
# "dnf -y update" outputs an error:
# "qemu: uncaught target signal 11 (Segmentation fault) - core dumped"
# - name: rhel-ppc64le-linux
# env:
# - BASE_IMAGE=registry.access.redhat.com/ubi8:8.0
# - OS_NAME=rhel
# - MANIFEST_ARCH=ppc64le
# <<: *inspect_image
# <<: *test_in_container
# IBM Z and LinuxONE, 64-bit, Big-endian. outdated
#- name: rhel-s390x-linux
# env:
# - BASE_IMAGE=registry.access.redhat.com/ubi8:8.0
# - OS_NAME=rhel
# - MANIFEST_ARCH=s390x
# <<: *inspect_image
# <<: *test_in_container
#- os: linux
# arch: arm64
#- os: linux
# arch: s390x
#- os: linux
# arch: ppc64le
#- os: linux
# arch: ppc64
#- os: linux
# arch: sparc64
#- os: linux
# arch: powerpc
#- os: linux
# arch: hppa
#- os: linux
# arch: m68k
allow_failures:
- name: x86_64-distcheck
- name: ubuntu-aarch64-linux
- name: ubuntu-aarch64-linux-qemu
#- name: ubuntu-aarch64-linux-compatible-image
- name: ubuntu-arm32-linux
- name: ubuntu-arm32-linux-qemu
#- name: ubuntu-arm32-linux-compatible-image
- name: ubuntu-ppc64le-linux
- name: ubuntu-ppc64le-linux-qemu
- name: ubuntu-s390x-linux-qemu
#- name: ubuntu-ppc64-linux-compatible-image
- name: aarch64-fedora-docker
- name: ubuntu-aarch64-linux-native
# clang++ does not allow c anymore. gcc is duplicate to cc
#exclude:
# - env: XCC="gcc" TRAVIS_OS_NAME=osx
# - env: XCC="cc" TRAVIS_OS_NAME=osx
branches:
except:
- /^v[0-9]+/
- appveyor
install:
- build-aux/autogen.sh
script:
- build-aux/conf-make-check.sh
|