From 5b291b961dcad04464109b639c3085ee11dfd811 Mon Sep 17 00:00:00 2001 From: scottomatic Date: Sun, 19 Nov 2023 07:50:07 -0700 Subject: [PATCH 1/8] ISSUE-79 migrate from travis to actions --- .github/workflows/ci_workflow.yml | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/ci_workflow.yml diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml new file mode 100644 index 0000000..77b55aa --- /dev/null +++ b/.github/workflows/ci_workflow.yml @@ -0,0 +1,63 @@ +name: Build and Test + +on: + push: + branches: + - master + - develop + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + os: [ubuntu-20.04] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Add OLA repository + run: sudo add-apt-repository -y ppa:voltvisionfrenchy/ola + + - 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 From cbe9084b7829e36c603676c422d69515c3de3551 Mon Sep 17 00:00:00 2001 From: scottomatic Date: Sun, 19 Nov 2023 08:01:57 -0700 Subject: [PATCH 2/8] ISSUE-79 remove travis --- .travis.yml | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 .travis.yml 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 ../.. From 86fa5891c31353dc06c131a6ccf8ad32c1489b89 Mon Sep 17 00:00:00 2001 From: scottomatic Date: Sun, 19 Nov 2023 08:08:17 -0700 Subject: [PATCH 3/8] ISSUE-79 build and test on new pull request targeting master or develop --- .github/workflows/ci_workflow.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index 77b55aa..1047495 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -5,6 +5,10 @@ on: branches: - master - develop + pull_request: + branches: + - master + - develop jobs: build: From 57d2e38f5a83b8d50788b2563a30c64926448eb4 Mon Sep 17 00:00:00 2001 From: scottomatic Date: Sun, 19 Nov 2023 08:11:49 -0700 Subject: [PATCH 4/8] ISSUE-79 ola ppa gone missing --- .github/workflows/ci_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index 1047495..349c60d 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -22,8 +22,8 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Add OLA repository - run: sudo add-apt-repository -y ppa:voltvisionfrenchy/ola + #- name: Add OLA repository + # run: sudo add-apt-repository -y ppa:voltvisionfrenchy/ola - name: Update and install dependencies run: | From 055bd54d1c52b2988d208a359895f5bade856a24 Mon Sep 17 00:00:00 2001 From: scottomatic Date: Sun, 19 Nov 2023 08:20:06 -0700 Subject: [PATCH 5/8] ISSUE-79 list files, looking for expected output --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 64e8401..9caa39f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,5 +26,6 @@ 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(list_all sh -xc "ls -alR" 2>&1) add_test(diff_output sh -xc "diff ../test/PCA9685_expected_output ./PCA9685_actual_output" 2>&1) From 5f155f8bd495046579d30b7424324b4ef590dbe2 Mon Sep 17 00:00:00 2001 From: scottomatic Date: Sun, 19 Nov 2023 08:25:11 -0700 Subject: [PATCH 6/8] ISSUE-79 update path to expected output --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9caa39f..39a9e38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,5 +27,5 @@ add_subdirectory(examples EXCLUDE_FROM_ALL) enable_testing() add_test(run_test sh -xc "./test/PCA9685test -td 1 40 > PCA9685_actual_output" 2>&1) add_test(list_all sh -xc "ls -alR" 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) From c106435721d283231c6ce355343d92e56c7785c9 Mon Sep 17 00:00:00 2001 From: scottomatic Date: Sun, 19 Nov 2023 08:28:56 -0700 Subject: [PATCH 7/8] ISSUE-79 remove commented ola repo --- .github/workflows/ci_workflow.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index 349c60d..dc626d7 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -22,9 +22,6 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - #- name: Add OLA repository - # run: sudo add-apt-repository -y ppa:voltvisionfrenchy/ola - - name: Update and install dependencies run: | sudo apt-get update From cdab1e73b4202445db20660b12d8e027980fae5b Mon Sep 17 00:00:00 2001 From: scottomatic Date: Sun, 19 Nov 2023 08:29:21 -0700 Subject: [PATCH 8/8] ISSUE-79 remove diagnostic ls --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39a9e38..26fe795 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +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(list_all sh -xc "ls -alR" 2>&1) add_test(diff_output sh -xc "diff ./test/PCA9685_expected_output ./PCA9685_actual_output" 2>&1)