libaribb25/.travis.yml
2021-10-24 22:40:39 +09:00

100 lines
2.5 KiB
YAML

sudo: false
language: cpp
matrix:
include:
# Linux with GNU C Compiler
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
packages:
- gcc
- cmake
- cmake-data
- libpcsclite-dev
# Linux with LLVM C Compiler
- os: linux
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
packages:
- clang
- cmake
- cmake-data
- libpcsclite-dev
# ARM Raspbian (jessie)
- os: linux
sudo: required
compiler: gcc
addons:
apt:
packages:
- qemu-user-static
- debootstrap
env:
- TARGET_DIST=raspbian
- TARGET_REPO=jessie
- TARGET_ARCH=armhf
- TARGET_SITE=http://archive.raspbian.com/raspbian
- TARGET_DEPS=git,cmake,libpcsclite-dev
- QEMU_CPU=arm11mpcore
# MacOS X 10.10 (Yosemite)
- os: osx
osx_image: xcode6.4
compiler: clang
# MacOS X 10.11 (El Captain)
- os: osx
osx_image: xcode7.3
compiler: clang
# macOS 10.11 (Sierra)
- os: osx
osx_image: xcode8
compiler: clang
cache:
directories:
- ${HOME}/rootfs/${TARGET_DIST}/${TARGET_REPO}/${TARGET_ARCH}/var/cache/apt/archives
before_script:
- if [ ! -z "${TARGET_DIST}" ]; then
ROOTFS="${HOME}/rootfs/${TARGET_DIST}/${TARGET_REPO}/${TARGET_ARCH}";
if [ ! -f "/usr/share/debootstrap/scripts/${TARGET_REPO}" ]; then
sudo ln -s "/usr/share/debootstrap/scripts/sid" "/usr/share/debootstrap/scripts/${TARGET_REPO}";
fi;
sudo mkdir -p "${ROOTFS}";
sudo qemu-debootstrap
--no-check-gpg --variant=buildd
--include="${TARGET_DEPS}" --arch="${TARGET_ARCH}"
"${TARGET_REPO}" "${ROOTFS}" "${TARGET_SITE}";
sudo mount --bind /home "${ROOTFS}/home";
export SHELL="sudo chroot ${ROOTFS} /bin/bash";
else
export SHELL="/bin/bash";
fi
script:
- >
${SHELL} -e <<EOF
install -d "${TRAVIS_BUILD_DIR}/build"
cd "${TRAVIS_BUILD_DIR}/build"
cmake ..
make VERBOSE=1
./b25 2>&1 | grep --color=auto "ARIB STD-B25"
if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
./libaribb25.so 2>&1 | grep --color=auto "ARIB STD-B25"
fi
exit
EOF