|
1 | | -language: shell # We do everything inside Docker and don't want travis fiddling with steps or environment variables |
2 | | - |
| 1 | +dist: trusty |
3 | 2 | sudo: required |
4 | | - |
5 | 3 | services: |
6 | 4 | - docker |
7 | 5 |
|
| 6 | +language: go |
| 7 | +go: |
| 8 | + - "1.5.x" |
| 9 | + - "1.10.x" |
| 10 | +go_import_path: github.com/coreos/go-systemd |
| 11 | + |
8 | 12 | env: |
9 | 13 | global: |
| 14 | + - IMPORTPATH=github.com/coreos/go-systemd |
10 | 15 | - GOPATH=/opt |
| 16 | + - GO15VENDOREXPERIMENT=1 |
| 17 | + - DEP_BINDIR=/tmp |
11 | 18 | - BUILD_DIR=/opt/src/github.com/coreos/go-systemd |
12 | 19 | matrix: |
| 20 | + - DOCKER_BASE=ubuntu:16.04 |
13 | 21 | - DOCKER_BASE=ubuntu:18.04 |
14 | 22 | - DOCKER_BASE=debian:stretch |
15 | 23 |
|
16 | 24 | before_install: |
| 25 | + - sudo apt-get -qq update |
| 26 | + - sudo apt-get install -y libsystemd-journal-dev libsystemd-daemon-dev |
| 27 | + - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | INSTALL_DIRECTORY=${DEP_BINDIR} sh |
| 28 | + - ${DEP_BINDIR}/dep ensure -v |
17 | 29 | - docker pull ${DOCKER_BASE} |
18 | | - - docker run --privileged -e GOPATH=${GOPATH} --cidfile=/tmp/cidfile ${DOCKER_BASE} /bin/bash -c "apt-get update && apt-get install -y build-essential git golang dbus libsystemd-dev libpam-systemd systemd-container && go get github.com/coreos/pkg/dlopen && go get github.com/godbus/dbus" |
| 30 | + - docker run --privileged -e GOPATH=${GOPATH} --cidfile=/tmp/cidfile ${DOCKER_BASE} /bin/bash -c "apt-get update && apt-get install -y sudo build-essential git golang dbus libsystemd-dev libpam-systemd systemd-container" |
19 | 31 | - docker commit `cat /tmp/cidfile` go-systemd/container-tests |
20 | 32 | - rm -f /tmp/cidfile |
21 | 33 |
|
22 | 34 | install: |
23 | 35 | - docker run -d --cidfile=/tmp/cidfile --privileged -e GOPATH=${GOPATH} -v ${PWD}:${BUILD_DIR} go-systemd/container-tests /bin/systemd --system |
24 | 36 |
|
25 | 37 | script: |
26 | | - - docker exec `cat /tmp/cidfile` /bin/bash -c "cd ${BUILD_DIR} && ./test" |
| 38 | + - ./scripts/travis/pr-test.sh go_fmt |
| 39 | + - ./scripts/travis/pr-test.sh build_source |
| 40 | + - ./scripts/travis/pr-test.sh build_tests |
| 41 | + - docker exec `cat /tmp/cidfile` /bin/bash -c "cd ${BUILD_DIR} && ./scripts/travis/pr-test.sh run_tests" |
| 42 | + - ./scripts/travis/pr-test.sh go_vet |
| 43 | + - ./scripts/travis/pr-test.sh license_check |
27 | 44 |
|
28 | 45 | after_script: |
29 | 46 | - docker kill `cat /tmp/cidfile` |
0 commit comments