File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ WORKDIR /home/pyth
14
14
15
15
COPY --chown=pyth:pyth ${GITHUB_WORKSPACE} pyth-client/
16
16
17
- RUN cd pyth-client && mkdir build && cd build && cmake .. && make && ctest
17
+ RUN cd pyth-client && ./scripts/ build.sh
18
18
19
19
RUN echo "\n export PATH=\$ PATH:\$ HOME/pyth-client/build" >> .profile
20
20
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -eu
4
+
5
+ if [[ $# -ge 1 ]]
6
+ then
7
+ BUILD_DIR=" $1 "
8
+ shift
9
+ else
10
+ THIS_DIR=" $( dirname " ${BASH_SOURCE[0]} " ) "
11
+ THIS_DIR=" $( cd " ${THIS_DIR} " && pwd ) "
12
+ ROOT_DIR=" $( dirname " ${THIS_DIR} " ) "
13
+ BUILD_DIR=" ${ROOT_DIR} /build"
14
+ fi
15
+
16
+ ROOT_DIR=" $( mkdir -p " ${BUILD_DIR} " && cd " ${BUILD_DIR} /.." && pwd ) "
17
+ BUILD_DIR=" $( realpath --relative-to=" ${ROOT_DIR} " " ${BUILD_DIR} " ) "
18
+
19
+ if [[ ! -v CMAKE_ARGS && $BUILD_DIR == * debug* ]]
20
+ then
21
+ CMAKE_ARGS=( " -DCMAKE_BUILD_TYPE=Debug" )
22
+ fi
23
+
24
+ set -x
25
+
26
+ cd " ${ROOT_DIR} "
27
+ rm -rf " ${BUILD_DIR} "
28
+ mkdir " ${BUILD_DIR} "
29
+
30
+ cd " ${BUILD_DIR} "
31
+ cmake ${CMAKE_ARGS[@]+" ${CMAKE_ARGS[@]} " } ..
32
+ make " $@ "
33
+ ctest
You can’t perform that action at this time.
0 commit comments