-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
149 lines (135 loc) · 6.5 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# 2020-05-26: NOTE: Enabling experimental Travis feature of YAML check inside
# Look into: Build #NUM -> Job #NUM.N -> View config -> Build config validation
version: ~> 1.0
# NOTE: Please, be aware that Travis YAML & docs & API are hard to make work properly. Travis configuration requires a lot of retries and some compromises. There are many ways that may look like that can be done in that way, but it would not work most of the time, or not work the way that you expect/need it. Travis config works only in certain particular ways. Some things look possible - but they are impossible in Travis. Current configuration is "the best way possible" that was found in ~100-150-200 retries, depending on what one considers a retry.
# NOTE: Let the official Travis YAML checker help you: https://config.travis-ci.com/explore
language: nix
sudo: required # 2020-05-26: This mode is deprecated, but still offers 7.5 GB RAM instead of the default 4GB
git:
quiet: true # Do not log
depth: 4 # NOTE: "The use of clone depth: 1 often results in a git error
# when a new commit has been pushed to a branch before the CI
# platform started cloning the intended commit."
# # 2020-05-26: Currently newest macOS image
# osx_image: xcode11.4 # Official Nix installer fails spectacularly on it.
env:
global:
###
### NOTE: This configuration uses `build.sh` interface, which uses `default.nix` interface, which exposes the Nixpkgs Haskell Lib interface.
###
### Documentation of this settings is mosly in `default.nix`, since most settings it Nixpkgs related
### and the other part of keys explained in `build.sh`, since those address external procedures aound the builds.
### Additional documentation is in Nixpkgs Haskell.lib: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/lib.nix
###
#
- rev='nixos-unstable'
# - NIX_PATH="nixpkgs=https://github.com/nixos/nixpkgs/archive/$rev.tar.gz"
- allowInconsistentDependencies='false'
- doJailbreak='false'
- doCheck='true'
- sdistTarball='false'
- buildFromSdist='false'
- buildStrictly='false'
- failOnAllWarnings='false'
- enableDeadCodeElimination='false'
- disableOptimization='true'
- linkWithGold='false'
- enableLibraryProfiling='false'
- enableExecutableProfiling='false'
- doTracing='false'
- enableDWARFDebugging='false'
- doStrip='false'
- enableSharedLibraries='true'
- enableStaticLibraries='false'
- enableSharedExecutables='false'
- justStaticExecutables='false'
- enableSeparateBinOutput='false'
- checkUnusedPackages='false'
- doHaddock='false'
- doHyperlinkSource='false'
- doCoverage='false'
- doBenchmark='false'
- generateOptparseApplicativeCompletions='false'
- executableNamesToShellComplete='[ "replaceWithExecutableFileName" ]'
#
- withHoogle='false'
#
- cachixAccount='haskell-with-nixpkgs'
# NOTE: This is secure CACHIX_SIGNING_KEY=val, it is only available on project internal branches, so Cachix would push only there
- secure: "cfDV3gKzyCs1iK24eeyDriFBFVa9kuWIT51lCzgN65SvRaWZL28XtWTxh5PxubK77eOdKzFypO9ZZuCr7/TLDkwCtTWr2j1cb6RfUYCLSYZvfL4uYWi641jiX2lVFSN4K03Cy7cfByBUK/iVQinK3eyjBKOSdmIq5F7k0hxAmfvFNPCxScRrA2HAsBlnYGZZFhHqCFTpCsqSw2AadJLL6BA1d8652i5IFGgny9thZDev7/qjLVZ8NRlXXFIik0N0GhiNq/XxP25jJ+NPFdhw1TimW78rto+kRfWdFuBWjn1dGcCn5XUr6NthqPoGYk0JIGUaleBJsE9/nvqcTHVzyYgAg1ijgEMd2Sd+mJ2etDbvaADDQJBLSIMGMnBB9UlGJVgRKc/Y+6xBxOgUqw7eMW4FPR+pD1KERE1JaAJ7Ubk4g/t4VDNesPC/bs4z3Xtu188oKMX6ZUgjbMhCCktm6OGl8PdWIlQqYKPFEwYUuhfFi+uGLzZNX8lV61CUXf2ui9Uzq2RmRDbO3Ks/G9uRM8Egie9M/GNF35Twt/GA/A/wp2tpudTTP5ueYvXBHmfTH8LdENBAKnMiheGhq6yhvF43Cxa0s0co9Z22crtJGdW9NPRoLavpX6Yuf5XYtStooNZf036f74BZ8vjVlIClYi/bkdk7v7OmOFa9ZKunsbs="
#
- ghcjsTmpLogFile='/tmp/ghcjsTmpLogFile.log'
- ghcjsLogTailLength='10000'
# 2020-05-26: Currently newest Travis dist Ubuntu 18.04 bionic
# {os} x {jobs} + {jobs:include} - {jobs:exclude} = {build matrix}
jobs:
include:
- name: Nixpkgs, GHC 8.6.5, Linux
env:
- compiler='ghc865'
- linkWithGold='true'
os: linux
dist: bionic
- name: Nixpkgs, default GHC (8.8), macOS, Strict
env:
- buildStrictly='true'
os: osx
- name: Nipkgs, GHC 8.10.1, Linux, SDist, Optimize, Benchmark, Haddock, Shell Completions
env:
- compiler='ghc8102'
- buildFromSdist='true'
- linkWithGold='true'
- doHaddock='true'
- doHyperlinkSource='true'
- doBenchmark='true'
- disableOptimization='false'
- enableDeadCodeElimination='true'
- generateOptparseApplicativeCompletions='false' # 2020-08-10: FIXME: Turn on when binary provided
os: linux
dist: bionic
- name: Nixpkgs, GHCJS, Linux
env:
- compiler='ghcjs'
os: linux
dist: bionic
allow_failures:
- env: compiler='ghcjs'
before_script:
- sudo mkdir -p /etc/nix
- echo "trusted-users = root $USER" | sudo tee -a /etc/nix/nix.conf
# # Linux service restart
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sudo systemctl restart nix-daemon.service;fi
# # macOS service restart
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then sudo launchctl kickstart -k system/org.nixos.nix-daemon; fi
script:
#
#
# Install Cachix client using Nix:
- if [ "${TRAVIS_OS_NAME}" = "linux" ] || [ "${TRAVIS_OS_NAME}" = "osx" ]; then nix-env -iA cachix -f https://cachix.org/api/v1/install; fi
- cachix use "$cachixAccount"
# If key is set - use Cachix push, else - proceed without it
- if [ ! "$CACHIX_SIGNING_KEY" = "" ]; then cachix push "$cachixAccount" --watch-store& fi
#
#
# NOTE: Normal GHC build
- if [ ! "$compiler" = 'ghcjs' ]; then ./build.sh; fi
#
#
# NOTE: GHCJS build
# HACK: Travis terminates GHCJS because of very huge log,
# so `SILENT` mode for it was created
# and travis_wait 50 to wait on no outputs (otherwise Travis terminates build in 10 minutes as stale)
# and `bash` wrapper so Travis parses `travis_wait` => `if; then; fi` line
- travis_wait 50 bash -c 'if [ "$compiler" = "ghcjs" ]; then ./silenced-lazy-ghcjs-build.sh; fi'
# NOTE: For GHCJS dump the last $ghcjsLogTailLength lines into CI out to see
# Since build runs inside `travis_wait` - it was impossible to output log from it
- if [ "$compiler" = "ghcjs" ]; then tail -n "$ghcjsLogTailLength" "$ghcjsTmpLogFile" && rm "$ghcjsTmpLogFile"; fi
#
#
# Track the commits on this repo branches + cron rechecks build
branches:
only:
- master
- pending
notifications:
email: false