Skip to content

Commit

Permalink
Merge pull request #45 from BU-Tools/release/v2.0
Browse files Browse the repository at this point in the history
Release/v2.0
  • Loading branch information
dgastler authored Sep 20, 2022
2 parents 37cf29e + b1cc253 commit 64e9015
Show file tree
Hide file tree
Showing 66 changed files with 2,142 additions and 9,161 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/butool-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: BUTool StatusDisplay CI

# Control when to run the CI job
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout BUTool repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: Checkout GenericDSAT plugin and submodules
run: |
git clone --branch develop \
--recursive \
--depth 1 \
--shallow-submodules \
https://gitlab.com/BU-EDF/GenericDSATDevice_plugin.git
- name: Install dependencies
run: |
ls -lah .
echo "Working directory: ${PWD}"
sudo apt install \
libboost-regex-dev \
build-essential \
zlib1g-dev \
libreadline-dev \
libboost-dev \
libboost-program-options-dev \
libncurses5-dev
- name: Build BUTool
run: make

- name: Build GenericDSAT plugin
working-directory: ./GenericDSATDevice_plugin
run: |
BUTOOL_PATH=$(realpath ../)
echo "Setting up environment with BUTOOL_PATH=${BUTOOL_PATH}"
source env.sh ${BUTOOL_PATH}
make
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> ${GITHUB_ENV}
echo "BUTOOL_PATH=${BUTOOL_PATH}" >> ${GITHUB_ENV}
- name: Run StatusDisplay test
working-directory: ./GenericDSATDevice_plugin
env:
BUTOOL_PATH: ${{ env.BUTOOL_PATH }}
LD_LIBRARY_PATH: ${{ env.LD_LIBRARY_PATH }}
run: |
./run_BUTool_test.sh
- name: Cleanup GenericDSAT plugin
working-directory: ./GenericDSATDevice_plugin
run: make clean

- name: Cleanup BUTool
run: make clean


18 changes: 15 additions & 3 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ export PATH=$PWD/bin/tool/:$PATH

#setup LD_LIBRARY_PATHs for BUTool and any plugins
#must be source AFTER build finishes
#plugin_paths=$(find $PWD/plugins/* -type d | xargs)
plugin_paths=$(ls -1 -d $PWD/plugins/*/ | xargs)

# Add BUTool's lib/ directory to LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH

# Add the plugin libraries to the LD_LIBRARY_PATH

#plugin_paths=$(find $PWD/plugins/* -type d | xargs)
plugin_paths=$(ls -1 -d $PWD/plugins/* | xargs)

for path in $plugin_paths
do
export LD_LIBRARY_PATH=$path/lib:$LD_LIBRARY_PATH
# Check if this is a directory
if [ -d $path ]; then
export LD_LIBRARY_PATH=$path/lib:$LD_LIBRARY_PATH
fi
done

# Add BUException submodule to the LD_LIBRARY_PATH
EXCEPTION_PATH="$PWD/external/BUException/lib"
export LD_LIBRARY_PATH=$EXCEPTION_PATH:$LD_LIBRARY_PATH
2 changes: 1 addition & 1 deletion external/BUException
Submodule BUException updated from c1452d to e385c8
6 changes: 3 additions & 3 deletions include/BUTextIO/BUTextController.hh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef __BU_TEXT_CONTROLLER_HH__
#define __BU_TEXT_CONTROLLER_HH__

#include "Print.hh"
#include "PrintLevel.hh"
#include <BUTextIO/Print.hh>
#include <BUTextIO/PrintLevel.hh>

#include <vector>
#include <iostream>
Expand All @@ -23,4 +23,4 @@ public:
void ResetStreams();
};

#endif
#endif
5 changes: 3 additions & 2 deletions include/BUTextIO/BUTextIO.hh
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#ifndef __BU_TEXT_IO_HH__
#define __BU_TEXT_IO_HH__

#include "BUTextController.hh"
#include <BUTextIO/BUTextController.hh>

class BUTextIO {
public:
BUTextIO();
virtual ~BUTextIO() {};
~BUTextIO() {};
void AddOutputStream(Level::level level, std::ostream *os);
void RemoveOutputStream(Level::level level, std::ostream* os);
void ResetStreams(Level::level level);
void Print(Level::level level, const char *fmt, ...);
void Print(Level::level level, const char *fmt, va_list argp);
private:
std::vector<BUTextController> controllers;
};
Expand Down
2 changes: 1 addition & 1 deletion include/BUTool/CLI.hh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <readline/history.h>

//helper for auto-complete
#include "CLIHelper.hh"
#include <BUTool/CLIHelper.hh>

//std::string LimitStringLines(std::string, size_t, size_t);

Expand Down
Loading

0 comments on commit 64e9015

Please sign in to comment.