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