From 888c3716658eefa7d5cf64fc93f9ab65ee9df59b Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Fri, 20 Oct 2017 14:29:53 +0100 Subject: [PATCH] Add hlint and weeder to travis script --- .travis.yml | 32 +++++++-- .travis/lts-6.yaml | 11 +++ .weeder.yaml | 162 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 198 insertions(+), 7 deletions(-) create mode 100644 .travis/lts-6.yaml create mode 100644 .weeder.yaml diff --git a/.travis.yml b/.travis.yml index 3a0d180..ed3674d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,13 +30,31 @@ before_install: - export PATH=/opt/ghc/$GHCVER/bin:$HOME/.local/bin:$PATH - mkdir -p ~/.local/bin - curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' +- rm stack.yaml +- if [[ -e .travis/$RESOLVER.yaml ]]; then mv .travis/$RESOLVER.yaml stack.yaml; else stack init --resolver=$RESOLVER; fi +- stack setup # Run tests script: -- stack --resolver=$RESOLVER setup -- stack --resolver=$RESOLVER build concurrency -- stack --resolver=$RESOLVER build dejafu -- stack --resolver=$RESOLVER build hunit-dejafu -- stack --resolver=$RESOLVER build tasty-dejafu -- stack --resolver=$RESOLVER build dejafu-tests -- stack --resolver=$RESOLVER exec dejafu-tests +- echo '# build' && echo -en 'travis_fold:start:script.stack-build\\r' +- stack build concurrency +- stack build dejafu +- stack build hunit-dejafu +- stack build tasty-dejafu +- stack build dejafu-tests +- echo -en 'travis_fold:end:script.stack-build\\r' + +- echo '# weeder' && echo -en 'travis_fold:start:script.weeder\\r' +- curl -sL https://raw.github.com/ndmitchell/weeder/master/misc/travis.sh | sh -s . +- echo -en 'travis_fold:end:script.weeder\\r' + +- echo '# hlint' && echo -en 'travis_fold:start:script.hlint\\r' +- curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s concurrency +- curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s dejafu +- curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s hunit-dejafu +- curl -sL https://raw.github.com/ndmitchell/hlint/master/misc/travis.sh | sh -s tasty-dejafu +- echo -en 'travis_fold:end:script.hlint\\r' + +- echo '# test' && echo -en 'travis_fold:start:script.stack-exec\\r' +- stack exec dejafu-tests +- echo -en 'travis_fold:end:script.stack-exec\\r' diff --git a/.travis/lts-6.yaml b/.travis/lts-6.yaml new file mode 100644 index 0000000..9474990 --- /dev/null +++ b/.travis/lts-6.yaml @@ -0,0 +1,11 @@ +resolver: lts-6.35 + +packages: +- concurrency +- dejafu +- dejafu-tests +- hunit-dejafu +- tasty-dejafu + +extra-deps: +- leancheck-0.6.7 diff --git a/.weeder.yaml b/.weeder.yaml new file mode 100644 index 0000000..b519b6d --- /dev/null +++ b/.weeder.yaml @@ -0,0 +1,162 @@ +# It would be good to not need this +# https://github.com/ndmitchell/weeder/issues/24 + +- package: + - name: dejafu-tests + - section: + - name: exe:dejafu-tests + - message: + - name: Weeds exported + - module: + - name: Cases.Async + - identifier: + - ! '@?=' + - TestException + - TestFailed + - assertEqual + - assertFailure + - async_cancel + - async_exwait + - async_exwaitCatch + - async_poll + - async_poll2 + - async_wait + - async_waitCatch + - case_concurrently_ + - case_replicateConcurrently + - case_replicateConcurrently_ + - testCase + - threadDelay + - throwIO + - value + - withasync_wait2 + - withasync_waitCatch + - module: + - name: Cases.Discard + - identifier: nondet + - module: + - name: Cases.Litmus + - identifier: + - compareTest + - intelWP21 + - intelWP22 + - intelWP23 + - intelWP24 + - intelWP25 + - intelWP26 + - intelWP27 + - intelWP28 + - litmus2 + - litmusTest + - module: + - name: Cases.MultiThreaded + - identifier: + - crefTests + - exceptionTests + - mvarTests + - stmTests + - subconcurrencyTests + - threadingTests + - module: + - name: Cases.Refinement + - identifier: + - mvar + - mvarProps + - module: + - name: Cases.SingleThreaded + - identifier: + - capabilityTests + - crefTests + - exceptionTests + - mvarTests + - stmTests + - subconcurrencyTests + - module: + - name: Common + - identifier: + - BT + - failing + - module: + - name: Examples.AutoUpdate + - identifier: + - UpdateSettings + - catchSome + - deadlocks + - defaultUpdateSettings + - mkAutoUpdate + - nondeterministic + - updateAction + - updateFreq + - updateSpawnThreshold + - module: + - name: Examples.ClassLaws + - identifier: + - CST + - Concurrently + - concurrently + - concurrently' + - eq + - eq' + - eqf + - prop_alternative_assoc + - prop_alternative_left_id + - prop_alternative_right_id + - prop_applicative_comp + - prop_applicative_fmap + - prop_applicative_homo + - prop_applicative_id + - prop_applicative_inter + - prop_functor_comp + - prop_functor_id + - prop_monad_ap + - prop_monad_ap' + - prop_monad_assoc + - prop_monad_fmap + - prop_monad_left_id + - prop_monad_pure + - prop_monad_right_id + - race + - runConcurrently + - module: + - name: Examples.Logger + - identifier: + - LogCommand + - Logger + - Message + - Stop + - initLogger + - isBad + - isGood + - logMessage + - logStop + - logger + - raceyLogger + - validResult + - module: + - name: Examples.Philosophers + - identifier: + - philosophers + - way + - module: + - name: Examples.SearchParty + - identifier: + - ! '@!' + - Find + - allOf + - blockOn + - checkResultLists + - concFilter + - failure + - getState + - hasFailed + - invPred + - result + - success + - unFind + - unsafeResult + - unsafeRunFind + - work + - module: + - name: QSemN + - identifier: signal +