forked from coreos/go-systemd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (38 loc) · 1.39 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
42
43
44
dist: trusty
sudo: required
services:
- docker
language: go
go:
- "1.12.x"
- "1.13.x"
go_import_path: github.com/coreos/go-systemd
env:
global:
- IMPORTPATH=github.com/coreos/go-systemd
- GOPATH=/opt
- GO111MODULE=on
- DEP_BINDIR=/tmp
- BUILD_DIR=/opt/src/github.com/coreos/go-systemd
matrix:
- DOCKER_BASE=ubuntu:16.04
- DOCKER_BASE=ubuntu:18.04
- DOCKER_BASE=debian:stretch
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libsystemd-journal-dev libsystemd-daemon-dev
- docker pull ${DOCKER_BASE}
- 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"
- docker commit `cat /tmp/cidfile` go-systemd/container-tests
- rm -f /tmp/cidfile
install:
- docker run --shm-size=2gb -d --cidfile=/tmp/cidfile --privileged -e GOPATH=${GOPATH} -v ${PWD}:${BUILD_DIR} go-systemd/container-tests /bin/systemd --system
script:
- ./scripts/travis/pr-test.sh go_fmt
- ./scripts/travis/pr-test.sh build_source
- ./scripts/travis/pr-test.sh build_tests
- docker exec --privileged `cat /tmp/cidfile` /bin/bash -c "cd ${BUILD_DIR} && ./scripts/travis/pr-test.sh run_tests"
- ./scripts/travis/pr-test.sh go_vet
- ./scripts/travis/pr-test.sh license_check
after_script:
- docker kill `cat /tmp/cidfile`