Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/openlightingproject/ola i…
Browse files Browse the repository at this point in the history
…nto e1.33
  • Loading branch information
peternewman committed Feb 28, 2024
2 parents 7686be6 + 522c5a9 commit c1b8a74
Show file tree
Hide file tree
Showing 78 changed files with 1,522 additions and 258 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/build.yaml
Expand Up @@ -21,7 +21,7 @@ jobs:
pkg: "gcc g++"
- id: "distcheck-debian-stable-amd64-gcc"
task: "distcheck"
configure-args: "--enable-ja-rule --enable-e133 --enable-rdm-tests --enable-java-libs"
configure-args: "--enable-ja-rule --enable-e133 --enable-rdm-tests"
# TODO(Perry): Fix Debian 12 OOM issue on GitHub Actions
container: "debian:stable"
compiler:
Expand All @@ -30,7 +30,7 @@ jobs:
pkg: "gcc g++"
- id: "distcheck-debian-stable-amd64-clang"
task: "distcheck"
configure-args: "--enable-ja-rule --enable-e133 --enable-rdm-tests --enable-java-libs"
configure-args: "--enable-ja-rule --enable-e133 --enable-rdm-tests"
# TODO(Perry): Fix Debian 12 OOM issue on GitHub Actions
container: "debian:stable"
compiler:
Expand All @@ -50,13 +50,13 @@ jobs:
run: apt-get update -y
# See comments beginning at
# https://github.com/actions/runner/issues/763#issuecomment-1435474884
# Without Git, actions/checkout@v3 will resort to REST and will not
# Without Git, actions/checkout@v4 will resort to REST and will not
# create a .git folder or .git.config. The Problem Matcher looks for
# .git/config to find where the root of the repo is, so it must be
# present.
- name: Install Git
run: apt-get -y install git
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build tools
shell: bash
run: |
Expand Down Expand Up @@ -90,17 +90,18 @@ jobs:
- name: Autoreconf
run: sudo --preserve-env -u builduser env "PATH=$PATH" autoreconf -i
- name: Set configure arguments
# Env var name DISTCHECK_CONFIGURE_FLAGS must be used, see #1881 and #1883
run: |
echo "GH_OLA_CONFIGURE_ARGS=${{ matrix.configure-args }}" >> $GITHUB_ENV
echo "DISTCHECK_CONFIGURE_FLAGS=${{ matrix.configure-args }}" >> $GITHUB_ENV
- name: Set additional Linux configure arguments
if: runner.os == 'Linux'
# Silence all deprecated declarations on Linux due to auto_ptr making the build log too long
run: |
echo "GH_OLA_CONFIGURE_ARGS=$GH_OLA_CONFIGURE_ARGS CPPFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV
echo "DISTCHECK_CONFIGURE_FLAGS=$DISTCHECK_CONFIGURE_FLAGS CPPFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV
- name: Print configure command
run: echo "./configure $GH_OLA_CONFIGURE_ARGS"
run: echo "./configure $DISTCHECK_CONFIGURE_FLAGS"
- name: Configure
run: sudo --preserve-env -u builduser env "PATH=$PATH" ./configure $GH_OLA_CONFIGURE_ARGS
run: sudo --preserve-env -u builduser env "PATH=$PATH" ./configure $DISTCHECK_CONFIGURE_FLAGS
- name: ${{ matrix.task }}
run: sudo --preserve-env -u builduser env "PATH=$PATH" make ${{ matrix.task }} -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }} VERBOSE=1
- name: Display structure of the built files
Expand All @@ -118,14 +119,14 @@ jobs:
if: always()
run: sha256sum ola-*.tar.gz
- name: Upload source tree artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: ola-${{ matrix.id }}-source-tree
path: ola-${{ matrix.id }}-source-tree.tar.gz
- name: Upload built artifact
if: matrix.task == 'distcheck' || matrix.task == 'dist'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ola-${{ matrix.id }}-dist
path: |
Expand All @@ -146,7 +147,7 @@ jobs:
flag-name: ${{ matrix.id }}
- name: Upload coverage artifacts
if: always() && matrix.task == 'coverage'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ola-${{ matrix.id }}-coverage
path: coverage/
Expand All @@ -164,7 +165,7 @@ jobs:
- id: "distcheck-debian-stable-amd64-clang"
steps:
- name: Download built source tree archive
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ola-${{ matrix.id }}-source-tree
path: .
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/debian.yml
Expand Up @@ -21,13 +21,13 @@ jobs:
run: apt-get update -y
# See comments beginning at
# https://github.com/actions/runner/issues/763#issuecomment-1435474884
# Without Git, actions/checkout@v3 will resort to REST and will not
# Without Git, actions/checkout@v4 will resort to REST and will not
# create a .git folder or .git.config. The Problem Matcher looks for
# .git/config to find where the root of the repo is, so it must be
# present.
- name: Install Git
run: apt-get -y install git
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get -y install devscripts adduser fakeroot sudo
- name: Install build dependencies
Expand All @@ -53,7 +53,7 @@ jobs:
shell: bash
run: find . -type f -exec sha256sum {} \;
working-directory: built
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: ola-built-debian-${{ matrix.image_tag }}-${{ matrix.architecture }}
Expand All @@ -72,7 +72,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Download build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ola-built-debian-${{ matrix.image_tag }}-${{ matrix.architecture }}
path: built
Expand All @@ -85,7 +85,7 @@ jobs:
run: apt-get -y install autopkgtest
- name: Test
run: autopkgtest --output-dir=test-output built/*ges -- null
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always() # Always upload the test output, even on failed tests
with:
name: ola-test-output-debian-${{ matrix.image_tag }}-${{ matrix.architecture }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/isort.yml
Expand Up @@ -8,5 +8,5 @@ jobs:
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: isort/isort-action@v1
20 changes: 10 additions & 10 deletions .github/workflows/lint.yaml
Expand Up @@ -10,13 +10,13 @@ jobs:
run: apt-get update -y
# See comments beginning at
# https://github.com/actions/runner/issues/763#issuecomment-1435474884
# Without Git, actions/checkout@v3 will resort to REST and will not
# Without Git, actions/checkout@v4 will resort to REST and will not
# create a .git folder or .git.config. The Problem Matcher looks for
# .git/config to find where the root of the repo is, so it must be
# present.
- name: Install Git
run: apt-get -y install git
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build tools
shell: bash
run: |
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
tar --exclude=ola-debian-stable-built-source-tree.tar.gz -cvzf ola-debian-stable-built-source-tree.tar.gz .
- name: SHA256 artifact archive
run: sha256sum ola-debian-stable-built-source-tree.tar.gz
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ola-debian-stable-built-source-tree
path: ola-debian-stable-built-source-tree.tar.gz
Expand All @@ -67,7 +67,7 @@ jobs:
needs: build
steps:
- name: Download built source tree archive
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ola-debian-stable-built-source-tree
path: .
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
needs: build
steps:
- name: Download built source tree archive
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ola-debian-stable-built-source-tree
path: .
Expand All @@ -123,7 +123,7 @@ jobs:
needs: build
steps:
- name: Download built source tree archive
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ola-debian-stable-built-source-tree
path: .
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
needs: build
steps:
- name: Download built source tree archive
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ola-debian-stable-built-source-tree
path: .
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
needs: build
steps:
- name: Download built source tree archive
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ola-debian-stable-built-source-tree
path: .
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
needs: build
steps:
- name: Download built source tree archive
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ola-debian-stable-built-source-tree
path: .
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
name: weblint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node.js v18
uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .travis-ci.sh
Expand Up @@ -291,6 +291,7 @@ elif [[ $TASK = 'pychecker-wip' ]]; then
pychecker --quiet --limit 500 --blacklist $PYCHECKER_BLACKLIST $(find ./ -name "*.py" -and ! \( -name "*_pb2.py" -or -name "OlaClient.py" -or -name "ola_candidate_ports.py" \) | xargs)
else
# Otherwise compile and check as normal
# Env var name DISTCHECK_CONFIGURE_FLAGS must be used, see #1881 and #1883
if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then
# Silence all deprecated declarations on Linux due to auto_ptr making the build log too long
export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-java-libs --enable-ja-rule --enable-e133 CPPFLAGS=-Wno-deprecated-declarations'
Expand Down
2 changes: 1 addition & 1 deletion README.developer
Expand Up @@ -55,7 +55,7 @@ The release lifecycle is:
- New feature work occurs on the master branch.
- Once the new features are considered stable or enough time has passed, a new
minor release branch will be created, e.g. 0.10.
- The minor release branch will be stablized with bugfixes, these bug fixes
- The minor release branch will be stabilized with bugfixes, these bug fixes
will also be merged back into master.
- Once declared stable, a new patch branch 0 will be created e.g. 0.10.0
- Release specific changes like the version number, debian files etc. will be
Expand Down
2 changes: 1 addition & 1 deletion common/io/IOStackTest.cpp
Expand Up @@ -207,7 +207,7 @@ void IOStackTest::testAppendToQueue() {
}

/**
* Confirm we re-use blocks
* Confirm we reuse blocks
*/
void IOStackTest::testBlockReuse() {
MemoryBlockPool pool(4);
Expand Down
2 changes: 1 addition & 1 deletion common/io/PollerInterface.h
Expand Up @@ -51,7 +51,7 @@ namespace io {
* reentrant. Calling any of the read / write / close actions may in turn add /
* remove descriptors, including the descriptor the method was itself called
* on. There are tests in SelectServerTest.cpp to exercise some of these cases
* but implementors need to be careful.
* but implementers need to be careful.
*
* @warning
* For example, if Poll() iterates over a set of Descriptors and calls
Expand Down
16 changes: 16 additions & 0 deletions common/messaging/DescriptorTest.cpp
Expand Up @@ -34,6 +34,8 @@ using ola::messaging::BoolFieldDescriptor;
using ola::messaging::FieldDescriptor;
using ola::messaging::FieldDescriptorGroup;
using ola::messaging::IPV4FieldDescriptor;
using ola::messaging::IPV6FieldDescriptor;
using ola::messaging::MACFieldDescriptor;
using ola::messaging::StringFieldDescriptor;
using ola::messaging::UIDFieldDescriptor;
using ola::messaging::UInt16FieldDescriptor;
Expand Down Expand Up @@ -76,6 +78,20 @@ void DescriptorTest::testFieldDescriptors() {
OLA_ASSERT_TRUE(ipv4_descriptor.LimitedSize());
OLA_ASSERT_EQ(4u, ipv4_descriptor.MaxSize());

// IPv6 address
IPV6FieldDescriptor ipv6_descriptor("ipv6");
OLA_ASSERT_EQ(string("ipv6"), ipv6_descriptor.Name());
OLA_ASSERT_TRUE(ipv6_descriptor.FixedSize());
OLA_ASSERT_TRUE(ipv6_descriptor.LimitedSize());
OLA_ASSERT_EQ(16u, ipv6_descriptor.MaxSize());

// MAC address
MACFieldDescriptor mac_descriptor("mac");
OLA_ASSERT_EQ(string("mac"), mac_descriptor.Name());
OLA_ASSERT_TRUE(mac_descriptor.FixedSize());
OLA_ASSERT_TRUE(mac_descriptor.LimitedSize());
OLA_ASSERT_EQ(6u, mac_descriptor.MaxSize());

// UID
UIDFieldDescriptor uid_descriptor("uid");
OLA_ASSERT_EQ(string("uid"), uid_descriptor.Name());
Expand Down
44 changes: 26 additions & 18 deletions common/messaging/MessagePrinter.cpp
Expand Up @@ -45,37 +45,44 @@ string MessagePrinter::AsString(const Message *message) {


void GenericMessagePrinter::Visit(const BoolMessageField *message) {
Stream() << string(m_indent, ' ') <<
TransformLabel(message->GetDescriptor()->Name()) << ": "
<< (message->Value() ? "true" : "false") << endl;
Stream() << string(m_indent, ' ')
<< TransformLabel(message->GetDescriptor()->Name()) << ": "
<< (message->Value() ? "true" : "false") << endl;
}


void GenericMessagePrinter::Visit(const IPV4MessageField *message) {
Stream() << string(m_indent, ' ') <<
TransformLabel(message->GetDescriptor()->Name()) << ": "
<< message->Value() << endl;
Stream() << string(m_indent, ' ')
<< TransformLabel(message->GetDescriptor()->Name()) << ": "
<< message->Value() << endl;
}


void GenericMessagePrinter::Visit(const IPV6MessageField *message) {
Stream() << string(m_indent, ' ')
<< TransformLabel(message->GetDescriptor()->Name()) << ": "
<< message->Value() << endl;
}


void GenericMessagePrinter::Visit(const MACMessageField *message) {
Stream() << string(m_indent, ' ') <<
TransformLabel(message->GetDescriptor()->Name()) << ": "
<< message->Value().ToString() << endl;
Stream() << string(m_indent, ' ')
<< TransformLabel(message->GetDescriptor()->Name()) << ": "
<< message->Value().ToString() << endl;
}


void GenericMessagePrinter::Visit(const UIDMessageField *message) {
Stream() << string(m_indent, ' ') <<
TransformLabel(message->GetDescriptor()->Name()) << ": "
<< message->Value().ToString() << endl;
Stream() << string(m_indent, ' ')
<< TransformLabel(message->GetDescriptor()->Name()) << ": "
<< message->Value().ToString() << endl;
}


void GenericMessagePrinter::Visit(const StringMessageField *message) {
Stream() << string(m_indent, ' ') <<
TransformLabel(message->GetDescriptor()->Name()) << ": "
<< EncodeString(message->Value()) << endl;
Stream() << string(m_indent, ' ')
<< TransformLabel(message->GetDescriptor()->Name()) << ": "
<< EncodeString(message->Value()) << endl;
}


Expand Down Expand Up @@ -134,8 +141,8 @@ void GenericMessagePrinter::Visit(const BasicMessageField<int32_t> *message) {


void GenericMessagePrinter::Visit(const GroupMessageField *message) {
Stream() << string(m_indent, ' ') <<
TransformLabel(message->GetDescriptor()->Name()) << " {" << endl;
Stream() << string(m_indent, ' ')
<< TransformLabel(message->GetDescriptor()->Name()) << " {" << endl;
m_indent += m_indent_size;
}

Expand Down Expand Up @@ -178,8 +185,9 @@ void GenericMessagePrinter::AppendInt(const string &name,


void GenericMessagePrinter::AppendMultiplier(int8_t multiplier) {
if (multiplier)
if (multiplier) {
Stream() << " x 10 ^ " << static_cast<int>(multiplier);
}
}
} // namespace messaging
} // namespace ola

0 comments on commit c1b8a74

Please sign in to comment.