Travis CI currently has no official support for FreePascal. This repository demonstrates how FPC and Lazarus projects can be used in combination with Travis. There is support for building with multiple Lazarus releases on both Travis' Linux
and Mac OSX
platforms. Support for Windows (both win32
and win64
) is done using Wine.
./.travis.install.py
Sets up the environment by downloading and installing the proper FreePascal and Lazarus versions. Run this script in Travis' install
phase.
./.travis.yml
Custom Travis setup. Refer to their documentation for more information.
./my_lazarus_test*
Toy project demonstrating a possible test setup.
- Set up Travis CI for your repository
- Add
.travis.install.py
to your repository and run it in theinstall
phase.-
Execute the following command inside your repository:
git submodule add https://github.com/nielsAD/travis-lazarus.git travis-lazarus
-
Add the following lines to your
.travis.yml
file:sudo: required dist: trusty install: ./travis-lazarus/.travis.install.py
-
- [OPTIONAL] Modify settings to customize build versions.
-
Add (multiple)
LAZ_VER
entries to theenv
table, for example:env: - LAZ_VER=1.4.4 - LAZ_VER=1.6.2
-
Set the
os
field to specify the target operating system(s):os: - linux - osx
-
Add Windows builds using Wine (although a good indicator, success with Wine does not guarantee success with Windows, and vice versa!!):
matrix: include: - os: linux env: LAZ_VER=1.6.2 LAZ_ENV=wine WINEARCH=win32 LAZ_OPT="--os=win32 --cpu=i386" - os: linux env: LAZ_VER=1.6.2 LAZ_ENV=wine WINEARCH=win64 LAZ_OPT="--os=win64 --cpu=x86_64"
-
Add a virtual display server if you cannot run your program headless:
env: global: - DISPLAY=:99.0 before_install: - Xvfb $DISPLAY &
-
Other optional environment variables:
LAZ_REL
release platform (use withLAZ_VER
):- Linux:
i386
oramd64
- Mac OSX:
i386
orpowerpc
- Wine:
32
or64
- Linux:
LAZ_TMP_DIR
temporary directory.
-