Skip to content

Commit bb70f02

Browse files
authored
Merge branch 'master' into plugfest
2 parents 146cf26 + b113786 commit bb70f02

42 files changed

Lines changed: 222 additions & 253 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
run: apt-get -y install git
6363
- uses: actions/checkout@v4
6464
with:
65+
fetch-depth: 0 # Fetch all tags for generating OLA_BUILD_NAME
6566
persist-credentials: false
6667
- name: Install build tools
6768
shell: bash
@@ -99,6 +100,11 @@ jobs:
99100
# Env var name DISTCHECK_CONFIGURE_FLAGS must be used, see #1881 and #1883
100101
run: |
101102
echo "DISTCHECK_CONFIGURE_FLAGS=${{ matrix.configure-args }}" >> $GITHUB_ENV
103+
- name: Set additional Linux configure arguments
104+
if: runner.os == 'Linux'
105+
# Silence all deprecated declarations on Linux due to auto_ptr making the build log too long
106+
run: |
107+
echo "DISTCHECK_CONFIGURE_FLAGS=$DISTCHECK_CONFIGURE_FLAGS CPPFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV
102108
- name: Print configure command
103109
run: echo "./configure $DISTCHECK_CONFIGURE_FLAGS"
104110
- name: Configure

.github/workflows/debian.yml

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
image_tag: [bullseye, bookworm, trixie, sid]
17+
image_tag: [bullseye, bookworm, trixie, forky, sid]
1818
architecture: [amd64]
1919
container: debian:${{ matrix.image_tag }}
2020
steps:
@@ -29,13 +29,37 @@ jobs:
2929
# create a .git folder or .git.config. The Problem Matcher looks for
3030
# .git/config to find where the root of the repo is, so it must be
3131
# present.
32-
- name: Install Git
33-
run: apt-get -y install git
32+
- name: Install Git and lsb-release
33+
run: apt-get -y install git lsb-release
3434
- uses: actions/checkout@v4
3535
with:
36+
fetch-depth: 0 # Fetch all tags for generating OLA_BUILD_NAME
3637
persist-credentials: false
38+
- name: Generate build name
39+
shell: bash
40+
run: |
41+
chown root:root . # workaround Git security precaution, see https://github.com/actions/runner-images/issues/6775
42+
export OLA_BUILD_NAME=$(./scripts/build_name.sh)
43+
# No docker number tag for testing, so must use lsb_release
44+
export OLA_DEBIAN_BUILD_VERSION=$(./scripts/build_name.sh --debian)
45+
46+
echo "OLA_BUILD_NAME=$OLA_BUILD_NAME" >> $GITHUB_OUTPUT
47+
echo "OLA_BUILD_NAME=$OLA_BUILD_NAME" >> $GITHUB_ENV # Set build name globally so that modifications don't cause -dirty
48+
echo "OLA_DEBIAN_BUILD_VERSION=$OLA_DEBIAN_BUILD_VERSION" >> $GITHUB_OUTPUT
49+
50+
echo "Build name: $OLA_BUILD_NAME"
51+
echo "Debian Build Version: $OLA_DEBIAN_BUILD_VERSION"
52+
id: generate-build-name
3753
- name: Install build tools
38-
run: apt-get -y install devscripts adduser fakeroot sudo
54+
run: apt-get -y install devscripts adduser fakeroot sudo equivs
55+
- name: Create Debian version for build
56+
shell: bash
57+
run: |
58+
DEBFULLNAME="GitHub Actions" DEBEMAIL=actions@github.com \
59+
debchange --force-bad-version \
60+
--newversion ${{ steps.generate-build-name.outputs.OLA_DEBIAN_BUILD_VERSION }} \
61+
"GitHub Actions Build \
62+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
3963
- name: Install build dependencies
4064
run: mk-build-deps -t "apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends" -i -r
4165
- name: Set up build user
@@ -44,7 +68,7 @@ jobs:
4468
chown -R builduser:builduser .
4569
chown builduser:builduser ..
4670
- name: Build
47-
run: sudo -u builduser dpkg-buildpackage -b -rfakeroot -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }}
71+
run: sudo -u builduser env "OLA_BUILD_NAME=$OLA_BUILD_NAME" dpkg-buildpackage -v${{ steps.generate-build-name.outputs.OLA_DEBIAN_BUILD_VERSION }} -b -rfakeroot -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }}
4872
- name: Move built files
4973
if: always()
5074
run: |
@@ -62,7 +86,7 @@ jobs:
6286
- uses: actions/upload-artifact@v4
6387
if: always()
6488
with:
65-
name: ola-built-debian-${{ matrix.image_tag }}-${{ matrix.architecture }}
89+
name: ola-built-debian-${{ matrix.image_tag }}-${{ steps.generate-build-name.outputs.OLA_DEBIAN_BUILD_VERSION }}_${{ matrix.architecture }}
6690
path: ./built
6791
debian-test:
6892
name: 'Debian Test ${{ matrix.image_tag }} ${{ matrix.architecture }}'
@@ -72,17 +96,31 @@ jobs:
7296
strategy:
7397
fail-fast: false
7498
matrix:
75-
image_tag: [bullseye, bookworm, trixie, sid]
99+
image_tag: [bullseye, bookworm, trixie, forky, sid]
76100
architecture: [amd64]
77101
container: debian:${{ matrix.image_tag }}
78102
steps:
103+
- name: Update package database
104+
run: apt-get update -y
105+
- name: Install Git and lsb-release
106+
run: apt-get -y install git lsb-release
79107
- uses: actions/checkout@v4
80108
with:
109+
fetch-depth: 0 # Fetch all tags for generating OLA_DEBIAN_BUILD_VERSION
81110
persist-credentials: false
111+
- name: Generate build name # Job step outputs can't be passed between builds for matrix jobs, so we re-generate
112+
shell: bash
113+
run: |
114+
chown root:root . # workaround Git security precaution, see https://github.com/actions/runner-images/issues/6775
115+
# No docker number tag for testing, so must use lsb_release
116+
export OLA_DEBIAN_BUILD_VERSION=$(./scripts/build_name.sh --debian)
117+
echo "OLA_DEBIAN_BUILD_VERSION=$OLA_DEBIAN_BUILD_VERSION" >> $GITHUB_OUTPUT
118+
echo "Debian Build Version: $OLA_DEBIAN_BUILD_VERSION"
119+
id: generate-build-name
82120
- name: Download build artifact
83121
uses: actions/download-artifact@v4
84122
with:
85-
name: ola-built-debian-${{ matrix.image_tag }}-${{ matrix.architecture }}
123+
name: ola-built-debian-${{ matrix.image_tag }}-${{ steps.generate-build-name.outputs.OLA_DEBIAN_BUILD_VERSION }}_${{ matrix.architecture }}
86124
path: built
87125
- name: Display structure of artifact files
88126
run: ls -alR
@@ -96,5 +134,5 @@ jobs:
96134
- uses: actions/upload-artifact@v4
97135
if: always() # Always upload the test output, even on failed tests
98136
with:
99-
name: ola-test-output-debian-${{ matrix.image_tag }}-${{ matrix.architecture }}
137+
name: ola-test-output-debian-${{ matrix.image_tag }}-${{ steps.generate-build-name.outputs.OLA_DEBIAN_BUILD_VERSION }}_${{ matrix.architecture }}
100138
path: test-output

.travis-ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ else
294294
# Env var name DISTCHECK_CONFIGURE_FLAGS must be used, see #1881 and #1883
295295
if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then
296296
# Silence all deprecated declarations on Linux due to auto_ptr making the build log too long
297-
export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-java-libs --enable-ja-rule --enable-e133'
297+
export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-java-libs --enable-ja-rule --enable-e133 CPPFLAGS=-Wno-deprecated-declarations'
298298
else
299299
export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-java-libs --enable-ja-rule --enable-e133'
300300
fi

Makefile.am

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,19 @@ if ! USING_WIN32
6565
if FATAL_WARNINGS
6666
COMMON_CXXFLAGS += -Werror
6767
COMMON_PROTOBUF_CXXFLAGS += -Werror -Wno-error=unused-parameter \
68+
-Wno-error=deprecated-declarations \
6869
-Wno-error=sign-compare \
6970
-Wno-error=ignored-qualifiers
7071
COMMON_TESTING_FLAGS += -Werror
71-
COMMON_TESTING_PROTOBUF_FLAGS += -Werror -Wno-error=unused-parameter
72+
COMMON_TESTING_PROTOBUF_FLAGS += -Werror -Wno-error=unused-parameter \
73+
-Wno-error=deprecated-declarations
74+
75+
if GNU_PLUS_PLUS_11_DEPRECATIONS
76+
# We have to use gnu++11 for some reason, so stop it complaining about
77+
# auto_ptr
78+
COMMON_CXXFLAGS += -Wno-error=deprecated-declarations
79+
COMMON_TESTING_FLAGS += -Wno-error=deprecated-declarations
80+
endif
7281
endif
7382
endif
7483

common/base/Flags.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ void FlagRegistry::DisplayUsage() {
291291
*/
292292
void FlagRegistry::DisplayVersion() {
293293
cout << "OLA " << m_argv0 << " version: " << ola::base::Version::GetVersion()
294+
<< ", build: " << ola::base::Version::GetBuildName()
294295
<< endl;
295296
}
296297

common/base/Version.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ unsigned int Version::GetRevision() {
4040
return OLA_VERSION_REVISION;
4141
}
4242

43+
string Version::GetBuildName() {
44+
return OLA_BUILD_NAME;
45+
}
46+
4347
string Version::GetVersion() {
4448
std::ostringstream str;
4549
str << GetMajor() << "." << GetMinor() << "." << GetRevision();

common/rdm/RDMHelper.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,12 @@ string SlotInfoToString(uint8_t slot_type, uint16_t slot_label) {
883883
return "Primary, saturation";
884884
case SD_COLOR_ADD_UV:
885885
return "Primary, additive UV";
886+
case SD_CIE_X:
887+
return "Primary, CIE X color coordinate";
888+
case SD_CIE_Y:
889+
return "Primary, CIE Y color coordinate";
890+
case SD_MAGENTA_GREEN_CORRECTION:
891+
return "Primary, CCT magenta-green adjustment";
886892
case SD_STATIC_GOBO_WHEEL:
887893
return "Primary, static gobo wheel";
888894
case SD_ROTO_GOBO_WHEEL:

common/utils/StringUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,12 @@ bool HexStringToInt(const string &value, int64_t *output) {
454454

455455
void ToLower(string *s) {
456456
std::transform(s->begin(), s->end(), s->begin(),
457-
[](int value){return std::tolower(value);});
457+
std::ptr_fun<int, int>(std::tolower));
458458
}
459459

460460
void ToUpper(string *s) {
461461
std::transform(s->begin(), s->end(), s->begin(),
462-
[](int value){return std::toupper(value);});
462+
std::ptr_fun<int, int>(std::toupper));
463463
}
464464

465465
void CapitalizeLabel(string *s) {

configure.ac

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ AC_SUBST([ola_revision_version])
2323
OLA_REVISION_VERSION=ola_revision_version
2424
AC_SUBST(OLA_REVISION_VERSION)
2525

26+
# Build name is separate because AC_CHECK_PROG must come after AC_INIT
27+
# build_name.sh also checks for Git, but this allows that check to show
28+
# up in ./configure for troubleshooting
29+
AC_CHECK_PROG([git],[git],[yes],[no])
30+
AM_CONDITIONAL([FOUND_GIT], [test "x$git" = xyes])
31+
AC_SUBST(OLA_BUILD_NAME)
32+
AC_ARG_VAR([OLA_BUILD_NAME], [Override the build name])
33+
AS_IF([test "x$OLA_BUILD_NAME" = x], [
34+
OLA_BUILD_NAME="$(./scripts/build_name.sh)"
35+
])
36+
2637
# Checks for programs.
2738
AC_LANG([C++])
2839
AC_PROG_CXX
@@ -132,6 +143,7 @@ AS_IF([test "x$ac_cv_gnu_plus_plus_11" = xyes],
132143
])
133144
AS_IF([test "x$require_gnu_plus_plus_11" = xyes],
134145
[CXXFLAGS="$CXXFLAGS -std=gnu++11"])
146+
AM_CONDITIONAL([GNU_PLUS_PLUS_11_DEPRECATIONS], [test "x$require_gnu_plus_plus_11" = xyes])
135147

136148
# Checks for header files.
137149
AC_HEADER_DIRENT
@@ -1025,6 +1037,7 @@ echo \
10251037
"-------------------------------------------------------
10261038
${PACKAGE_NAME} Version ${PACKAGE_VERSION}
10271039

1040+
Build Name: ${OLA_BUILD_NAME}
10281041
Prefix: '${prefix}'
10291042
Compiler: '${CXX} ${CXXFLAGS} ${CPPFLAGS}'
10301043
Linker: '${LD} ${AM_LDFLAGS} ${LIBS}'

debian/Makefile.mk

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Debian build files
22
EXTRA_DIST += \
33
debian/changelog \
4-
debian/compat \
54
debian/control \
65
debian/copyright \
76
debian/libola-dev.dirs \
@@ -10,20 +9,17 @@ EXTRA_DIST += \
109
debian/ola-python.dirs \
1110
debian/ola-python.install \
1211
debian/ola-rdm-tests.bash-completion \
13-
debian/ola-rdm-tests.config \
1412
debian/ola-rdm-tests.dirs \
1513
debian/ola-rdm-tests.install \
16-
debian/ola-rdm-tests.postinst \
1714
debian/ola-rdm-tests.rdm_test_server.init \
18-
debian/ola-rdm-tests.templates \
15+
debian/ola-rdm-tests.rdm_test_server.service \
1916
debian/ola.bash-completion \
20-
debian/ola.config \
2117
debian/ola.dirs \
2218
debian/ola.docs \
2319
debian/ola.install \
2420
debian/ola.olad.init \
21+
debian/ola.olad.service \
2522
debian/ola.postinst \
26-
debian/ola.templates \
2723
debian/ola.udev \
2824
debian/org.openlighting.ola.ola.metainfo.xml \
2925
debian/rules \

0 commit comments

Comments
 (0)