Skip to content

Commit

Permalink
Merge pull request electro-smith#107 from electro-smith/ci/migrate_to…
Browse files Browse the repository at this point in the history
…_gha

Migrate CI to Github Actions
  • Loading branch information
stephenhensley authored Jan 11, 2021
2 parents 3981636 + 329a723 commit d135117
Show file tree
Hide file tree
Showing 18 changed files with 221 additions and 190 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Action Workflows

Github actions for CI/CD

## Build

Builds libdaisy validating the source code builds with no errors.

## Style

Runs a style check using clang-format to make sure that all files within the src/ hierarchy conform to the proper style.

This can be tested locally by running:

```bash
./ci/run-clang-format.py -r src
```

## Build Docs

This runs steps to generate the documentation to confirm there are no errors.

This runs on PRs and merges to master.

Worth mentioning that this **does not fail on warnings** and is mostly provided to give useful feedback to see what doesn't have documentation.

## Deploy Docs

This runs the same build step as [Build Docs](#build-docs)

This is only run when something is pushed to master, rebuilds the docuemntation using Doxygen, and deploys it to the gh-pages branch.

This does not build and push the pdf yet...

View the documentation [here](https://electro-smith.github.io/libDaisy/index.html)
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: arm-none-eabi-gcc
uses: fiam/arm-none-eabi-gcc@v1
with:
release: '9-2019-q4'
- name: Build Library
run: make -j
13 changes: 13 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Build Documentation

on:
push:
branches: [ master ]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Documentation
uses: mattnotmitt/doxygen-action@v1.2.1
36 changes: 36 additions & 0 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Documentation

on:
push:
branches: [ master ]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Documentation
uses: mattnotmitt/doxygen-action@v1.2.1
- name: Deploy Web
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/html
# Build PDF currently doesn't work. So no need for Latex
# with:
# enable-latex: true
# - name: Build PDF
# run: |
# cwd=$(pwd)
# cd ./doc/latex
# make pdf > /dev/null
# cd $cwd
# mv doc/latex/refman.pdf doc/libdaisy_reference.pdf
# Since BulidPDF doesn't work yet, no need to try to add/commit/push
# - name: Deploy PDF
# uses: EndBug/add-and-commit@v6
# with:
# add: 'doc/libdaisy_reference.pdf'
# message: 'automated: updated PDF documentation'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Style

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.11
with:
source: 'modules'
extensions: 'h,cpp'
clangFormatVersion: 10

79 changes: 0 additions & 79 deletions .travis.yml

This file was deleted.

13 changes: 0 additions & 13 deletions ci/travis_setup_gcc_arm.sh

This file was deleted.

12 changes: 6 additions & 6 deletions modules/compressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Compressor
void Init(float sample_rate);

/** Compress the audio input signal, saves the calculated gain
\param in audio input signal
\param in audio input signal
*/
float Process(float in);

Expand All @@ -49,7 +49,7 @@ class Compressor
}

/** Apply compression to the audio signal, based on the previously calculated gain
\param in audio input signal
\param in audio input signal
*/
float Apply(float in) { return gain_ * in; }

Expand All @@ -64,10 +64,10 @@ class Compressor
}

/** Compresses a block of audio, keyed by a secondary input
\param in audio input signal (to be compressed)
\param out audio output signal
\param key audio input that will be used to side-chain the compressor
\param size the size of the block
\param in audio input signal (to be compressed)
\param out audio output signal
\param key audio input that will be used to side-chain the compressor
\param size the size of the block
*/
void ProcessBlock(float *in, float *out, float *key, size_t size);

Expand Down
16 changes: 9 additions & 7 deletions modules/dsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,19 @@ inline float NextBlepSample(float t)

/** From plaits oscillator.h
*/
inline float NextIntegratedBlepSample(float t) {
const float t1 = 0.5f * t;
const float t2 = t1 * t1;
const float t4 = t2 * t2;
return 0.1875f - t1 + 1.5f * t2 - t4;
inline float NextIntegratedBlepSample(float t)
{
const float t1 = 0.5f * t;
const float t2 = t1 * t1;
const float t4 = t2 * t2;
return 0.1875f - t1 + 1.5f * t2 - t4;
}

/** From plaits oscillator.h
*/
inline float ThisIntegratedBlepSample(float t) {
return NextIntegratedBlepSample(1.0f - t);
inline float ThisIntegratedBlepSample(float t)
{
return NextIntegratedBlepSample(1.0f - t);
}

/** Based on soft saturate from:
Expand Down
2 changes: 1 addition & 1 deletion modules/formantosc.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace daisysp
{
/**
Formant Oscillator Module \n
Sinewave with aliasing-free phase reset. \n
Sinewave with aliasing-free phase reset. \n
Ported by Ben Sergentanis, Dec 2020
@author Emilie Gillet
@date 2016
Expand Down
24 changes: 12 additions & 12 deletions modules/grainlet.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace daisysp
{
/**
Granular Oscillator Module \n
A phase-distorted single cycle sine * another continuously running sine, \n
the whole thing synced to a main oscillator. \n
A phase-distorted single cycle sine * another continuously running sine, \n
the whole thing synced to a main oscillator. \n
Ported by Ben Sergentanis, Dec 2020
@author Emilie Gillet
@date 2016
Expand All @@ -24,31 +24,31 @@ class GrainletOscillator
~GrainletOscillator() {}

/** Initialize the oscillator
\param sample_rate Sample rate of audio engine
*/
\param sample_rate Sample rate of audio engine
*/
void Init(float sample_rate);

/** Get the next sample */
float Process();

/** Sets the carrier frequency
\param freq Frequency in Hz
*/
\param freq Frequency in Hz
*/
void SetFreq(float freq);

/** Sets the formant frequency
\param freq Frequency in Hz
*/
\param freq Frequency in Hz
*/
void SetFormantFreq(float freq);

/** Waveshaping
\param shape Shapes differently from 0-1, 1-2, and > 2.
*/
\param shape Shapes differently from 0-1, 1-2, and > 2.
*/
void SetShape(float shape);

/** Sets the amount of formant to bleed through
\param bleed Works best 0-1
*/
\param bleed Works best 0-1
*/
void SetBleed(float bleed);

private:
Expand Down
Loading

0 comments on commit d135117

Please sign in to comment.