Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Travis CI config #2

Merged
merged 1 commit into from
Apr 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
language: cpp

env: CXX_STANDARD=c++11

# Enable install caching to reduce install time in next builds
cache: ccache

compiler: g++

sudo: required

before_install:
- cd ../
- sudo mv gr-lora ../
- cd ../

# Add repos for more up-to-date versions of g++ and libboost
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo add-apt-repository -y ppa:boost-latest/ppa
- sudo apt-get update -qq

install:
- sudo apt-get install -qq g++-4.8
- export CXX="g++-4.8"
- export CC="gcc-4.8"
# Report correct versions are installed
# - uname -a
# - $CXX --version
# - $CC --version

- sudo pip install scipy
- sudo apt-get install swig
- sudo apt-get install libcppunit-dev
- sudo apt-get install fftw3 fftw-dev

- sudo apt-get install libboost1.55-all-dev
- sudo ldconfig
# This installs and old version, and is therefore deprecated
# - sudo apt-get install gnuradio
# - sudo ldconfig

# Manual VOLK install
# - git clone https://github.com/gnuradio/volk.git
# - cd volk/
# - git checkout v1.3
# - mkdir build && cd build
# - cmake ../
# - make && sudo make install
# - sudo ldconfig
# - cd ../../

# Manual GNURadio install
- git clone https://github.com/gnuradio/gnuradio.git
- cd gnuradio
- git pull --recurse-submodules=on
- git submodule foreach git pull origin master
- git submodule update --init --recursive
- mkdir build && cd build
- cmake -DENABLE_INTERNAL_VOLK=ON ../
- make && sudo make install
- sudo ldconfig
- cd ../../

# Manual liquidDSP install
- git clone https://github.com/jgaeddert/liquid-dsp.git
- cd liquid-dsp/
- sudo sh ./bootstrap.sh
- sh ./configure
- make && sudo make install
- sudo ldconfig
- cd ../

before_script:
- cd gr-lora
- mkdir build && cd build
- cmake ../

script:
- make
- sudo make install
# - make test # Will fail

notifications:
email: false
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
#http://gcc.gnu.org/wiki/Visibility
add_definitions(-fvisibility=hidden)
add_definitions(-std=c++11)
endif()

########################################################################
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gr-lora
gr-lora [![Build status](https://api.travis-ci.org/Wosser1sProductions/gr-lora.svg)](https://travis-ci.org/Wosser1sProductions/gr-lora)
=======

The gr-lora project aims to provide a collection of GNURadio blocks for receiving LoRa modulated radio messages using Software Defined Radio (SDR). More information about LoRa itself can be found on [the website of the LoRa Alliance](https://www.lora-alliance.org/).
Expand Down
3 changes: 2 additions & 1 deletion lib/decoder_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,8 @@ namespace gr {
this->d_payload_symbols -= (4u + this->d_cr);

if (this->d_payload_symbols <= 0) {
uint8_t decoded[this->d_payload_length] = { 0u };
uint8_t decoded[this->d_payload_length];
memset( decoded, 0u, this->d_payload_length * sizeof(uint8_t) );

this->decode(decoded, false);

Expand Down