Skip to content

Commit

Permalink
Merge pull request #110 from SchrodingersGat/ci-build
Browse files Browse the repository at this point in the history
* Add some more basic plugins

* Ensure filter plugins get loaded

* Build

* Build for windows

* mingw on windows

* Fix lib target for linuxz

* Use mingw32-make

* Speicfy tools for windows build

* Tweak

* Another go

Ref: https://ddalcino.github.io/aqt-list-server/

* Add clean step

* Update build.yaml

Bump mingw tools version
  • Loading branch information
SchrodingersGat authored Dec 11, 2024
2 parents 2c387a9 + c06a863 commit fed8737
Show file tree
Hide file tree
Showing 18 changed files with 750 additions and 2 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Build lumberjack application and plugins

name: Build

on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types:
- created

jobs:
linux:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.8.1'
cache: true
- name: Build Qwt
run: |
cd qwt
qmake qwt.pro
make
sudo make install
- name: Build Lumberjack
run: |
qmake lumberjack.pro
make
- name: Build Plugins
run: |
cd plugins
qmake plugins.pro
make
windows:
runs-on: windows-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
aqtversion: '==3.1.*'
version: '6.8.1'
host: 'windows'
target: 'desktop'
arch: 'win64_mingw'
tools: 'tools_mingw1310'
cache: true
- name: Build Qwt
run: |
cd qwt
qmake qwt.pro
mingw32-make clean
mingw32-make
mingw32-make install
- name: Build Lumberjack
run: |
qmake lumberjack.pro
mingw32-make
- name: Build Plugins
run: |
cd plugins
qmake plugins.pro
mingw32-make
4 changes: 2 additions & 2 deletions lumberjack.pro
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ CONFIG(debug, debug|release) {
qwt/lib/qwtd.dll
} else {
dllFiles.files += \
qwt/lib/libqwtd.a
qwt/lib/libqwtd.so
}
} else {
win32 {
dllFiles.files += \
qwt/lib/qwt.dll
} else {
dllFiles.files += \
qwt/lib/libqwt.a
qwt/lib/libqwt.so
}
}

Expand Down
9 changes: 9 additions & 0 deletions plugins/csv_importer/lumberjack_csv_importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ bool LumberjackCSVImporter::loadDataFile(QStringList &errors)
bool LumberjackCSVImporter::processRow(int rowIndex, const QStringList &row, QStringList& errors)
{

// TODO: error messages
Q_UNUSED(errors)

if (rowIndex == m_options.rowHeaders)
{
return extractHeaders(rowIndex, row, errors);
Expand Down Expand Up @@ -194,6 +197,9 @@ bool LumberjackCSVImporter::extractHeaders(int rowIndex, const QStringList &row,
{
Q_UNUSED(rowIndex);

// TODO: Error messages
Q_UNUSED(errors);

m_headers.clear();

for (int ii = 0; ii < row.length(); ii++)
Expand Down Expand Up @@ -242,6 +248,9 @@ bool LumberjackCSVImporter::extractHeaders(int rowIndex, const QStringList &row,
*/
bool LumberjackCSVImporter::extractData(int rowIndex, const QStringList &row, QStringList &errors)
{
// TODO: Error messages
Q_UNUSED(errors)

double timestamp = 0;

QString text;
Expand Down
7 changes: 7 additions & 0 deletions plugins/offset_filter/offset_filter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "offset_filter.hpp"


OffsetFilter::OffsetFilter()
{
// TODO
}
31 changes: 31 additions & 0 deletions plugins/offset_filter/offset_filter.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef LUMBERJACK_CSV_IMPORTER_HPP
#define LUMBERJACK_CSV_IMPORTER_HPP

#include "offset_filter_global.h"
#include "plugin_filter.hpp"


/**
* @brief The ScaleOffsetFilter class provides simple scaling and offset functionality
*/
class CUSTOM_FILTER_EXPORT OffsetFilter : public FilterPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID FilterInterface_iid)
Q_INTERFACES(FilterPlugin)
public:
OffsetFilter();

// Base plugin functionality
virtual QString pluginName(void) const override { return m_name; }
virtual QString pluginDescription(void) const override { return m_description; }
virtual QString pluginVersion(void) const override { return m_version; }

protected:
const QString m_name = "Offset Filter";
const QString m_description = "Apply custom offset to a dataset";
const QString m_version = "0.1.0";

};

#endif // LUMBERJACK_CSV_IMPORTER_HPP
1 change: 1 addition & 0 deletions plugins/offset_filter/offset_filter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "Keys": [ "offset_filter" ] }
49 changes: 49 additions & 0 deletions plugins/offset_filter/offset_filter.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
QT += gui

TEMPLATE = lib
DEFINES += CSV_EXPORTER_LIBRARY

CONFIG += c++17
CONFIG -= debug_and_release

DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

INCLUDEPATH += \
../../src \
../../src/plugins

HEADERS += \
offset_filter_global.h \
offset_filter.hpp \
../../src/plugins/plugin_base.hpp \
../../src/plugins/plugin_filter.hpp \

SOURCES += \
offset_filter.cpp

# Default rules for deployment.
unix {
target.path = /usr/lib
}

# Specify output directory
CONFIG(debug, debug|release) {
CONFIG += debug
DESTDIR = build/debug

} else {
CONFIG += release
DESTDIR = build/release
}

RCC_DIR = $$DESDIR
MOC_DIR = $$DESTDIR/moc
OBJECTS_DIR = $$DESTDIR/objects

#Set the location for the generated ui_xxxx.h files
UI_DIR = build/ui

!isEmpty(target.path): INSTALLS += target

DISTFILES += \
offset_filter.json
Loading

0 comments on commit fed8737

Please sign in to comment.