diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b1fa59..543628e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: docker: # specify the version you desire here # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` - - image: circleci/python:2.7-browsers + - image: circleci/buildpack-deps:18.04-scm-browsers # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images @@ -20,6 +20,18 @@ jobs: steps: - checkout + - run: + name: Install BlueZ + command: sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get -yq upgrade && sudo apt-get -y install bluez python-setuptools python-pip python-dev dbus python-dbus python-dbus-dev + + - run: + name: Install BluefruitLE + command: git clone git@github.com:adafruit/Adafruit_Python_BluefruitLE.git && cd Adafruit_Python_BluefruitLE && sudo python setup.py install && cd .. + - run: name: Install ZorbPy command: cd ~/repo && pip install --user . + + - run: + name: Test ZorbPy Import + command: cd ~/repo && python test.py diff --git a/.circleci/install_bluez.sh b/.circleci/install_bluez.sh new file mode 100755 index 0000000..8901b3d --- /dev/null +++ b/.circleci/install_bluez.sh @@ -0,0 +1,13 @@ +#!/bin/sh -e + +sudo apt-get update +sudo apt-get -y install libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev +wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.33.tar.gz +tar xvfz bluez-5.33.tar.gz +cd bluez-5.33 +./configure --disable-systemd +make +sudo make install +sudo cp ./src/bluetoothd /usr/local/bin/ + +/usr/local/bin/bluetoothd --experimental & diff --git a/test.py b/test.py new file mode 100644 index 0000000..4a592f9 --- /dev/null +++ b/test.py @@ -0,0 +1,12 @@ +import zorb + +def mainloop(): + pass + + +def main(): + zorb.run(mainloop) + + +if __name__ == '__main__': + main()