From 4895d0d924055ee51c419bab028b0a2bb72fcb27 Mon Sep 17 00:00:00 2001 From: Scott Edlin Date: Sun, 19 Nov 2023 08:32:33 -0700 Subject: [PATCH] Issue 79 (#80) * ISSUE-79 migrate from travis to actions * ISSUE-79 remove travis * ISSUE-79 build and test on new pull request targeting master or develop * ISSUE-79 ola ppa gone missing * ISSUE-79 list files, looking for expected output * ISSUE-79 update path to expected output * ISSUE-79 remove commented ola repo * ISSUE-79 remove diagnostic ls --------- Co-authored-by: scottomatic --- .github/workflows/ci_workflow.yml | 64 +++++++++++++++++++++++++++++++ .travis.yml | 42 -------------------- CMakeLists.txt | 2 +- 3 files changed, 65 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/ci_workflow.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml new file mode 100644 index 0000000..dc626d7 --- /dev/null +++ b/.github/workflows/ci_workflow.yml @@ -0,0 +1,64 @@ +name: Build and Test + +on: + push: + branches: + - master + - develop + pull_request: + branches: + - master + - develop + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + os: [ubuntu-20.04] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Update and install dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends libola-dev --allow-unauthenticated + sudo apt-get install -y --no-install-recommends libncurses5-dev + sudo apt-get install -y --no-install-recommends libasound2-dev + sudo apt-get install -y --no-install-recommends libfftw3-dev + sudo apt-get install -y --no-install-recommends systemd + + - name: Create build directory + run: mkdir build + + - name: Configure with CMake + run: cmake . + + - name: Build + run: make + + - name: Install + run: sudo make install + + - name: Build and run PCA9685test + run: make PCA9685test && ctest -V + + - name: Build examples + run: make examples + + - name: Install and verify examples/olaclient + run: | + cd examples/olaclient + sudo make install + cat /var/log/olaclient.log + cd ../.. + + - name: Install and verify examples/audio + run: | + cd examples/audio + sudo make install + cat /var/log/vupeak.log + cd ../.. \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 077adb1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -language: c -sudo: required -branches: - only: - - "master" - - "develop" - -before_install: - - sudo add-apt-repository -y ppa:voltvisionfrenchy/ola - - sudo apt-get update - - sudo apt-get install -y --no-install-recommends libola-dev --allow-unauthenticated - - sudo apt-get install -y --no-install-recommends libncurses5-dev - - sudo apt-get install -y --no-install-recommends libasound2-dev - - sudo apt-get install -y --no-install-recommends libfftw3-dev - - sudo apt-get install -y --no-install-recommends systemd - -before_script: - - mkdir build - - cd build - - cmake .. - -script: - - make - - sudo make install - - - make PCA9685test - - ctest -V - -# make the examples - - make examples - -# install and verify examples/olaclient - - cd examples/olaclient - - sudo make install - - cat /var/log/olaclient.log - - cd ../.. - -# install and verify examples/audio - - cd examples/audio - - sudo make install - - cat /var/log/vupeak.log - - cd ../.. diff --git a/CMakeLists.txt b/CMakeLists.txt index 64e8401..26fe795 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,5 +26,5 @@ add_subdirectory(examples EXCLUDE_FROM_ALL) # add tests enable_testing() add_test(run_test sh -xc "./test/PCA9685test -td 1 40 > PCA9685_actual_output" 2>&1) -add_test(diff_output sh -xc "diff ../test/PCA9685_expected_output ./PCA9685_actual_output" 2>&1) +add_test(diff_output sh -xc "diff ./test/PCA9685_expected_output ./PCA9685_actual_output" 2>&1)