Skip to content

Commit

Permalink
Fix travis build.
Browse files Browse the repository at this point in the history
  • Loading branch information
valderman committed May 8, 2019
1 parent 4514ec0 commit 6a47903
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ install:
fi
- travis_retry cabal update -v
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
- cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v ./selda ./selda-sqlite ./selda-postgresql ./selda-tests > installplan.txt
- cp ./README.md ./selda/README.md
- make license
- make travis-pgconnectinfo
- cabal v2-run selda-changelog md
- cabal v2-install --only-dependencies --dry -v ./selda ./selda-sqlite ./selda-postgresql ./selda-json ./selda-tests > installplan.txt
- sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt

# check whether current requested install-plan matches cached package-db snapshot
Expand All @@ -59,7 +63,7 @@ install:
echo "cabal build-cache MISS";
rm -rf $HOME/.cabsnap;
mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
cabal install --only-dependencies --enable-tests --enable-benchmarks ./selda ./selda-sqlite ./selda-postgresql ./selda-tests;
cabal v2-install --only-dependencies ./selda ./selda-sqlite ./selda-postgresql ./selda-json ./selda-tests;
fi

# snapshot package-db on cache miss
Expand Down
23 changes: 13 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGES=selda selda-sqlite selda-postgresql selda-json
.PHONY: help build license deps travischeck haddock check test selda pgtest sqlite postgres repl upload-selda upload
.PHONY: help build license deps travischeck haddock check test selda pgtest sqlite postgres repl upload-selda upload travis-pgconnectinfo

help:
@echo "Available targets:"
Expand All @@ -19,13 +19,20 @@ help:

build: selda sqlite postgres json

travischeck:
travis-pgconnectinfo:
echo '{-# LANGUAGE OverloadedStrings #-}' > selda-tests/PGConnectInfo.hs
echo 'module PGConnectInfo where' >> selda-tests/PGConnectInfo.hs
echo 'import Database.Selda.PostgreSQL' >> selda-tests/PGConnectInfo.hs
echo 'pgConnectInfo = ("test" `on` "localhost"){pgUsername = Just "postgres"}' >> selda-tests/PGConnectInfo.hs

travischeck: travis-pgconnectinfo
make check

license:
for package in $(PACKAGES) ; do \
cp -f ./LICENSE ./$$package/LICENSE ; \
done

haddock:
cabal v2-haddock $(PACKAGES)

Expand All @@ -52,24 +59,20 @@ pgtest: selda postgres
cd ./selda-tests && cabal v2-configure --enable-tests -fpostgres
cd ./selda-tests && cabal v2-test

selda:
cp -f LICENSE ./selda/LICENSE
selda: license
cp -f README.md ./selda/README.md
cabal v2-build selda
make tags ; true

json:
cp -f LICENSE ./selda/LICENSE
json: license
cabal v2-build selda-json
make tags ; true

sqlite:
cp -f LICENSE ./selda-sqlite/LICENSE
sqlite: license
cabal v2-build selda-sqlite
make tags ; true

postgres:
cp -f LICENSE ./selda-postgresql/LICENSE
postgres: license
cabal v2-build selda-postgresql
make tags ; true

Expand Down
1 change: 0 additions & 1 deletion selda-json/selda-json.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ maintainer: [email protected]
-- copyright:
category: Database
build-type: Simple
extra-source-files: CHANGELOG.md

library
exposed-modules:
Expand Down

0 comments on commit 6a47903

Please sign in to comment.