on master help sign in
Merge pull request #1831 from NobbZ/feature/werror-ci

enable -Werror on travis and encourage to use it locally, but not on hackage!

commitb0257ec8af3d3a891d5767b0b0c64cd422685e87 authorDavid Christiansen <david@davidchristiansen.dk> dateSun 4 Jan 2015, 10:17 (12 years ago) parent01ccf1f09038de
4 files changed+18−1
.travis.yml+1−1 Makefile+4 README.md+6 idris.cabal+7
.travis.yml+1−1
@@ -20,7 +20,7 @@ before_script:
2020 - tar -xf Idris-dev/dist/idris*.tar.gz
2121 - cd idris*
2222script:
23− - cabal configure -f FFI
23+ - cabal configure -f FFI -f CI
2424 - if [[ "$TESTS" != "doc" ]]; then cabal build; fi
2525 - if [[ "$TESTS" != "doc" ]]; then cabal copy; fi
2626 - if [[ "$TESTS" != "doc" ]]; then cabal register; fi
Makefile+4
@@ -3,6 +3,10 @@
33include config.mk
44-include custom.mk
55
6+ifdef CI
7+CABALFLAGS += -f CI
8+endif
9+
610install:
711 $(CABAL) install $(CABALFLAGS)
812
README.md+6
@@ -37,6 +37,12 @@ To build with `libffi` by default, create a `custom.mk` file and add the followi
3737
3838The file custom.mk-alldeps is a suitable example.
3939
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+
4046## Code Generation
4147
4248Idris has support for external code generators. Supplied with the distribution
idris.cabal+7
@@ -613,6 +613,11 @@ Flag freestanding
613613 Default: False
614614 manual: True
615615
616+Flag CI
617+ Description: Built everything using "-Werror", meant for CI-builds only
618+ Default: False
619+ manual: True
620+
616621Library
617622 hs-source-dirs: src
618623 Exposed-modules:
@@ -791,6 +796,8 @@ Library
791796 if flag(freestanding)
792797 other-modules: Target_idris
793798 cpp-options: -DFREESTANDING
799+ if flag(CI)
800+ ghc-options: -Werror
794801
795802Executable idris
796803 Main-is: Main.hs