Skip to content

Commit

Permalink
Set up for GitHub CI and Maven Central.
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamkirby committed Apr 23, 2020
1 parent 338b128 commit f24c77f
Show file tree
Hide file tree
Showing 13 changed files with 202 additions and 45 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

# Release jar files to Maven Central repository
- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.gpg_private_key }}
gpg_passphrase: ${{ secrets.gpg_passphrase }}
nexus_username: ${{ secrets.nexus_username }}
nexus_password: ${{ secrets.nexus_password }}

# Submit code coverage information to codecov.io
- name: Codecov
uses: codecov/codecov-action@v1.0.6
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
# population-records
# population-records

This project provides some Java utility classes for manipulating population records as encrypted datasets, using the [ciesvium](/stacs-srg/ciesvium) package.

![Java CI with Maven](https://github.com/stacs-srg/population-records/workflows/Java%20CI%20with%20Maven/badge.svg)
[![javadoc](https://javadoc.io/badge2/com.github.stacs-srg/population-records/javadoc.svg)](https://javadoc.io/doc/com.github.stacs-srg/ciesvium)
[![codecov](https://codecov.io/gh/stacs-srg/population-records/branch/master/graph/badge.svg)](https://codecov.io/gh/stacs-srg/ciesvium)
[![Maintainability](https://api.codeclimate.com/v1/badges/127f0819b34286df2307/maintainability)](https://codeclimate.com/github/stacs-srg/ciesvium/maintainability)

## Usage via maven
```
<dependency>
<groupId>com.github.stacs-srg</groupId>
<artifactId>population-records</artifactId>
<version>1.0.0</version>
</dependency>
```

## See also

* [API documentation](https://javadoc.io/doc/com.github.stacs-srg/population-records)
* [relevant Maven goals](https://github.com/stacs-srg/hub/tree/master/maven) (private)
52 changes: 33 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,46 +1,60 @@
<!--
Copyright 2020 Systems Research Group, University of St Andrews:
<https://github.com/stacs-srg>
This file is part of the module population-records.
population-records is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
population-records is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with population-records. If not, see
<http://www.gnu.org/licenses/>.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>uk.ac.standrews.cs</groupId>
<groupId>com.github.stacs-srg</groupId>
<artifactId>common-pom</artifactId>
<version>3.0-SNAPSHOT</version>
<version>1.0.1</version>
</parent>

<artifactId>population-records</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>population-records</name>

<description>Population Records</description>
<description>Utilities for manipulating population records</description>
<url>https://stacs-srg.github.io/ciesvium/</url>
<inceptionYear>2018</inceptionYear>

<scm>
<connection>scm:git:git://github.com/stacs-srg/population-records.git</connection>
<developerConnection>scm:git:ssh://github.com:stacs-srg/population-records.git</developerConnection>
<url>https://github.com/stacs-srg/population-records/tree/master</url>
</scm>

<dependencies>

<dependency>
<groupId>uk.ac.standrews.cs</groupId>
<groupId>com.github.stacs-srg</groupId>
<artifactId>storr</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0.1</version>
</dependency>

<dependency>
<groupId>uk.ac.standrews.cs</groupId>
<groupId>com.github.stacs-srg</groupId>
<artifactId>ciesvium</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0.0</version>
</dependency>

</dependencies>

<repositories>

<!-- This has to be replicated from the parent POM so the parent POM can be found. -->
<repository>
<id>uk.ac.standrews.cs.maven.repository</id>
<name>School of Computer Science Maven Repository</name>
<url>https://maven.cs.st-andrews.ac.uk/</url>
</repository>

</repositories>

</project>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* Copyright 2017 Systems Research Group, University of St Andrews:
* Copyright 2020 Systems Research Group, University of St Andrews:
* <https://github.com/stacs-srg>
*
* This file is part of the module linkage-java.
* This file is part of the module population-records.
*
* linkage-java is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* population-records is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* linkage-java is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* population-records is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with linkage-java. If not, see
* You should have received a copy of the GNU General Public License along with population-records. If not, see
* <http://www.gnu.org/licenses/>.
*/
package uk.ac.standrews.cs.population_records;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Systems Research Group, University of St Andrews:
* <https://github.com/stacs-srg>
*
* This file is part of the module population-records.
*
* population-records is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* population-records is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with population-records. If not, see
* <http://www.gnu.org/licenses/>.
*/
package uk.ac.standrews.cs.population_records;

import uk.ac.standrews.cs.population_records.record_types.Birth;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* Copyright 2017 Systems Research Group, University of St Andrews:
* Copyright 2020 Systems Research Group, University of St Andrews:
* <https://github.com/stacs-srg>
*
* This file is part of the module linkage-java.
* This file is part of the module population-records.
*
* linkage-java is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* population-records is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* linkage-java is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* population-records is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with linkage-java. If not, see
* You should have received a copy of the GNU General Public License along with population-records. If not, see
* <http://www.gnu.org/licenses/>.
*/
package uk.ac.standrews.cs.population_records;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* Copyright 2017 Systems Research Group, University of St Andrews:
* Copyright 2020 Systems Research Group, University of St Andrews:
* <https://github.com/stacs-srg>
*
* This file is part of the module linkage-java.
* This file is part of the module population-records.
*
* linkage-java is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* population-records is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* linkage-java is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* population-records is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with linkage-java. If not, see
* You should have received a copy of the GNU General Public License along with population-records. If not, see
* <http://www.gnu.org/licenses/>.
*/
package uk.ac.standrews.cs.population_records.record_types;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* Copyright 2017 Systems Research Group, University of St Andrews:
* Copyright 2020 Systems Research Group, University of St Andrews:
* <https://github.com/stacs-srg>
*
* This file is part of the module linkage-java.
* This file is part of the module population-records.
*
* linkage-java is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* population-records is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* linkage-java is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* population-records is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with linkage-java. If not, see
* You should have received a copy of the GNU General Public License along with population-records. If not, see
* <http://www.gnu.org/licenses/>.
*/
package uk.ac.standrews.cs.population_records.record_types;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* Copyright 2017 Systems Research Group, University of St Andrews:
* Copyright 2020 Systems Research Group, University of St Andrews:
* <https://github.com/stacs-srg>
*
* This file is part of the module linkage-java.
* This file is part of the module population-records.
*
* linkage-java is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* population-records is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* linkage-java is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* population-records is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with linkage-java. If not, see
* You should have received a copy of the GNU General Public License along with population-records. If not, see
* <http://www.gnu.org/licenses/>.
*/
package uk.ac.standrews.cs.population_records.record_types;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Systems Research Group, University of St Andrews:
* <https://github.com/stacs-srg>
*
* This file is part of the module population-records.
*
* population-records is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* population-records is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with population-records. If not, see
* <http://www.gnu.org/licenses/>.
*/
package uk.ac.standrews.cs.population_records.record_types;

import uk.ac.standrews.cs.storr.impl.LXP;
Expand Down
16 changes: 16 additions & 0 deletions src/main/resources/license-custom-style.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<additionalHeaders xmlns="http://exslt.org/common">
<java_style>
<!-- This custom style is used to override the default formatting for Java files,
which uses Javadoc format, therefore causing confusion with the actual class-level
Javadoc. This format puts a single asterix in the first line rather than two. -->
<firstLine>/*</firstLine>
<beforeEachLine> * </beforeEachLine>
<endLine> */</endLine>
<firstLineDetectionPattern>(\s|\t)*/\*.*$</firstLineDetectionPattern>
<lastLineDetectionPattern>.*\*/(\s|\t)*$</lastLineDetectionPattern>
<allowBlankLines>false</allowBlankLines>
<isMultiline>true</isMultiline>
<padLines>false</padLines>
</java_style>
</additionalHeaders>
14 changes: 14 additions & 0 deletions src/main/resources/license-template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright 2020 Systems Research Group, University of St Andrews:
<https://github.com/stacs-srg>

This file is part of the module ${project.name}.

${project.name} is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.

${project.name} is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ${project.name}. If not, see
<http://www.gnu.org/licenses/>.
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Systems Research Group, University of St Andrews:
* <https://github.com/stacs-srg>
*
* This file is part of the module population-records.
*
* population-records is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* population-records is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with population-records. If not, see
* <http://www.gnu.org/licenses/>.
*/
package uk.ac.standrews.cs.population_records;

import org.junit.Test;
Expand Down

0 comments on commit f24c77f

Please sign in to comment.