Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches: [master]
pull_request:

jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
autoconf automake libtool pkg-config \
libboost-dev libboost-date-time-dev libboost-program-options-dev \
libcppunit-dev libcurl4-openssl-dev libxml2-dev \
xmlto

- name: Configure
env:
CC: ${{ matrix.compiler == 'gcc' && 'gcc' || 'clang' }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}
run: ./autogen.sh

- name: Build
run: make -j$(nproc)

- name: Test
run: make check

macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
brew install \
autoconf automake libtool pkg-config \
boost cppunit curl libxml2 \
docbook docbook-xsl xmlto

- name: Configure
run: |
export PKG_CONFIG_PATH="$(brew --prefix curl)/lib/pkgconfig:$(brew --prefix libxml2)/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
./autogen.sh --with-boost=$(brew --prefix boost)

- name: Build
env:
XML_CATALOG_FILES: /opt/homebrew/etc/xml/catalog
run: make -j$(sysctl -n hw.ncpu)

- name: Test
env:
XML_CATALOG_FILES: /opt/homebrew/etc/xml/catalog
run: make check
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![Build Status](https://travis-ci.org/tdf/libcmis.svg?branch=master)](https://travis-ci.org/tdf/libcmis)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/tdf/libcmis.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/tdf/libcmis/alerts/)
[![CI](https://github.com/tdf/libcmis/actions/workflows/ci.yml/badge.svg)](https://github.com/tdf/libcmis/actions/workflows/ci.yml)
[![Coverity Scan](https://scan.coverity.com/projects/17516/badge.svg)](https://scan.coverity.com/projects/tdf-libcmis)

Objective
Expand Down
5 changes: 4 additions & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

touch ChangeLog

LIBTOOLIZE=libtoolize
command -v glibtoolize >/dev/null 2>&1 && LIBTOOLIZE=glibtoolize

if [ ! -e ltmain.sh ]; then
libtoolize
$LIBTOOLIZE
fi

aclocal -I m4
Expand Down
25 changes: 16 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,6 @@ AC_ARG_ENABLE([werror],
[enable_werror="$enableval"],
[enable_werror=yes]
)
AS_IF([test x"$enable_werror" != "xno"], [
CFLAGS="$CFLAGS -Werror"
CXXFLAGS="$CXXFLAGS -Werror"
])
AS_IF([test x"$GCC" = xyes], [
# Be tough with warnings and produce less careless code
CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wendif-labels -Wextra"
CXXFLAGS="$CXXFLAGS -Wall -pedantic -Weffc++ -Wshadow -Wendif-labels -Wextra -Wsign-promo -Woverloaded-virtual -Wnon-virtual-dtor -Wsign-promo"
])

# Check for curl
PKG_CHECK_MODULES(CURL, [libcurl >= 7.29])
Expand Down Expand Up @@ -179,6 +170,10 @@ BOOST_UUID
AS_IF([test "x$enable_client" != "xno"], [
BOOST_PROGRAM_OPTIONS
])
# Treat boost headers as system headers so -Wshadow / -Weffc++ etc.
# inside them do not break the build under -Werror. boost.m4 emits
# -I$prefix; rewrite to -isystem $prefix.
BOOST_CPPFLAGS=`echo "$BOOST_CPPFLAGS" | sed 's|-I|-isystem |g'`
AC_SUBST(BOOST_CPPFLAGS)

# Checks for header files.
Expand All @@ -192,6 +187,18 @@ AC_TYPE_SIZE_T

# Checks for library functions.

# Apply strict warning flags only after the autoconf probes, so the
# probes themselves (e.g. boost.m4's date_time test program) are not
# rejected under -Werror by warnings like -Wunused-variable.
AS_IF([test x"$enable_werror" != "xno"], [
CFLAGS="$CFLAGS -Werror"
CXXFLAGS="$CXXFLAGS -Werror"
])
AS_IF([test x"$GCC" = xyes], [
CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wendif-labels -Wextra"
CXXFLAGS="$CXXFLAGS -Wall -pedantic -Weffc++ -Wshadow -Wendif-labels -Wextra -Wsign-promo -Woverloaded-virtual -Wnon-virtual-dtor -Wsign-promo"
])

AC_CONFIG_FILES([
Makefile
doc/cmis-client.xml
Expand Down
2 changes: 1 addition & 1 deletion inc/libcmis-c/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
extern "C" {
#endif

LIBCMIS_C_API libcmis_ErrorPtr libcmis_error_create( );
LIBCMIS_C_API libcmis_ErrorPtr libcmis_error_create( void );
LIBCMIS_C_API void libcmis_error_free( libcmis_ErrorPtr e );

LIBCMIS_C_API const char* libcmis_error_getMessage( libcmis_ErrorPtr e );
Expand Down
2 changes: 1 addition & 1 deletion inc/libcmis-c/property.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
extern "C" {
#endif

LIBCMIS_C_API libcmis_vector_property_Ptr libcmis_vector_property_create( );
LIBCMIS_C_API libcmis_vector_property_Ptr libcmis_vector_property_create( void );
LIBCMIS_C_API void libcmis_vector_property_free( libcmis_vector_property_Ptr vector );
LIBCMIS_C_API size_t libcmis_vector_property_size( libcmis_vector_property_Ptr vector );
LIBCMIS_C_API libcmis_PropertyPtr libcmis_vector_property_get( libcmis_vector_property_Ptr vector, size_t i );
Expand Down
10 changes: 5 additions & 5 deletions inc/libcmis-c/session-factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ extern "C" {
LIBCMIS_C_API void libcmis_setAuthenticationCallback( libcmis_authenticationCallback callback );
LIBCMIS_C_API void libcmis_setCertValidationCallback( libcmis_certValidationCallback callback );
LIBCMIS_C_API void libcmis_setOAuth2AuthCodeProvider( libcmis_oauth2AuthCodeProvider callback );
LIBCMIS_C_API libcmis_oauth2AuthCodeProvider libcmis_getOAuth2AuthCodeProvider( );
LIBCMIS_C_API libcmis_oauth2AuthCodeProvider libcmis_getOAuth2AuthCodeProvider( void );

LIBCMIS_C_API void libcmis_setProxySettings(
char* proxy,
char* noProxy,
char* proxyUser,
char* proxyPass );

LIBCMIS_C_API const char* libcmis_getProxy( );
LIBCMIS_C_API const char* libcmis_getNoProxy( );
LIBCMIS_C_API const char* libcmis_getProxyUser( );
LIBCMIS_C_API const char* libcmis_getProxyPass( );
LIBCMIS_C_API const char* libcmis_getProxy( void );
LIBCMIS_C_API const char* libcmis_getNoProxy( void );
LIBCMIS_C_API const char* libcmis_getProxyUser( void );
LIBCMIS_C_API const char* libcmis_getProxyPass( void );

LIBCMIS_C_API libcmis_SessionPtr libcmis_createSession(
char* bindingUrl,
Expand Down
9 changes: 0 additions & 9 deletions lgtm.yml

This file was deleted.

Loading
Loading