Skip to content

Commit

Permalink
Appveyor CI for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hbe72 authored May 17, 2018
1 parent 44e2867 commit c590b7f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 9 deletions.
25 changes: 25 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 0.1.{build}
image: Visual Studio 2017

environment:
fast_finish: true # set this flag to immediately finish build once one of the jobs fails.
matrix:
- platform: x64
configuration: Release
cmake_generator: "Visual Studio 15 2017 Win64"
msbuild_property: x64
- platform: x64
configuration: Debug
cmake_generator: "Visual Studio 15 2017 Win64"
msbuild_property: x64

build_script:
- cmd: >-
cmake -DCMAKE_BUILD_TYPE=%configuration% -G "%cmake_generator%" .
cmake --build . --target test/Tests -- /property:Configuration=%configuration% /property:Platform=%msbuild_property%
test_script:
- cmd: >-
ctest
shallow_clone: true
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ matrix:
#OSX C++17
- os: osx
osx_image: xcode8
env: MATRIX_EVAL="brew update && brew install gcc@7 && CC=gcc-7 && CXX=g++-7" BUILD_TYPE=Release STD=17 EXCEPTIONS=OFF INT128=ON
env: MATRIX_EVAL="brew update && brew install gcc@6 && CC=gcc-6 && CXX=g++-6" BUILD_TYPE=Release STD=17 EXCEPTIONS=OFF INT128=ON

- os: osx
osx_image: xcode8
env: MATRIX_EVAL="brew update && brew install gcc@7 && CC=gcc-7 && CXX=g++-7" BUILD_TYPE=Release STD=17 EXCEPTIONS=OFF INT128=OFF
env: MATRIX_EVAL="brew update && brew install gcc@6 && CC=gcc-6 && CXX=g++-6" BUILD_TYPE=Release STD=17 EXCEPTIONS=OFF INT128=OFF

before_install:
- eval "${MATRIX_EVAL}"
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CDSP - Compositional DSP Library for C++
Build status for Linux and Mac:
[![Build Status](https://travis-ci.org/hbe72/cdsp.svg?branch=develop)](https://travis-ci.org/hbe72/cdsp)
| develop @ Travis-CI <br/> (macOS & Linux)| develop @ Appveyor <br/> (Windows) |
| ------------- | ------------- |
| [![Build Status](https://travis-ci.org/hbe72/cdsp.svg?branch=develop)](https://travis-ci.org/hbe72/cdsp) | [![Build status](https://ci.appveyor.com/api/projects/status/1q4y3h8vy8t1kn5e/branch/develop?svg=true)](https://ci.appveyor.com/project/hbe72/cdsp/branch/develop)|

CDSP is a header only DSP library written with [CNL](https://github.com/johnmcfarlane/cnl)
aiming for floating point and fixed-point implementation of typical DSP kernels.
Expand Down
6 changes: 3 additions & 3 deletions include/dsp/fft.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,14 @@ static void real_fft_postprocess(complex_vector<T>& out)
unsigned int N = static_cast<unsigned int>(out.size());
unsigned int S = static_cast<unsigned int>(std::log2(N));
cdsp::trig<T>& exp = cdsp::trig<T>::instance();
unsigned int stride = exp.get_twopi_index() >> (S + 1);
std::size_t stride = (exp.get_twopi_index()) >> (S + 1);

// out[N] equals to out[0], so, let's add it
out.push_back(out[0]);

// Process the first and last index
unsigned int k = 0;
unsigned int r = N;
std::size_t k = 0;
std::size_t r = N;
complex<T> xPlus(cdsp::math::arithmetic_right_shift(out[k].real() + out[r].real(), 1),
cdsp::math::arithmetic_right_shift(out[k].imag() + out[r].imag(), 1));
complex<T> xMinus(cdsp::math::arithmetic_right_shift(out[k].real() - out[r].real(), 1),
Expand Down
4 changes: 2 additions & 2 deletions include/dsp/stft.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ template<class T>
void stft<T>::set_hann_window()
{
cdsp::trig<T>& trig = cdsp::trig<T>::instance();
unsigned int twoPI = trig.get_twopi_index();
unsigned int stride = (twoPI >> 1) / m_fftSize;
std::size_t twoPI = trig.get_twopi_index();
std::size_t stride = (twoPI >> 1) / m_fftSize;
assert(stride > 0);
for (unsigned int i = 0; i < m_fftSize; ++i)
{
Expand Down

0 comments on commit c590b7f

Please sign in to comment.