Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try and compile on Mac via GitHub Actions #1809

Draft
wants to merge 21 commits into
base: 0.10
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# GitHub Action to compile and test
name: compilation
on: [push, pull_request]
jobs:
compile:
runs-on: macos-12
strategy:
fail-fast: false
matrix:
cxx: [g++, clang++]
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 automake
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 pkg-config
# TODO(Peter): Upgrade this after #1867
brew install protobuf@3
brew install cppunit
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
- name: Compile
env:
TASK: 'compile'
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"
bash -ex .travis-ci.sh
24 changes: 13 additions & 11 deletions .travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,24 +236,26 @@ 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='--disable-python-libs --disable-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
5 changes: 5 additions & 0 deletions codemagic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
workflows:
hello-world:
name: Hello world workflow
scripts:
- echo "Hello World!"
3 changes: 2 additions & 1 deletion config/ola.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand Down
10 changes: 9 additions & 1 deletion olad/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

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; exit 1" > $(top_builddir)/olad/OladHelpTest.sh
chmod +x $(top_builddir)/olad/OladHelpTest.sh

CLEANFILES += \
olad/OladHelpTest.sh \
olad/ola-output.conf