-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build bdcs-cli and run tests inside Docker
- Loading branch information
Showing
9 changed files
with
103 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*.sql | ||
*.tix | ||
*.db | ||
*.repo/ | ||
cabal.sandbox.config | ||
.cabal-sandbox/ | ||
.git/ | ||
dist/ | ||
import | ||
export | ||
bdcs-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ dist | |
export | ||
import | ||
*.tar | ||
*.repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM fedora:26 | ||
|
||
COPY bdcs-deps.dnf /etc/yum.repos.d/bdcs-deps.repo | ||
RUN dnf -y install sudo cabal-install python-toml python-nose-parameterized \ | ||
gobject-introspection-devel ghc-*weldr* \ | ||
ghc-haskell-gi{,-devel}-0.20.3-1.fc26.weldr.1 \ | ||
libgit2-glib{,-devel}-0.26.0-2.fc26.weldr.1 hlint | ||
|
||
RUN mkdir /bdcs-cli | ||
WORKDIR /bdcs-cli | ||
|
||
# install the build dependencies first so we can cache this layer | ||
COPY BDCSCli.cabal . | ||
RUN cabal update | ||
RUN for i in `cabal install --dependencies-only --enable-tests --enable-coverage --dry-run | \ | ||
grep - | grep -v "In order" | grep -v basement | grep -v overloading | \ | ||
sed -r 's|-[0-9]+(\.[0-9]+)*||'`; do \ | ||
echo ghc-$i ghc-$i-devel; done | xargs dnf -y install && dnf clean all | ||
|
||
# copy the rest of the code | ||
COPY . /bdcs-cli | ||
|
||
# build the application | ||
RUN hlint . | ||
RUN cabal configure --enable-tests --enable-coverage --ghc-option=-DTEST && \ | ||
cabal build && \ | ||
cabal test --show-details=always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM welder/bdcs-cli:latest | ||
|
||
# tests for bdcs-cli binary | ||
RUN ./tests/test_binary.sh | ||
|
||
# depsolve integration tests | ||
ENV START_API_EXTERNALLY 1 | ||
RUN ./tests/test_depsolve.sh | ||
|
||
# collect binary coverage | ||
RUN mkdir ./dist/hpc/vanilla/tix/bdcs-cli/ && mv bdcs-cli.tix ./dist/hpc/vanilla/tix/bdcs-cli/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[bdcs-deps] | ||
name = BDCS Deps | ||
baseurl = https://s3.amazonaws.com/weldr/bdcs-deps/ | ||
enabled = 1 | ||
gpgcheck = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters