Skip to content

Commit

Permalink
Merge pull request #18 from GENtle-persons/smoe-CI-default
Browse files Browse the repository at this point in the history
Running C/C++ build as an action.
  • Loading branch information
magnusmanske authored Aug 22, 2023
2 parents e0483ba + 8f904bd commit 2f23679
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 41 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: C/C++ CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: installing non-GUI dependencies
run: sudo apt update && sudo apt install default-libmysqlclient-dev libsqlite3-dev libtinyxml-dev
- name: installing wxWidgets
run: sudo apt install libwxgtk3.2-dev || sudo apt install libwxgtk3.0-gtk3-dev || sudo apt install libwxgtk3.0-dev
- name: remove local redundancy to build-deps
run: rm -f mysql* sqlite* && rm -rf clustalw tinyxml
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure
- name: make
run: make
2 changes: 1 addition & 1 deletion GenBank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define TAG_COMPLEMENT 1

/// \brief The item type names
char* gb_item_type[VIT_TYPES] =
const char * const gb_item_type[VIT_TYPES] =
{
"",
"gene",
Expand Down
7 changes: 4 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ bitmaps/plasmid_circular.bmp \
bitmaps/print.bmp \
bitmaps/scissors.bmp

GENtle_LDADD = $(WX_LIBS) -L/usr/lib -lsqlite3 -ltinyxml
GENtle_LDFLAGS =
GENtle_SOURCES = TXMLfile.cpp \
GENtle_LDADD = $(WX_LIBS) $(LDFLAGS) -L/usr/lib -lsqlite3 -ltinyxml
GENtle_LDFLAGS = $(LDFLAGS)
GENtle_SOURCES = \
TXMLfile.cpp \
TVectorTree.cpp \
TVirtualGel.cpp \
TVectorEditorItems.cpp \
Expand Down
1 change: 1 addition & 0 deletions PlasmidCanvasHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ wxMenu *PlasmidCanvas::invokeVectorPopup ( wxPoint pt , bool doreturn , int pos

PopupMenu ( cm , pt ) ;
delete cm ;

return (wxMenu *) NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion bitmaps/copy.xpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XPM */
static char *copy_xpm[] = {
static const char * const copy_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 4 1",
" c None",
Expand Down
2 changes: 1 addition & 1 deletion bitmaps/cut.xpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XPM */
static char *cut_xpm[] = {
static const char * const cut_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 3 1",
" c None",
Expand Down
2 changes: 1 addition & 1 deletion bitmaps/help.xpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XPM */
static char *help_xpm[] = {
static const char * const help_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 4 1",
" c None",
Expand Down
2 changes: 1 addition & 1 deletion bitmaps/new.xpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XPM */
static char *new_xpm[] = {
static const char * const new_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 3 1",
" c None",
Expand Down
2 changes: 1 addition & 1 deletion bitmaps/open.xpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XPM */
static char *open_xpm[] = {
static const char * const open_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 5 1",
" c None",
Expand Down
2 changes: 1 addition & 1 deletion bitmaps/paste.xpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XPM */
static char *paste_xpm[] = {
static const char * const paste_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 6 1",
" c None",
Expand Down
2 changes: 1 addition & 1 deletion bitmaps/preview.xpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XPM */
static char *preview_xpm[] = {
static const char * const preview_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 5 1",
" c Black",
Expand Down
2 changes: 1 addition & 1 deletion bitmaps/print.xpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XPM */
static char *print_xpm[] = {
static const char * const print_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 5 1",
" c None",
Expand Down
2 changes: 1 addition & 1 deletion bitmaps/save.xpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XPM */
static char *save_xpm[] = {
static const char * const save_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 15 4 1",
" c None",
Expand Down
28 changes: 5 additions & 23 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ dnl AC_ARG_PROGRAM
dnl AC_PROG_INSTALL
dnl AC_PROG_LIBTOOL

WITH_MYSQL()


dnl check for programs we use
AC_PROG_CXX
AC_PROG_CC

WITH_MYSQL()

WXCONFIG=wx-config
AC_ARG_WITH([wxconfig],
Expand All @@ -52,6 +50,7 @@ CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $WX_CPPFLAGS"

AC_SUBST(WX_LIBS)
AC_SUBST(LDFLAGS)

dnl Clarify inclusion/exclusion of ClustalW source tree

Expand All @@ -61,20 +60,6 @@ if test "x$with_clustalw" != "xno"; then
AC_DEFINE([USE_EXTERNAL_CLUSTALW], [1], [Define to use the clustalw binary in your PATH for sequence alignments from within GENtle.])
fi

dnl Clarify location of tinyxml

TINYXML=""
AC_ARG_WITH([tinyxml],AS_HELP_STRING([--with-tinyxml],[Use externally provided tinyXML library instead of the version shipping with source tree (default=/usr).]),[],[with_tinyxml="/usr"])
if test "x$with_tinyxml" != "x"; then
if test "x$with_tinyxml" != "xno"; then
AC_DEFINE([USE_EXTERNAL_TINYXML], [/usr], [Define to use the clustalw binary in your PATH for sequence alignments from within GENtle.])
else
TINYXML=""
fi
else
AC_DEFINE([USE_EXTERNAL_TINYXML], [$withval], [Define to use the clustalw binary in your PATH for sequence alignments from within GENtle.])
fi

dnl Set debug flags

AC_ARG_ENABLE(debug,AS_HELP_STRING([--enable-debug],[Enable debug build]),
Expand Down Expand Up @@ -112,9 +97,6 @@ else
echo "MySQL Disabled"
fi

if [[ "x$with_tinyxml" != "xno" ]]; then
echo "tinyXML External library ($with_tinyxml)"
else
echo "tinyXML Self-compiled library ($with_tinyxml)"
fi

echo "CPPFLAGS=$CPPFLAGS"
echo "CXXFLAGS=$CXXFLAGS"
echo "LDFLAGS=$LDFLAGS"
5 changes: 1 addition & 4 deletions main.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,8 @@ using namespace std ;

// Don't you *EVER* turn this on again!!!!
//#define TIXML_USE_STL
#ifndef USE_EXTERNAL_TINYXML
#include "tinyxml/tinyxml.h"
#else

#include <tinyxml.h>
#endif

#include <wx/wx.h>
#include <wx/toolbar.h>
Expand Down
2 changes: 1 addition & 1 deletion mondrian.xpm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* XPM */
static char *mondrian_xpm[] = {
static const char * const mondrian_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 6 1",
" c Black",
Expand Down

0 comments on commit 2f23679

Please sign in to comment.