forked from DOMjudge/domjudge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
28 lines (26 loc) · 998 Bytes
/
.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
sudo: required
language: generic
services:
- docker
- mysql
before_install:
# Takes about 1.5minutes to pull
- time docker pull domjudge/travisci:1.0
# These get copied into the container since we mount /etc/{passwd,shadow,group}
# for some reason doing this inside the container fails with "failure while writing changes to /etc/passwd"
- sudo useradd -d /nonexistent -g nogroup -s /bin/false domjudge-run-0
- sudo useradd -d /nonexistent -g nogroup -s /bin/false domjudge-run-1
- sudo groupadd domjudge-run
script:
- |
docker run --privileged \
-v $HOME:$HOME \
-v /sys:/sys \
-v /etc/passwd:/etc/passwd \
-v /etc/group:/etc/group \
-v /etc/shadow:/etc/shadow \
-v /var/run/mysqld:/var/run/mysqld \
--net=host \
-u $(id -u):$(id -g) \
-it -e "TERM=xterm-256color" -e "HOME=$HOME" -e "USER=$USER"\
domjudge/travisci:1.0.1 /bin/bash -eo pipefail -c "umask 0002; cd $TRAVIS_BUILD_DIR; script --return -qfc \"./travis.sh\" /dev/null | ts \"[%F %T]\" "