-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (31 loc) · 1.21 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
language: nix
nix: 2.1.1
script:
# install netorcai
- nix-env -f https://github.com/netorcai/pkgs/archive/master.tar.gz -iA netorcai_dev
- netorcai --version
# install dmd and dub
- nix-env -f https://github.com/NixOS/nixpkgs/archive/18.09.tar.gz -iA dmd dub
- dmd --version
- dub --version
# run unit tests with coverage
- make unittest-cov
# delete non-interesting coverage results
- find . -name '*.lst' | grep 'dub_test' | sed -E "s/(.*)/rm -f -- '\1'/" | bash
# install doveralls and send coverage results with it
- nix-shell -p wget --command 'wget -O ./doveralls "https://github.com/ColdenCullen/doveralls/releases/download/v1.3.1/doveralls_linux_travis"'
- chmod +x ./doveralls
- ./doveralls
# build and run the example GL and player
- dub add-local .
- (cd examples/hello-gl && dub build)
- (cd examples/hello-player && dub build)
- nohup netorcai --autostart --nb-players-max 2 --nb-visus-max 0 --delay-first-turn=500 --delay-turns=500 --nb-turns-max=2 --simple-prompt &
- sleep 1
- ./examples/hello-gl/hello-gl &
- gl=$!
- ./examples/hello-player/hello-player &
- player1=$!
- ./examples/hello-player/hello-player &
- player2=$!
- wait ${player1} ${player2} ${gl}