<pre>
  PIP: PIP-0022
  Title: Continuous Integration
  Type: Backend | Front-End | Process
  Impact: None - Other
  Author: Benjamin Ansbach <i>&lt;benjaminansbach@gmail.com&gt;</i>
  Comments-URI: 
  Status: Draft
  Created: 2018-07-12
</pre>

## Summary

PascalCoin builds are created manually. This proposal aims to add a continuous integration implementation for the PascalCoin repository focusing on automated builds of the PascalCoin software. The integration can later be extended to provide other automated tasks like automated testing of the software etc.

## Motivation

It is important to give interested community members as well as non-core developers without background in the Pascal language the possibility to test or use features which are not released for the MAINNET yet (e.g. Wallet optimizations, improved JSON RPC API, ..). This is not possible right now, as one needs to compile the source on it's own.

## Specification

The repository is hosted on github.com. Github provides several integrations from a number of CI-providers. The plan is to use the service of [travis CI](http://www.travis-ci.com) which has an integration service available for github.com and is free for open source projects.

In addition, travis CI is proved to work for the PascalCoin environment as there are already reference implementations for libraries written in pascal. This will ease the first steps.

### Build types

Each build process will compile and pack the project for different targets (windows, linux, osx). 

MAINNET builds are reserved for git tags. 

TESTNET builds are reserved for branches and will be executed with each push to a specific branch (master for now).

Tag-Based MAINNET builds will be pushed to the projects releases page automatically (https://github.com/PascalCoin/PascalCoin/releases).

### Filename structure

The structure of the resulting files can be defined as follows:

`PascalCoin_($branch|$tag)_(TESTNET|MAINNET)_$target[.$target_compress_extension]`

..where 

- `$branch` is the name of the branch
- `$tag` is the version of the tag
- `$target` is the compile target
- `$target_compress_extension` is the extension of the used compression (zip, .tar.gz, ...)

Branch based builds are short-living builds. With each new push to a branch, the development-releases will be overwritten.

### Forks

Forks of the project can use the same implementation, since the configuration for the builds is saved inside of the repository.

### Hosting

Tag-Based releases will continue to be hosted on github.com and will contain a list of sha checksums while branch-based releases will be hosted on https://development.pascalcoin.org

## Rationale

Manual builds are error-prone. Automatic builds of development-releases will drastically improve the quality of the production releases, because users will have the chance to test new implementations or bug-fixes prior a definite production release.

## Backwards Compatibility

This PIP does not have any effect on the compatibility.

## Reference Implementation

None for PascalCoin but for pascal projects with travis. See some of these repositories: https://github.com/Xor-el

## Links

https://travis-ci.org

https://travis-ci.com/plans

https://docs.travis-ci.com/user/deployment/releases/
