Skip to content

Continuous Integration

Southclaws edited this page Mar 9, 2018 · 4 revisions

You can use sampctl to easily add continuous integration to Pawn packages.

Because sampctl handles the downloading of the compiler and all dependencies, if your project is set up as a Pawn package already then it's very simply to get it running on a CI service such as TravisCI.

TravisCI

Add the following .travis.yml to your repository:

language: cpp
sudo: enabled
install:
- curl https://raw.githubusercontent.com/Southclaws/sampctl/master/install-deb.sh | sh
- sudo dpkg --add-architecture i386
- sudo apt update && sudo apt install -y g++-multilib
script:
- sampctl package ensure
- sampctl package build
- sampctl package run

The install section simply installs sampctl, activates 32 bit architecture for dpkg and installs g++-multilib to enable executing 32 bit binaries (for the compiler).

Make sure your package is set up for y_testing so sampctl can properly interpret the output - if the tests fail, sampctl returns a non-zero exit code which tells TravisCI to mark the test as "failed".

For more information, see the documentation on testing and runtime modes.

Clone this wiki locally