add: testing stuff for drone
This commit is contained in:
parent
8d0451a9b3
commit
ddf5afb167
2 changed files with 31 additions and 22 deletions
|
@ -2,6 +2,11 @@ kind: pipeline
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: download
|
||||||
|
image: plugins/download
|
||||||
|
settings:
|
||||||
|
source: http://vmi366681.contaboserver.net:6423/archive/emgauwa-controller-testing/6/controller
|
||||||
|
destination: /drone/controller
|
||||||
- name: test
|
- name: test
|
||||||
image: serguzim/emgauwa-builder
|
image: serguzim/emgauwa-builder
|
||||||
pull: always
|
pull: always
|
||||||
|
@ -9,6 +14,7 @@ steps:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake ..
|
- cmake ..
|
||||||
|
- export EMGAUWA_CONTROLLER_EXE=/drone/controller
|
||||||
- make test
|
- make test
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
|
|
@ -15,8 +15,10 @@ cd $working_dir
|
||||||
|
|
||||||
target_branch=$(git rev-parse --abbrev-ref HEAD)
|
target_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
|
|
||||||
|
if [ -z "$EMGAUWA_CONTROLLER_EXE" ]
|
||||||
|
then
|
||||||
git clone --quiet ssh://git@git.serguzim.me:3022/emgauwa/controller.git controller || exit
|
git clone --quiet ssh://git@git.serguzim.me:3022/emgauwa/controller.git controller || exit
|
||||||
pushd ./controller > /dev/null
|
cd ./controller
|
||||||
|
|
||||||
git checkout dev >/dev/null 2>&1
|
git checkout dev >/dev/null 2>&1
|
||||||
git checkout $target_branch >/dev/null 2>&1
|
git checkout $target_branch >/dev/null 2>&1
|
||||||
|
@ -27,13 +29,14 @@ mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
cmake -DWIRING_PI_DEBUG=on .. >/dev/null
|
cmake -DWIRING_PI_DEBUG=on .. >/dev/null
|
||||||
cp $source_dir/controller.testing.ini ./controller.ini
|
|
||||||
make >/dev/null
|
make >/dev/null
|
||||||
|
EMGAUWA_CONTROLLER_EXE=./controller
|
||||||
|
fi
|
||||||
|
|
||||||
./controller start >$working_dir/controller.log 2>&1 &
|
$EMGAUWA_CONTROLLER_EXE start -c $source_dir/controller.testing.ini >$working_dir/controller.log 2>&1 &
|
||||||
controller_id=$!
|
controller_id=$!
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
|
cd $working_dir
|
||||||
|
|
||||||
cp $1 $working_dir/core
|
cp $1 $working_dir/core
|
||||||
cp $source_dir/core.testing.ini $working_dir/core.ini
|
cp $source_dir/core.testing.ini $working_dir/core.ini
|
||||||
|
|
Loading…
Reference in a new issue