File tree Expand file tree Collapse file tree 4 files changed +35
-19
lines changed Expand file tree Collapse file tree 4 files changed +35
-19
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,7 @@ compiler: gcc
4
4
5
5
script :
6
6
- docker-compose build $TEST_ENV
7
- - docker run --rm -ti scala-native-bindgen:$TEST_ENV /usr/include/ctype.h -name ctype --
8
- - docker-compose run --rm sbt-test
7
+ - docker-compose run $TEST_ENV
9
8
10
9
matrix :
11
10
include :
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ RUN set -x \
11
11
&& rm -rf /var/lib/apt/lists/*
12
12
13
13
ARG LLVM_VERSION=6.0
14
+ ENV LLVM_VERSION=$LLVM_VERSION
14
15
# LLVM dev versions do not have a "-x.y" version suffix.
15
16
ARG LLVM_DEB_COMPONENT=-$LLVM_VERSION
16
17
RUN set -x \
@@ -21,8 +22,4 @@ RUN set -x \
21
22
&& apt install -y clang-$LLVM_VERSION libclang-$LLVM_VERSION-dev \
22
23
&& rm -rf /var/lib/apt/lists/*
23
24
24
- WORKDIR /src/target
25
- COPY . /src
26
- RUN cmake .. && make VERBOSE=1
27
-
28
- ENTRYPOINT ["/src/target/scalaBindgen" ]
25
+ WORKDIR /src
Original file line number Diff line number Diff line change @@ -2,38 +2,41 @@ version: '3'
2
2
3
3
services :
4
4
ubuntu-18.04-llvm-dev :
5
- image : scala-native-bindgen:ubuntu-18.04-llvm-dev
5
+ image : scalabindgen/ scala-native-bindgen:ubuntu-18.04-llvm-dev
6
6
build :
7
7
context : .
8
8
args :
9
9
- UBUNTU_VERSION=18.04
10
10
- LLVM_VERSION=7
11
11
- LLVM_DEB_COMPONENT=
12
+ command : scripts/test.sh
13
+ volumes :
14
+ - .:/src
15
+ - ${HOME}/.ivy2:/root/.ivy2
16
+ - ${HOME}/.sbt:/root/.sbt
12
17
13
18
ubuntu-18.04-llvm-6.0 :
14
- image : scala-native-bindgen:ubuntu-18.04-llvm-6.0
19
+ image : scalabindgen/ scala-native-bindgen:ubuntu-18.04-llvm-6.0
15
20
build :
16
21
context : .
17
22
args :
18
23
- UBUNTU_VERSION=18.04
19
24
- LLVM_VERSION=6.0
25
+ command : scripts/test.sh
26
+ volumes :
27
+ - .:/src
28
+ - ${HOME}/.ivy2:/root/.ivy2
29
+ - ${HOME}/.sbt:/root/.sbt
20
30
21
31
ubuntu-18.04-llvm-5.0 :
22
- image : scala-native-bindgen:ubuntu-18.04-llvm-5.0
32
+ image : scalabindgen/ scala-native-bindgen:ubuntu-18.04-llvm-5.0
23
33
build :
24
34
context : .
25
35
args :
26
36
- UBUNTU_VERSION=18.04
27
37
- LLVM_VERSION=5.0
28
-
29
- sbt-test :
30
- image : scala-native-bindgen:${TEST_ENV}
31
- entrypoint :
32
- - sh
33
- - -c
34
- - |
35
- cd /src/tests
36
- sbt compile test
38
+ command : scripts/test.sh
37
39
volumes :
40
+ - .:/src
38
41
- ${HOME}/.ivy2:/root/.ivy2
39
42
- ${HOME}/.sbt:/root/.sbt
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Bash strict mode
4
+ # http://redsymbol.net/articles/unofficial-bash-strict-mode/
5
+ set -euo pipefail
6
+ IFS=$' \n\t '
7
+
8
+ if [[ ! -e target/.llvm-version ]] || [[ " $( < target/.llvm-version) " != " ${LLVM_VERSION:- } " ]]; then
9
+ rm -rf target
10
+ mkdir -p target
11
+ echo " ${LLVM_VERSION:- } " > target/.llvm-version
12
+ (cd target && cmake ..)
13
+ make -C target
14
+ fi
15
+
16
+ cd tests
17
+ sbt " ${@:- test} "
You can’t perform that action at this time.
0 commit comments