-
Notifications
You must be signed in to change notification settings - Fork 45
/
.travis.yml
77 lines (62 loc) · 2.69 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
# This is the simple Travis configuration, which is intended for use
# on applications which do not require cross-platform and
# multiple-GHC-version support. For more information and other
# options, see:
#
# https://docs.haskellstack.org/en/stable/travis_ci/
#
# Copy these contents into the root directory of your Github project in a file
# named .travis.yml
# EAC: sudo seems to be requried to get a machine with enough memory to compile.
# see https://docs.travis-ci.com/user/ci-environment/
sudo: required
# Do not choose a language; we provide our own build tools.
language: generic
dist: focal
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack
# EAC: By default, TravisCI has gcc/g++-4.6.3, which is too old for lol-cpp.
# I tried explicitly using gcc-4.9, but couldn't install unix-2.7.0 with that
# (linking errors). Instead, I'm using "dist:trusty", which has a newer version
# of gcc (4.8.4) by default.
# Ensure necessary system libraries are present
addons:
apt:
packages:
- libgmp-dev
before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- travis_retry curl -sSL https://github.com/sol/hpack/raw/main/get-hpack.sh | bash
install:
# Build dependencies for libs, tests, benches, and executables
- stack build lol --no-terminal --install-ghc --test --bench --dependencies-only
- stack build lol-cpp --no-terminal --install-ghc --test --bench --dependencies-only --flag lol-cpp:with-execs
- stack build lol-apps --no-terminal --install-ghc --test --bench --dependencies-only
# putting aside repa for now:
# - stack build lol-repa --no-terminal --install-ghc --test --bench --dependencies-only --flag lol-repa:with-execs
script:
- ./scripts/fail-if-cabal-file-needs-update lol
- ./scripts/fail-if-cabal-file-needs-update lol-cpp
- ./scripts/fail-if-cabal-file-needs-update lol-apps
# Build the package, its tests, benchmarks, executables, (but not its
# docs!) and run the tests
# note: --fast is about 33% faster (compile time + test time) than
# without --fast
# build docs and executables:
- travis_wait 40 stack build --fast --flag lol-cpp:with-execs
- travis_wait 40 stack test lol --no-terminal --fast
- travis_wait 40 stack test lol-cpp --no-terminal --fast
- travis_wait 40 stack bench lol --no-terminal --fast --no-run-benchmarks
- travis_wait 40 stack bench lol-cpp --no-terminal --fast --no-run-benchmarks
notifications:
email:
recipients:
- cpeikert@alum.mit.edu
- cmlsharp@umich.edu
on_success: change
on_failure: always