on master help sign in
Merge pull request #1831 from NobbZ/feature/werror-ci
b0257ecDavid Christiansen
.travis.yml+1−1
@@ -20,7 +20,7 @@ before_script:
20 - tar -xf Idris-dev/dist/idris*.tar.gz
20 - tar -xf Idris-dev/dist/idris*.tar.gz
21 - cd idris*
21 - cd idris*
22script:
22script:
23− - cabal configure -f FFI
23+ - cabal configure -f FFI -f CI
24 - if [[ "$TESTS" != "doc" ]]; then cabal build; fi
24 - if [[ "$TESTS" != "doc" ]]; then cabal build; fi
25 - if [[ "$TESTS" != "doc" ]]; then cabal copy; fi
25 - if [[ "$TESTS" != "doc" ]]; then cabal copy; fi
26 - if [[ "$TESTS" != "doc" ]]; then cabal register; fi
26 - if [[ "$TESTS" != "doc" ]]; then cabal register; fi
Makefile+4
@@ -3,6 +3,10 @@
3include config.mk
3include config.mk
4-include custom.mk
4-include custom.mk
5
5
6+ifdef CI
7+CABALFLAGS += -f CI
8+endif
9+
6install:
10install:
7 $(CABAL) install $(CABALFLAGS)
11 $(CABAL) install $(CABALFLAGS)
8
12
README.md+6
@@ -37,6 +37,12 @@ To build with `libffi` by default, create a `custom.mk` file and add the followi
37
37
38The file custom.mk-alldeps is a suitable example.
38The file custom.mk-alldeps is a suitable example.
39
39
40+The continues integration builds on travis-ci.org are build using the ghc-flag -Werror. To enable this behaviour locally also, please compile using `make CI=true` or adding the following line into `custom.mk`:
41+
42+`CI = true`
43+
44+If you are only compiling for installing the most current version, you can ommit the CI flag, but please make sure you use it if you want to contribute.
45+
40## Code Generation
46## Code Generation
41
47
42Idris has support for external code generators. Supplied with the distribution
48Idris has support for external code generators. Supplied with the distribution
idris.cabal+7
@@ -613,6 +613,11 @@ Flag freestanding
613 Default: False
613 Default: False
614 manual: True
614 manual: True
615
615
616+Flag CI
617+ Description: Built everything using "-Werror", meant for CI-builds only
618+ Default: False
619+ manual: True
620+
616Library
621Library
617 hs-source-dirs: src
622 hs-source-dirs: src
618 Exposed-modules:
623 Exposed-modules:
@@ -791,6 +796,8 @@ Library
791 if flag(freestanding)
796 if flag(freestanding)
792 other-modules: Target_idris
797 other-modules: Target_idris
793 cpp-options: -DFREESTANDING
798 cpp-options: -DFREESTANDING
799+ if flag(CI)
800+ ghc-options: -Werror
794
801
795Executable idris
802Executable idris
796 Main-is: Main.hs
803 Main-is: Main.hs