File tree Expand file tree Collapse file tree 6 files changed +40
-20
lines changed Expand file tree Collapse file tree 6 files changed +40
-20
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ BUILDAH_PUSH ?= 0
19
19
KIND_CLUSTER_NAME := wire-server
20
20
BUILDAH_KIND_LOAD ?= 1
21
21
22
+ package ?= all
22
23
EXE_SCHEMA := ./dist/$(package ) -schema
23
24
24
25
# This ensures that focused unit tests written in hspec fail. This is supposed
@@ -44,7 +45,7 @@ install: init
44
45
ifeq ($(WIRE_BUILD_WITH_CABAL ) , 1)
45
46
cabal build all
46
47
./hack/bin/cabal-run-all-tests.sh
47
- ./hack/bin/cabal-install-all- artefacts.sh
48
+ ./hack/bin/cabal-install-artefacts.sh all
48
49
else
49
50
stack install --pedantic --test --bench --no-run-benchmarks --local-bin-path=dist
50
51
endif
71
72
# Usage: make ci package=brig test=1
72
73
.PHONY : ci
73
74
ci : c
74
- ifeq ("$(pattern ) ", "")
75
- make -C services/$(package) i
76
- else
77
- make -C services/$(package) i-$(pattern)
78
- endif
75
+ ./hack/bin/cabal-run-integration.sh $(package ) $(pattern )
79
76
80
77
# reset db using cabal
81
78
.PHONY : db-reset-package
Original file line number Diff line number Diff line change
1
+ Improve cabal make targets: faster installation and better support for building and testing all packages
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -6,4 +6,13 @@ TOP_LEVEL="$(cd "$DIR/../.." && pwd)"
6
6
7
7
DIST=" $TOP_LEVEL /dist"
8
8
9
- cabal-plan list-bins " $1 " ' :exe:*' | awk ' {print $2}' | xargs -I ' {}' rsync -a {} " $DIST "
9
+ if [[ " $1 " == " all" ]]; then
10
+ pattern=' *'
11
+ else
12
+ pattern=" $1 "
13
+ fi
14
+
15
+ cabal-plan list-bins " $pattern :exe:*" |
16
+ awk ' {print $2}' |
17
+ xargs -i sh -c ' test -f {} && echo {} || true' |
18
+ xargs -P8 -i rsync -a {} " $DIST "
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
5
+ TOP_LEVEL=" $( cd " $DIR /../.." && pwd) "
6
+
7
+ package=${1:- all}
8
+ pattern=${2:- }
9
+
10
+ opts=" "
11
+
12
+ if [[ " $package " != " all" ]]; then
13
+ opts=" $opts -C services/$package "
14
+ fi
15
+
16
+ if [[ -n " $pattern " ]]; then
17
+ if [[ " $package " == " all" ]]; then
18
+ echo -e " \e[31mGlobal pattern not supported\e[0m" >&2
19
+ exit 1
20
+ fi
21
+ opts=" $opts i-$pattern "
22
+ else
23
+ opts=" $opts i"
24
+ fi
25
+
26
+ exec make $opts
Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ copyright: (c) 2017 Wire Swiss GmbH
16
16
license : AGPL-3
17
17
license-file : LICENSE
18
18
build-type : Custom
19
- data-files :
20
- docs/swagger.md
21
19
22
20
custom-setup
23
21
setup-depends :
You can’t perform that action at this time.
0 commit comments