125 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			125 lines
		
	
	
		
			4.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| # http://docs.haskellstack.org/en/stable/travis_ci.html
 | |
| 
 | |
| language: haskell
 | |
| 
 | |
| sudo: false
 | |
| 
 | |
| cache:
 | |
|   directories:
 | |
|     - $HOME/.stack/
 | |
|     # - "$HOME/.stack-work/"
 | |
|     - $HOME/shelltestrunner/
 | |
| 
 | |
| # addons:
 | |
| #   apt:
 | |
| #     packages:
 | |
| #     - libgmp-dev
 | |
| 
 | |
| branches:
 | |
|   only:
 | |
|     - master
 | |
|     - travis
 | |
| 
 | |
| # matrix:
 | |
| #   include:
 | |
| #   - env: ARGS=""
 | |
| #   - env: ARGS="--stack-yaml stack-7.10.yaml"
 | |
| 
 | |
| install:
 | |
|   # install stack
 | |
|   - mkdir -p ~/.local/bin
 | |
|   - export PATH=~/.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'
 | |
|   - chmod a+x ~/.local/bin/stack
 | |
|   - stack --version
 | |
|   # install GHC and most deps
 | |
|   - stack +RTS -N2 -RTS build --install-ghc --test --only-snapshot
 | |
|   - stack exec -- ghc --version
 | |
|   # install tools
 | |
|   - git clone http://github.com/simonmichael/shelltestrunner
 | |
|   - stack +RTS -N2 -RTS install --install-ghc --stack-yaml=shelltestrunner/stack.yaml --resolver=lts
 | |
|   - shelltest --version
 | |
| 
 | |
| script:
 | |
|   # build all packages, ensuring no warnings, no haddock failures, per-package test suites passing 
 | |
|   - stack +RTS -N2 -RTS build --ghc-options=-Werror --haddock --no-haddock-deps --test
 | |
|   # install hledger addon deps, build addons
 | |
|   # TODO: require successful warning-free builds
 | |
|   - bin/compile.sh
 | |
|   # run functional tests
 | |
|   - make functest
 | |
| 
 | |
|   # run only some functional tests
 | |
|   # - make tests/addons/hledger-addon
 | |
|   # - PATH=~/.local/bin:/usr/bin:/bin COLUMNS=80 stack exec -- shelltest --execdir -x bin/equity -- -j16 tests
 | |
| 
 | |
| # coveralls.io coverage reports
 | |
| # after_script:
 | |
| #   - "cabal install hpc-coveralls"
 | |
| #   - "hpc-coveralls count-von-count-tests --exclude-dir=tests --exclude-dir=src/Gyrid --display-report"
 | |
| 
 | |
| notifications:
 | |
|   irc:
 | |
|     channels:
 | |
|       - "chat.freenode.net#hledger"
 | |
|     on_success: change # [always|never|change] default: always
 | |
|     on_failure: change # default: always
 | |
|     use_notice: true
 | |
|     skip_join: true
 | |
|     # If you enable skip_join, remember to remove the NO_EXTERNAL_MSGS flag (n) on the IRC channel(s) the bot notifies.
 | |
|     template:
 | |
|       - "%{commit}: %{message} %{build_url}"
 | |
|       # - "%{repository_name} (%{commit}) : %{message} %{build_url}"
 | |
|     # You can interpolate the following variables:
 | |
|     #     repository_slug: your GitHub repo identifier (like svenfuchs/minimal)
 | |
|     #     repository_name: the slug without the username
 | |
|     #     repository: same as repository_slug [Deprecated]
 | |
|     #     build_number: build number
 | |
|     #     build_id: build id
 | |
|     #     branch: branch build name
 | |
|     #     commit: shortened commit SHA
 | |
|     #     author: commit author name
 | |
|     #     commit_message: commit message of build
 | |
|     #     commit_subject: first line of the commit message
 | |
|     #     result: result of build
 | |
|     #     message: travis message to the build
 | |
|     #     duration: duration of the build
 | |
|     #     compare_url: commit change view URL
 | |
|     #     build_url: URL of the build detail
 | |
|     # The default template is:
 | |
|     #   - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}"
 | |
|     #   - "Change view : %{compare_url}"
 | |
|     #   - "Build details : %{build_url}"
 | |
| 
 | |
|   # email: # false
 | |
|   #   recipients:
 | |
|   #     - one@example.com
 | |
|   #     - other@example.com
 | |
|   #   on_success: [always|never|change] # default: change
 | |
|   #   on_failure: [always|never|change] # default: always
 | |
| 
 | |
| 
 | |
| # https://docs.travis-ci.com/user/customizing-the-build
 | |
| #
 | |
| # The Build Lifecycle #
 | |
| # A build on Travis CI is made up of two steps:
 | |
| # install: install any dependencies required
 | |
| # script: run the build script
 | |
| # You can run custom commands before the installation step (before_install), and before (before_script) or after (after_script) the script step.
 | |
| # In a before_install step, you can install additional dependencies required by your project such as Ubuntu packages or custom services.
 | |
| # You can perform additional steps when your build succeeds or fails using the after_success (such as building documentation, or deploying to a custom server) or after_failure (such as uploading log files) options. In both after_failure and after_success, you can access the build result using the $TRAVIS_TEST_RESULT environment variable.
 | |
| # The complete build lifecycle, including three optional deployment steps and after checking out the git repository and changing to the repository directory, is:
 | |
| #
 | |
| # OPTIONAL Install apt addons
 | |
| # OPTIONAL Install cache components
 | |
| # before_install
 | |
| # install
 | |
| # before_script
 | |
| # script
 | |
| # OPTIONAL before_cache (for cleaning up cache)
 | |
| # after_success or after_failure
 | |
| # OPTIONAL before_deploy
 | |
| # OPTIONAL deploy
 | |
| # OPTIONAL after_deploy
 | |
| # after_script
 |