This repository has been archived by the owner on Jan 14, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
41 lines (40 loc) · 1.51 KB
/
.travis.yml
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
dist: trusty
sudo: required
language: generic
services:
- docker
before_install:
- docker pull debian:"${BUILD_DISTRIBUTION:?}"
- docker run -d --name buildhost --privileged -v "${TRAVIS_BUILD_DIR:?}":/tmp/build_dir -w "/tmp/build_dir" debian:"${BUILD_DISTRIBUTION:?}" tail -f /dev/null
install:
- docker exec buildhost apt-get -qq update
- docker exec buildhost apt-get install -y --no-install-recommends ${COMMON_DEPS:?}
- docker exec buildhost apt-get install -y --no-install-recommends ${TARGET_DEPS:?}
script:
- travis_wait 30 docker exec buildhost python3 -m freedommaker "${TARGET:?}" --distribution="${DISTRIBUTION:?}"
- ls -l build
- file build/freedombox-*.img*
- TmpDir="$(mktemp -d)"
- cp -p "$(ls build/freedombox-*.img*)" "${TmpDir:?}"
- ( cd "${TmpDir:?}" && ${DECOMPRESS_AND_DELETE_IMAGE:?} freedombox-*.img*; )
- file "${TmpDir:?}"/freedombox-*.img
- fdisk -l "${TmpDir:?}"/freedombox-*.img
- rm -r "${TmpDir:?}"
after_failure:
- docker exec buildhost /bin/sh -c 'for F in $(find . -name "*.log"); do echo ${F:?}; tail -n 1000 ${F:?}; done'
env:
global:
- BUILD_DISTRIBUTION=stretch
- COMMON_DEPS="python3-minimal libpython3-stdlib sudo vmdebootstrap"
- DISTRIBUTION=stable
matrix:
- TARGET=raspberry TARGET_DEPS="dosfstools qemu-user-static binfmt-support pxz" DECOMPRESS_AND_DELETE_IMAGE="xz -d"
notifications:
email:
on_success: change
on_failure: always
irc:
channels:
- "irc.oftc.net#freedombox-ci"
on_success: always
on_failure: always