forked from yeputons/hse-2019-pb-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
47 lines (46 loc) · 2.17 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
# Not 'language: python' because there will be projects in multiple languages.
language: minimal
dist: bionic
cache:
- pip
before_install:
- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
- git fetch origin master
install:
- sudo bash -c 'echo "deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe" >> /etc/apt/sources.list'
- sudo bash -c 'echo "deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe" >> /etc/apt/sources.list'
- sudo apt-get update
- sudo apt-get install python3.8 python3-tk python3.8-distutils python3.8-venv # https://bugs.launchpad.net/ubuntu/+source/python3.8/+bug/1851684
- sudo apt-get install valgrind clang-format
- sudo apt-get install haskell-platform hlint libghc-hunit-dev
- python3.8 -m venv .py38
- source .py38/bin/activate
- python --version
- python3 --version
- pip install wheel # https://stackoverflow.com/a/44862371/767632
- pip install -r requirements.txt -r requirements-dev.txt
- valgrind --version
- clang-format --version
- ghc --version
- hlint --version
script:
- find task??-* -iname '*.py' | xargs flake8 --max-line-length=100 --show-source
- find task??-* -iname '*.py' | xargs pylint --max-line-length=100 --disable=invalid-name,missing-docstring,global-statement,too-many-lines,R --enable=simplifiable-if-statement,redefined-variable-type
- find task??-* -iname '*.py' | xargs mypy --ignore-missing-imports
- pushd task04-tsqueue/
- diff -u <(cat src/*) <(clang-format -style=file src/*)
- cmake . && make
- valgrind --tool=memcheck --leak-check=full --error-exitcode=1 ./queue_test
- popd
- pushd task05-fp-exercises
- ghc -W -Wno-unused-matches -Wno-unused-imports Exercises.hs
- ghc -W RunTests.hs
- if [ -n "$(git log -1 --pretty=format:%H origin/master..HEAD -- .)" ] ; then ./RunTests; else echo Skipping running tests for unchanged task; fi
- hlint "--ignore=Unnecessary hiding" "--ignore=Use foldr" Exercises.hs
- popd
- pushd task06-fp-yat
- ghc -W -Wno-unused-matches -Wno-unused-imports Yat.hs
- ghc -W RunTests.hs
- if [ -n "$(git log -1 --pretty=format:%H origin/master..HEAD -- .)" ] ; then ./RunTests; else echo Skipping running tests for unchanged task; fi
- hlint "--ignore=Avoid lambda" Yat.hs
- popd