From c04e12dd77eeeae961b4ce9207fd95354113cfd0 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 7 Dec 2022 20:04:52 +0000 Subject: [PATCH 01/20] Try and compile on Mac via GitHub Actions --- .github/workflows/compilation.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/compilation.yml diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml new file mode 100644 index 0000000000..e3b5e8aadf --- /dev/null +++ b/.github/workflows/compilation.yml @@ -0,0 +1,33 @@ +# GitHub Action to compile and test +name: compilation +on: [push, pull_request] +jobs: + compile: + strategy: + matrix: + os: [macos-12] + steps: + - uses: actions/checkout@master + - name: Install dependencies + run: | + brew update + brew install ccache + # This is all the bits we need to enable all options on Mac + brew install bison + brew install flex + # Installing via the addon isn't currently working so do it the old fashioned way below + # - https://raw.githubusercontent.com/Homebrew/homebrew-core/024ca9a4730a1f26ceede43485fbf62ef6f41179%5E/Formula/protobuf@3.1.rb + brew install liblo + brew install libmicrohttpd + brew install ossp-uuid + # Looks like this is Python 3 only, so install via pip + # brew install numpy + brew install libusb + brew install protobuf + brew install cppunit + - run: codespell --help + - name: Compile + env: + TASK: 'compile' + run: | + bash -ex .travis-ci.sh From 34d8a22b5c1f540c46ec6fd08725a5949b35ac3b Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 7 Dec 2022 20:06:35 +0000 Subject: [PATCH 02/20] Fix the Workflow syntax --- .github/workflows/compilation.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index e3b5e8aadf..56638b839e 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -3,9 +3,7 @@ name: compilation on: [push, pull_request] jobs: compile: - strategy: - matrix: - os: [macos-12] + runs-on: macos-12 steps: - uses: actions/checkout@master - name: Install dependencies From eb18c140489b7b11f0696ba2a929437c01858344 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 7 Dec 2022 20:12:59 +0000 Subject: [PATCH 03/20] Remove accidental copy and paste --- .github/workflows/compilation.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 56638b839e..84861c410a 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -23,7 +23,6 @@ jobs: brew install libusb brew install protobuf brew install cppunit - - run: codespell --help - name: Compile env: TASK: 'compile' From 699306a130ce226306a9f3f763763fc6f2660b00 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 7 Dec 2022 20:19:31 +0000 Subject: [PATCH 04/20] Comment out the fold temporarily --- .travis-ci.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis-ci.sh b/.travis-ci.sh index fc9bd59e79..c0dfc28045 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -238,22 +238,22 @@ else else export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-ja-rule --enable-e133' fi - travis_fold start "autoreconf" + #travis_fold start "autoreconf" autoreconf -i; - travis_fold end "autoreconf" - travis_fold start "configure" + #travis_fold end "autoreconf" + #travis_fold start "configure" ./configure $DISTCHECK_CONFIGURE_FLAGS; - travis_fold end "configure" - travis_fold start "make_distcheck" + #travis_fold end "configure" + #travis_fold start "make_distcheck" make distcheck VERBOSE=1; - travis_fold end "make_distcheck" - travis_fold start "make_dist" + #travis_fold end "make_distcheck" + #travis_fold start "make_dist" make dist; - travis_fold end "make_dist" - travis_fold start "verify_trees" + #travis_fold end "make_dist" + #travis_fold start "verify_trees" tarball=$(ls -Ut ola*.tar.gz | head -1) tar -zxf $tarball; tarball_root=$(echo $tarball | sed 's/.tar.gz$//') ./scripts/verify_trees.py ./ $tarball_root - travis_fold end "verify_trees" + #travis_fold end "verify_trees" fi From df2915ab6ccf4e4714bef2a3bd60786205c18ee2 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 7 Dec 2022 23:20:28 +0000 Subject: [PATCH 05/20] Add more missing packages --- .github/workflows/compilation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 84861c410a..4d7d1c9aec 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -11,6 +11,7 @@ jobs: brew update brew install ccache # This is all the bits we need to enable all options on Mac + brew install automake brew install bison brew install flex # Installing via the addon isn't currently working so do it the old fashioned way below @@ -21,6 +22,7 @@ jobs: # Looks like this is Python 3 only, so install via pip # brew install numpy brew install libusb + brew install pkg-config brew install protobuf brew install cppunit - name: Compile From e0780c70aa0c7c8976e91150e65ce0e19e91018f Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 7 Dec 2022 23:48:07 +0000 Subject: [PATCH 06/20] Disable the Python stuff temporarily... --- .travis-ci.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis-ci.sh b/.travis-ci.sh index c0dfc28045..e11854e21e 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -236,7 +236,9 @@ else # Silence all deprecated declarations on Linux due to auto_ptr making the build log too long export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-ja-rule --enable-e133 CPPFLAGS=-Wno-deprecated-declarations' else - export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-ja-rule --enable-e133' + #export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-ja-rule --enable-e133' + # Disable the Python stuff temporarily... + export DISTCHECK_CONFIGURE_FLAGS='--enable-ja-rule --enable-e133' fi #travis_fold start "autoreconf" autoreconf -i; From dd7241515975854792d77e8596c6eaef15dd0139 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 7 Dec 2022 23:56:59 +0000 Subject: [PATCH 07/20] Try harder to temporarily disable the Python stuff --- .travis-ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis-ci.sh b/.travis-ci.sh index e11854e21e..5fe0d43fc5 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -238,7 +238,7 @@ else else #export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-ja-rule --enable-e133' # Disable the Python stuff temporarily... - export DISTCHECK_CONFIGURE_FLAGS='--enable-ja-rule --enable-e133' + export DISTCHECK_CONFIGURE_FLAGS='--disable-python-libs --disable-rdm-tests --enable-ja-rule --enable-e133' fi #travis_fold start "autoreconf" autoreconf -i; From 5a591e7b5e8f63da4cc368fc8f9df3dc0e83f92c Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Thu, 8 Dec 2022 00:51:12 +0000 Subject: [PATCH 08/20] Use ccache and cache the build --- .github/workflows/compilation.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 4d7d1c9aec..1b87c77d5e 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -25,8 +25,11 @@ jobs: brew install pkg-config brew install protobuf brew install cppunit + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 - name: Compile env: TASK: 'compile' run: | + PATH=/usr/local/opt/ccache/libexec:$PATH # Use ccache on Mac too bash -ex .travis-ci.sh From 2facf1a3498bd7c0f8a981af1e0a8a1f09cc3de9 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Thu, 8 Dec 2022 19:34:29 +0000 Subject: [PATCH 09/20] Add a basic test script to call olad --help --- olad/Makefile.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/olad/Makefile.mk b/olad/Makefile.mk index 527bfc26c2..06fd036998 100644 --- a/olad/Makefile.mk +++ b/olad/Makefile.mk @@ -88,4 +88,12 @@ olad_OlaTester_SOURCES = \ olad_OlaTester_CXXFLAGS = $(COMMON_TESTING_PROTOBUF_FLAGS) olad_OlaTester_LDADD = $(COMMON_OLAD_TEST_LDADD) -CLEANFILES += olad/ola-output.conf +test_scripts += olad/OladHelpTest.sh + +OladHelpTest.sh: olad/Makefile.mk + echo "${top_builddir}/olad/olad${EXEEXT} --help; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: olad exited with status \$$STATUS\"; exit \$$STATUS; fi" > $(top_builddir)/olad/OladHelpTest.sh + chmod +x $(top_builddir)/olad/OladHelpTest.sh + +CLEANFILES += \ + olad/OladHelpTest.sh \ + olad/ola-output.conf From 00c931c09b76ec5eb718a80d932bd823a4738226 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Thu, 8 Dec 2022 19:49:37 +0000 Subject: [PATCH 10/20] Fix the Makefile source line --- olad/Makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/olad/Makefile.mk b/olad/Makefile.mk index 06fd036998..e631c096be 100644 --- a/olad/Makefile.mk +++ b/olad/Makefile.mk @@ -90,7 +90,7 @@ olad_OlaTester_LDADD = $(COMMON_OLAD_TEST_LDADD) test_scripts += olad/OladHelpTest.sh -OladHelpTest.sh: olad/Makefile.mk +olad/OladHelpTest.sh: olad/Makefile.mk echo "${top_builddir}/olad/olad${EXEEXT} --help; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: olad exited with status \$$STATUS\"; exit \$$STATUS; fi" > $(top_builddir)/olad/OladHelpTest.sh chmod +x $(top_builddir)/olad/OladHelpTest.sh From 8e346af5cd60704d2a77b7684115c46fe5d5860a Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 9 Dec 2022 17:05:00 +0000 Subject: [PATCH 11/20] Temporarily deliberately fail so we can view the output --- olad/Makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/olad/Makefile.mk b/olad/Makefile.mk index e631c096be..28fd588deb 100644 --- a/olad/Makefile.mk +++ b/olad/Makefile.mk @@ -91,7 +91,7 @@ olad_OlaTester_LDADD = $(COMMON_OLAD_TEST_LDADD) test_scripts += olad/OladHelpTest.sh olad/OladHelpTest.sh: olad/Makefile.mk - echo "${top_builddir}/olad/olad${EXEEXT} --help; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: olad exited with status \$$STATUS\"; exit \$$STATUS; fi" > $(top_builddir)/olad/OladHelpTest.sh + echo "${top_builddir}/olad/olad${EXEEXT} --help; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: olad exited with status \$$STATUS\"; exit 1; exit \$$STATUS; fi" > $(top_builddir)/olad/OladHelpTest.sh chmod +x $(top_builddir)/olad/OladHelpTest.sh CLEANFILES += \ From 78f4a68096847dd43d00034eb8b61f57a9d3db23 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 9 Dec 2022 17:35:42 +0000 Subject: [PATCH 12/20] Correctly break the build to see the output... --- olad/Makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/olad/Makefile.mk b/olad/Makefile.mk index 28fd588deb..9aae6ce6cc 100644 --- a/olad/Makefile.mk +++ b/olad/Makefile.mk @@ -91,7 +91,7 @@ olad_OlaTester_LDADD = $(COMMON_OLAD_TEST_LDADD) test_scripts += olad/OladHelpTest.sh olad/OladHelpTest.sh: olad/Makefile.mk - echo "${top_builddir}/olad/olad${EXEEXT} --help; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: olad exited with status \$$STATUS\"; exit 1; exit \$$STATUS; fi" > $(top_builddir)/olad/OladHelpTest.sh + echo "${top_builddir}/olad/olad${EXEEXT} --help; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: olad exited with status \$$STATUS\"; exit \$$STATUS; fi; exit 1" > $(top_builddir)/olad/OladHelpTest.sh chmod +x $(top_builddir)/olad/OladHelpTest.sh CLEANFILES += \ From a2ef5856dd647914c9d07048c15bf47e2f3a4f77 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 9 Dec 2022 19:45:21 +0000 Subject: [PATCH 13/20] Test codemagic --- codemagic.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 codemagic.yaml diff --git a/codemagic.yaml b/codemagic.yaml new file mode 100644 index 0000000000..e29bc6aa35 --- /dev/null +++ b/codemagic.yaml @@ -0,0 +1,5 @@ +workflows: + hello-world: + name: Hello world workflow + scripts: + - echo "Hello World!" From c0bad679031547d36062a36e3681ffd9c5d00e5d Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sat, 10 Dec 2022 01:32:08 +0000 Subject: [PATCH 14/20] Try compiling on clang as well as g++ --- .github/workflows/compilation.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 1b87c77d5e..0693645813 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -4,6 +4,9 @@ on: [push, pull_request] jobs: compile: runs-on: macos-12 + strategy: + matrix: + cxx: [g++, clang++] steps: - uses: actions/checkout@master - name: Install dependencies @@ -30,6 +33,7 @@ jobs: - name: Compile env: TASK: 'compile' + CXX: ${{ matrix.cxx }} run: | PATH=/usr/local/opt/ccache/libexec:$PATH # Use ccache on Mac too bash -ex .travis-ci.sh From 4af88751d34dd551a0f9442ab6f49fe075500526 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sat, 10 Dec 2022 01:48:39 +0000 Subject: [PATCH 15/20] Don't fail fast --- .github/workflows/compilation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 0693645813..5d8f866269 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -5,6 +5,7 @@ jobs: compile: runs-on: macos-12 strategy: + fail-fast: false matrix: cxx: [g++, clang++] steps: From 9be813a0565998229076933447fcf15dde1b715e Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Thu, 22 Jun 2023 04:45:24 +0100 Subject: [PATCH 16/20] Debug protoc version check on Mac --- config/ola.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/ola.m4 b/config/ola.m4 index f838ab70ad..345262521f 100644 --- a/config/ola.m4 +++ b/config/ola.m4 @@ -39,7 +39,7 @@ else AC_PATH_PROG([PROTOC],[protoc]) fi - +set -x if test -z "$PROTOC" ; then AC_MSG_ERROR([cannot find 'protoc' program]); elif test -n "$1" ; then @@ -67,6 +67,7 @@ elif test -n "$1" ; then AC_MSG_ERROR([protoc version too old $protoc_version < $required]); fi fi +set +x AC_ARG_WITH([ola-protoc-plugin], [AS_HELP_STRING([--with-ola-protoc-plugin=COMMAND], From 29bb082559f0b7ab99a3f591272dac912d9f76bd Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Thu, 22 Jun 2023 05:05:04 +0100 Subject: [PATCH 17/20] Switch to an older version of protobuf before we fix our versioning --- .github/workflows/compilation.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 5d8f866269..8b66613b3e 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -27,7 +27,8 @@ jobs: # brew install numpy brew install libusb brew install pkg-config - brew install protobuf + # TODO(Peter): Upgrade this after #1867 + brew install protobuf@3.6 brew install cppunit - name: ccache uses: hendrikmuhs/ccache-action@v1.2 From d7863ceb76f61bdd075586a3f27e11be99fa4242 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Thu, 22 Jun 2023 05:11:19 +0100 Subject: [PATCH 18/20] Try a middle ground protobuf --- .github/workflows/compilation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 8b66613b3e..ddde9177b7 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -28,7 +28,7 @@ jobs: brew install libusb brew install pkg-config # TODO(Peter): Upgrade this after #1867 - brew install protobuf@3.6 + brew install protobuf@3 brew install cppunit - name: ccache uses: hendrikmuhs/ccache-action@v1.2 From 6908b9dbeb4cc96b05c3750089782d270efc3933 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 5 Jul 2023 15:13:49 +0100 Subject: [PATCH 19/20] Make sure we can load and find our special protobuf version --- .github/workflows/compilation.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index ddde9177b7..308780b6c1 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -38,4 +38,7 @@ jobs: CXX: ${{ matrix.cxx }} run: | PATH=/usr/local/opt/ccache/libexec:$PATH # Use ccache on Mac too + export LDFLAGS="-L/usr/local/opt/protobuf@3/lib" + export CPPFLAGS="-I/usr/local/opt/protobuf@3/include" + export PKG_CONFIG_PATH="/usr/local/opt/protobuf@3/lib/pkgconfig" bash -ex .travis-ci.sh From 85c89f4a088bab47398d50004aa5220ee0bec0f9 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 5 Jul 2023 15:50:20 +0100 Subject: [PATCH 20/20] Ensure the protoc executable is available too --- .github/workflows/compilation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 308780b6c1..7463df7faf 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -38,6 +38,7 @@ jobs: CXX: ${{ matrix.cxx }} run: | PATH=/usr/local/opt/ccache/libexec:$PATH # Use ccache on Mac too + export PATH="/usr/local/opt/protobuf@3/bin:$PATH" export LDFLAGS="-L/usr/local/opt/protobuf@3/lib" export CPPFLAGS="-I/usr/local/opt/protobuf@3/include" export PKG_CONFIG_PATH="/usr/local/opt/protobuf@3/lib/pkgconfig"