-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
93 lines (81 loc) · 3.78 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
jobs:
include:
- stage: core-haskell
# config from https://docs.haskellstack.org/en/stable/travis_ci/#running-tests
# haddock coverage is also shown in the build log
# Do not choose a language; we provide our own build tools.
language: generic
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack
# Ensure necessary system libraries are present
addons:
apt:
packages:
- libgmp-dev
before_install:
- cd ./Calculations/haskell/solarduino-haskell
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
install:
# Build dependencies
- stack --no-terminal --install-ghc test --only-dependencies
script:
# Build the package, its tests, and its docs and run the tests
- stack --no-terminal test --haddock --no-haddock-deps --coverage
# Upload to coveralls using Stack HPC Coveralls (SHC)
after_success:
- travis_retry curl -L https://github.com/rubik/stack-hpc-coveralls/releases/download/v0.0.4.0/shc-linux-x64-8.0.1.tar.bz2 | tar -xj
- ./shc solarduino-haskell solarduino-haskell-test
- stage: documentation
language: generic
install:
# Silent install from conda docs
# https://conda.io/docs/user-guide/install/macos.html#install-macos-silent
# adapted using
# https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html
# Needed to check if conda already installed
- export PATH="$HOME/miniconda/bin:$PATH"
# If not yet installed, obtain Miniconda
# and tectonic
# From tectonic docs
# https://tectonic-typesetting.github.io/en-US/install.html#the-anaconda-method
- if ! command -v conda > /dev/null; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda -u;
conda config --add channels conda-forge;
conda config --set always_yes yes;
conda update --all;
conda install tectonic;
fi
- conda info -a
cache:
directories:
- $HOME/miniconda
script: # Change working directory each time so including files will work. Change back so the pdfs can be found for deployment. This way, building multiple files goes well.
- cd ./Documentation/src/
- tectonic ./documentation.tex --print
- cd ../../
deploy:
provider: releases
api_key:
secure: rQIugDrSWmIXr7oIIxhcpvPIAql6YYc0+4+yIyHi2iJ3jYuOT7EI/a1q81tKMvPOXs/U+vyLIhyyzstK4KXkRj0wTS+e518PE9VZyysVRkmzX8fQkScjne4ITTXOeAsxpTU9gm7QnS+evtalt5izIbsBl/6lJY0HnrVwtd7PmMB2v9IQhF+FuoZRVJF+MWBUrENNPPP6p4PLXbbZgFUaYDvQuIyZvn5EGSlSnVlUmgggkUJJtjs+H+j0M7Ju+wk1jVhO3e4VQa8lO9NN3m8U2aYz99zgT2yLZQ/gBa1OeKsVfJuhajOfnigUuGhsZD2PXPHZdLlxPI2SuxsSUmFnJesxVaTHTROz+e8d+xL90iyCq/l1p8BUiap1ZNalkbYK637TiPnxLKVKhzDDH0Sf+OjY92HK0cpBSKBCvlH+JYX4EY/DqIBubFCctc5Qd/PqcYZqyKCepadnKB+nXWpmp4n9Sr2/wA4EDdrMsRIlNHOi0cfiGleo9abJ/ZiDVUekW0Bgic3rCIZlN8S05huXuWxWJTBJvMtA1w2XyRCejapVo4EH1w8uxTClwiT4V++bMOpQK9QYd2L9vIMXy7J4h+iFhGO9vkP09ACEo40SS77+zFq79aEYTOIcqjP5uB3RhV8tKAfv4MTuL9x50yPzobr0hzTVxengQPYAmEldQj4=
file:
- ./documentation/src/documentation.pdf
skip_cleanup: true
on:
tags: true
branch: master
- stage: pi
dist: xenial # To use Python 3.7
language: python
python:
- "3.7"
install:
- pip install flake8
script:
- cd Raspberry-Pi
- flake8 .