Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
pkubanek committed Oct 25, 2023
2 parents 8a3ece8 + 6fef95e commit 336fa2d
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 162 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,55 @@ name: C/C++ CI
on: [push]

jobs:
almalinux:
runs-on: ubuntu-latest
name: Test compile on latest AlmaLinux
container:
image: almalinux
steps:
- name: Install dependencies
run: |
dnf install -y epel-release
dnf install -y make g++ catch-devel readline-devel yaml-cpp-devel spdlog-devel
- name: Checkout
uses: actions/checkout@v4
- name: make junit
run: |
make
make junit || true
centos:
runs-on: ubuntu-latest
name: Test compile on Centos7
container:
image: centos/devtoolset-7-toolchain-centos7
options: -u root
steps:
- name: Install dependencies
run: |
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y make boost-devel catch-devel readline-devel yaml-cpp-devel git
yum install -y make catch-devel readline-devel yaml-cpp-devel git
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: make junit
run: |
git clone https://github.com/gabime/spdlog.git
mv spdlog/include/spdlog include/
git clone https://github.com/fmtlib/fmt
mv fmt/include/fmt include
make
make junit || true
ubuntu:
runs-on: ubuntu-latest
name: Test compile on Ubuntu
steps:
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y make g++ libboost-dev catch libreadline-dev libyaml-cpp-dev libspdlog-dev
sudo apt install -y make g++ catch libreadline-dev libyaml-cpp-dev libspdlog-dev
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: make junit
run: |
make
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USER saluser
WORKDIR /home/saluser

RUN source ~/.setup.sh \
&& mamba install -y readline yaml-cpp boost-cpp catch2 spdlog \
&& mamba install -y readline yaml-cpp boost-cpp catch2 spdlog fmt \
&& echo > .crio_setup.sh -e \
echo "Configuring cRIO development environment" \\n\
export SHELL=bash \\n\
Expand Down
3 changes: 1 addition & 2 deletions Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ifndef VERBOSE
silence := --silence-errors
endif

c_opts := -fdata-sections -ffunction-sections -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE
c_opts := -fdata-sections -ffunction-sections -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -DSPDLOG_FMT_EXTERNAL

ifdef DEBUG
c_opts += -g
Expand All @@ -29,7 +29,6 @@ PKG_LIBS := $(shell pkg-config yaml-cpp --libs $(silence)) \

LIBS += $(PKG_LIBS) -ldl -lpthread

BOOST_CPPFLAGS := -I/usr/include/boost169
PKG_CPP_FLAGS := $(shell pkg-config yaml-cpp --cflags $(silence)) \
$(shell pkg-config spdlog --cflags $(silence)) \
$(shell pkg-config fmt --cflags $(silence))
Expand Down
19 changes: 19 additions & 0 deletions doc/version-history.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
###############
Version History
###############

v1.9.0
======

* MPU changed to SerialMultiplex

v1.8.0
======

* LVDT ElectroMechanical readout

v1.7.0
======

* offsets,.. ILC commands
* improved re-heater gain management
82 changes: 0 additions & 82 deletions include/cRIO/TableLoader.h

This file was deleted.

62 changes: 0 additions & 62 deletions src/LSST/cRIO/TableLoader.cpp

This file was deleted.

4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ clean:
# file targets
%.cpp.o: %.cpp.d
@echo '[CPP] $(patsubst %.d,%,$<)'
${co}$(CPP) $(BOOST_CPPFLAGS) $(CPP_FLAGS) -c -fmessage-length=0 -o $@ $(patsubst %.d,%,$<)
${co}$(CPP) $(CPP_FLAGS) -c -fmessage-length=0 -o $@ $(patsubst %.d,%,$<)

%.cpp.d: %.cpp
@echo '[DPP] $<'
${co}$(CPP) $(BOOST_CPPFLAGS) $(CPP_FLAGS) -M $< -MF $@ -MT '$(patsubst %.cpp,%.o,$<) $@'
${co}$(CPP) $(CPP_FLAGS) -M $< -MF $@ -MT '$(patsubst %.cpp,%.o,$<) $@'
17 changes: 10 additions & 7 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ endif

TEST_CPPFLAGS := -I. \
-I"../include" \
$(shell pkg-config --cflags catch2-with-main)
$(shell pkg-config --cflags catch2-with-main $(silence)) \
$(shell pkg-config --cflags yaml-cpp $(silence))

CPP_FLAGS += $(shell pkg-config --libs catch2-with-main)
CPP_FLAGS += \
$(shell pkg-config --libs catch2-with-main $(silence)) \
$(shell pkg-config --libs yaml-cpp $(silence))

compile: libcRIOtest.a $(BINARIES) $(TEST_REQ_READLINE)

Expand All @@ -38,19 +41,19 @@ clean:

%.cpp.o: %.cpp.d
@echo '[CPP] $(patsubst %.d,%,$<)'
${co}$(CPP) $(BOOST_CPPFLAGS) $(CPP_FLAGS) $(TEST_CPPFLAGS) -c -fmessage-length=0 -o $@ -Wl,--gc-sections $(patsubst %.d,%,$<)
${co}$(CPP) $(CPP_FLAGS) $(TEST_CPPFLAGS) -c -fmessage-length=0 -o $@ -Wl,--gc-sections $(patsubst %.d,%,$<)

%.cpp.d: %.cpp
@echo '[DPP] $<'
${co}$(CPP) $(BOOST_CPPFLAGS) $(CPP_FLAGS) $(TEST_CPPFLAGS) -M $< -MF $@ -MT '$(patsubst %.cpp,%.o,$<) $@'
${co}$(CPP) $(CPP_FLAGS) $(TEST_CPPFLAGS) -M $< -MF $@ -MT '$(patsubst %.cpp,%.o,$<) $@'

$(TEST_REQ_READLINE): %: %.cpp.o ../lib/libcRIOcpp.a libcRIOtest.a
@echo '[TPR] $<'
${co}$(CPP) -o $@ $(LIBS_FLAGS) $(LIBS) $^ $(CPP_FLAGS) -lreadline # -lhistory
${co}$(CPP) -o $@ $(LIBS_FLAGS) $^ $(LIBS) $(CPP_FLAGS) -lreadline # -lhistory

${BINARIES}: %: %.cpp.o ../lib/libcRIOcpp.a libcRIOtest.a
$(BINARIES): %: %.cpp.o ../lib/libcRIOcpp.a libcRIOtest.a
@echo '[TPP] $<'
${co}$(CPP) -o $@ -Wl,--gc-sections $(LIBS_FLAGS) $(LIBS) $^ $(CPP_FLAGS)
${co}$(CPP) -o $@ -Wl,--gc-sections $(LIBS_FLAGS) $^ $(LIBS) $(CPP_FLAGS)

libcRIOtest.a: TestFPGA.cpp.o
@echo '[AR ] $@'
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ElectromechanicalPneumaticILC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ TEST_CASE("Test SSA force set", "[ElectromechanicalPneumaticILC]") {
REQUIRE_NOTHROW(ilc.processResponse(response.getBuffer(), response.getLength()));

REQUIRE(ilc.primaryForce == Approx(31.45));
REQUIRE(isnan(ilc.secondaryForce));
REQUIRE(std::isnan(ilc.secondaryForce));
}

TEST_CASE("Test DAA force set", "[ElectromechanicalPneumaticILC]") {
Expand Down Expand Up @@ -197,7 +197,7 @@ TEST_CASE("Test SAA force actuator readout", "[ElectromechanicalPneumaticILC]")
REQUIRE_NOTHROW(ilc.processResponse(response.getBuffer(), response.getLength()));

REQUIRE(ilc.primaryForce == Approx(13.7));
REQUIRE(isnan(ilc.secondaryForce));
REQUIRE(std::isnan(ilc.secondaryForce));
}

TEST_CASE("Test DAA force actuator readout", "[ElectromechanicalPneumaticILC]") {
Expand Down

0 comments on commit 336fa2d

Please sign in to comment.