Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Travis & Codecov support, update README.md #17

Merged
merged 1 commit into from
Sep 27, 2018
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
4 changes: 4 additions & 0 deletions .release
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
# This file is executed by the `release` script from
# https://github.com/gap-system/ReleaseTools
rm -rf .travis.yml .codecov.yml scripts
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,10 @@ addons:
apt_packages:
- libgmp-dev
- libreadline-dev
- libgmp-dev:i386
- libreadline-dev:i386
- gcc-multilib
- g++-multilib

matrix:
include:
- env: CFLAGS="-O2" CC=clang CXX=clang++
compiler: clang
- env: CFLAGS="-O2"
compiler: gcc
- env: ABI=32

branches:
only:
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[![Build Status](https://travis-ci.org/gap-packages/numericalsgps.svg?branch=master)](https://travis-ci.org/gap-packages/numericalsgps)
[![Code Coverage](https://codecov.io/github/gap-packages/numericalsgps/coverage.svg?branch=master&token=)](https://codecov.io/gh/gap-packages/numericalsgps)

The GAP 4 package `NumericalSgps` to compute with Numerical Semigroups
======================================================================
NumericalSgps
=============

`NumericalSgps` is a GAP package for computing with Numerical Semigroups.


Introduction
------------
Expand All @@ -16,7 +19,7 @@ The features of this package include
- perform several operations on numerical semigroups and ideals, namely: intersection, quotient by an integer, decompose into irreducible semigroups, add a special gap, ...;
-computing and testing membership to relevant families of numerical semigroups.

There is a manual in the sub-directory 'doc' written using the GAP package
There is a manual in the sub-directory `doc` written using the GAP package
gapdoc which describes the available functions in detail. The pdf, html
versions of the manual are also available there.

Expand Down
15 changes: 13 additions & 2 deletions scripts/build_gap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/env bash
#
# DO NOT EDIT THIS FILE!
#
# If you have any questions about this script, or think it is not general
# enough to cover your use case (i.e., you feel that you need to modify it
# anyway), please contact Max Horn <max.horn@math.uni-giessen.de>.
#
set -ex

# clone GAP into a subdirectory
Expand All @@ -23,8 +30,12 @@ make -j4 V=1
# connection is refused, to work around intermittent failures
make bootstrap-pkg-full WGET="wget -N --no-check-certificate --tries=5 --waitretry=5 --retry-connrefused"

# build some packages (default is to build 'io' and 'profiling',
# in order to generate coverage results)
# build some packages; default is to build 'io' and 'profiling', in order to
# generate coverage results. If you need to build additional packages (or for
# some reason need to build a custom version of io or profiling), please set
# the GAP_PKGS_TO_BUILD environment variable (e.g. in your .travis.yml), or
# directly call BuildPackages.sh from .travis.yml. For an example of the
# former, take a look at the cvec package.
cd pkg
for pkg in ${GAP_PKGS_TO_BUILD-io profiling}; do
../bin/BuildPackages.sh --strict $pkg*
Expand Down
16 changes: 13 additions & 3 deletions scripts/build_pkg.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
#!/usr/bin/env bash
#
# DO NOT EDIT THIS FILE!
#
# If you have any questions about this script, or think it is not general
# enough to cover your use case (i.e., you feel that you need to modify it
# anyway), please contact Max Horn <max.horn@math.uni-giessen.de>.
#
set -ex

# ensure coverage is turned on
export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
export LDFLAGS="$LDFLAGS -fprofile-arcs"

# adjust build flags for 32bit builds
if [[ $ABI = 32 ]]; then
export CFLAGS="$CFLAGS -m32"
export LDFLAGS="$LDFLAGS -m32"
fi

# build this package
# build this package, if necessary
if [[ -x autogen.sh ]]; then
./autogen.sh
./configure --with-gaproot=$GAPROOT
Expand All @@ -20,5 +28,7 @@ elif [[ -x configure ]]; then
make -j4
fi

# trick to allow the package directory to be used as a GAP root dir
ln -s . pkg
# set up a custom GAP root containing only this package, so that
# we can force GAP to load the correct version of this package
mkdir -p gaproot/pkg/
ln -s $PWD gaproot/pkg/
13 changes: 12 additions & 1 deletion scripts/gather-coverage.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
#!/usr/bin/env bash
#
# DO NOT EDIT THIS FILE!
#
# If you need to collect additional coverage data, please do so
# from your .travis.yml or a custom script.
#
# If you have any questions about this script, or think it is not general
# enough to cover your use case (i.e., you feel that you need to modify it
# anyway), please contact Max Horn <max.horn@math.uni-giessen.de>.
#
set -ex

# If we don't care about code coverage, do nothing
if [[ -n $NO_COVERAGE ]]; then
exit 0
fi

GAP="$GAPROOT/bin/gap.sh -l $PWD; --quitonbreak -q"
# start GAP with custom GAP root, to ensure correct package version is loaded
GAP="$GAPROOT/bin/gap.sh -l $PWD/gaproot; --quitonbreak -q"

# generate library coverage reports
$GAP -a 500M -m 500M -q <<GAPInput
Expand Down
16 changes: 14 additions & 2 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
#!/usr/bin/env bash
#
# DO NOT EDIT THIS FILE!
#
# If you need to run additional setup steps before the package tests,
# edit the run script in .travis.yml instead
#
# If you have any questions about this script, or think it is not general
# enough to cover your use case (i.e., you feel that you need to modify it
# anyway), please contact Max Horn <max.horn@math.uni-giessen.de>.
#
set -ex

GAP="$GAPROOT/bin/gap.sh -l $PWD; --quitonbreak"
# start GAP with custom GAP root, to ensure correct package version is loaded
GAP="$GAPROOT/bin/gap.sh -l $PWD/gaproot; --quitonbreak"

# unless explicitly turned off, we collect coverage data
# Unless explicitly turned off by setting the NO_COVERAGE environment variable,
# we collect coverage data
if [[ -z $NO_COVERAGE ]]; then
mkdir $COVDIR
GAP="$GAP --cover $COVDIR/test.coverage"
Expand Down