From ecd40943e2a5ddbe8ace995660f7b2e822df4f5e Mon Sep 17 00:00:00 2001 From: Jens Maus Date: Tue, 22 Nov 2016 10:46:01 +0100 Subject: [PATCH 1/3] added Travis-CI and CodeClimate code check support. --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index af98e1e..878b000 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -# An ISO 'C' (1994) compliant runtime library for the Amiga +# clib2 – An ISO 'C' (1994) compliant runtime library for the Amiga + +[![Build Status](https://travis-ci.org/adtools/clib2.svg?branch=master)](https://travis-ci.org/adtools/clib2) +[![Code Climate](https://codeclimate.com/github/adtools/clib2/badges/gpa.svg)](https://codeclimate.com/github/adtools/clib2) +[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) +[![Github Issues](http://githubbadges.herokuapp.com/adtools/clib2/issues.svg)](https://github.com/adtools/clib2/issues) ## What is this? From 2df2393b81b665c35c7c6b286bcdc522894cd39b Mon Sep 17 00:00:00 2001 From: Jens Maus Date: Tue, 22 Nov 2016 10:50:03 +0100 Subject: [PATCH 2/3] minor tweak --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 878b000..ff55c2d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# clib2 – An ISO 'C' (1994) compliant runtime library for the Amiga +# clib2 – An ISO 'C' (1994) compliant runtime library for AmigaOS [![Build Status](https://travis-ci.org/adtools/clib2.svg?branch=master)](https://travis-ci.org/adtools/clib2) [![Code Climate](https://codeclimate.com/github/adtools/clib2/badges/gpa.svg)](https://codeclimate.com/github/adtools/clib2) From 525e1931134385f20a73772ff198a31682f659b5 Mon Sep 17 00:00:00 2001 From: Jens Maus Date: Tue, 22 Nov 2016 10:52:01 +0100 Subject: [PATCH 3/3] added missing .codeclimate.yml and .travis.yml --- .codeclimate.yml | 14 ++++++++++++++ .travis.yml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .codeclimate.yml create mode 100644 .travis.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..84101a4 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,14 @@ +--- +engines: + duplication: + enabled: false + fixme: + enabled: true + markdownlint: + enabled: true +ratings: + paths: + - "**.c" + - "**.h" + - "**.l" + - "**.md" diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..d76d4a5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,36 @@ +sudo: required +dist: trusty + +language: c + +# download and install our required cross compilers +install: + # Make sure we can install i386 packages as some adtools binaries + # requires i386 libraries being installed to work in the 64bit env + # of Travis + - sudo dpkg --add-architecture i386 + - sudo apt-get -qq update || true + - sudo apt-get -qq install libc6:i386 + # Install all adtools related stuff we need + - curl -L https://dl.bintray.com/jens-maus/adtools/adtools-utils.tar.bz2 | sudo tar xj -C / + - if [[ ${BUILD} =~ os3|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-m68k-amigaos.tar.bz2 | sudo tar xj -C / ; fi + - if [[ ${BUILD} =~ os4|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-ppc-amigaos.tar.bz2 | sudo tar xj -C / ; fi + - if [[ ${BUILD} =~ mos|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-ppc-morphos.tar.bz2 | sudo tar xj -C / ; fi + - if [[ ${BUILD} =~ aros-ppc|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-ppc-aros.tar.bz2 | sudo tar xj -C / ; fi + - if [[ ${BUILD} =~ aros-i386|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-i386-aros.tar.bz2 | sudo tar xj -C / ; fi + - if [[ ${BUILD} =~ aros-x86_64|release ]]; then curl -L https://dl.bintray.com/jens-maus/adtools/adtools-x86_64-aros.tar.bz2 | sudo tar xj -C / ; fi + - if [[ ${BUILD} =~ mingw32|release ]]; then sudo apt-get -qq install binutils-mingw-w64-i686 gcc-mingw-w64-i686 ; fi + +# set the PATH variable to the directories the cross compilers are installed. +before_script: + - export PATH=/usr/local/amiga/bin:/opt/m68k-amigaos/bin:/opt/ppc-amigaos/bin:/opt/ppc-morphos/bin:${PATH} + +# specify a list of variables to test (here we test the build for our supported +# list of operating systems). +env: + - BUILD="-f GNUmakefile.68k OS=os3" + - BUILD="-f GNUmakefile.os4 OS=os4" + +# the build command to execute for each test +script: + - make -C library -j1 ${BUILD}