Compile Farm related files to build OpenTTD for all kind of platforms
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
base-linux
ci-commit-checker
ci-linux-amd64-clang-3.8
ci-linux-amd64-gcc-6
ci-linux-i386-gcc-6
release-docs
release-linux-deb-gcc
release-linux-generic-gcc
.gitignore
.gitmodules
COPYING
README.md
azure-pipelines-linux.yml
azure-pipelines-windows.yml

README.md

OpenTTD-CF

Build Status Build Status

A collection of Dockerfiles which are prepared to compile OpenTTD in all kind of flavours.

The images created from these Dockerfiles are used by the Compile Farm of OpenTTD to produce all the official releases since 1.9.0. This includes binaries like nightlies, experimentals, release-candidates, forks, etc.

Requirements

Install the latest Docker CE. At least 17.05 is needed.

Building

The images are created and published on Docker Hub, and can be found under:

https://hub.docker.com/r/openttd/compile-farm/ https://hub.docker.com/r/openttd/compile-farm-ci/

They can simply be pulled like:

docker pull openttd/compile-farm:linux-debian-stretch-amd64-gcc
docker pull openttd/compile-farm-ci:linux-amd64-gcc

If you want to build them yourself, things get a bit more complicated. To avoid code duplication, best is to look in azure-pipelines-linux.yml for the full set of what is being created.

Automated building

This repository uses Azure Pipelines to create all the required images. When a Pull Request is made, it will validate that all Linux containers still build. If a Pull Request is merged in master, it will automatically publish the new Linux containers.

Every week master is rebuild, both the Linux containers and the Windows dependencies.

  • azure-pipelines-linux.yml defines how the Linux Containers are build.
  • azure-pipelines-windows.yml defines how the Windows Dependencies are build.

Running (releases)

To compile your source via a Docker, simply create a new directory, say 'build', and put in there a folder called 'source' with the source you would like to compile. The Docker will put some temporary files in the 'build' folder, but mostly it will work inside the 'source' folder.

Now run from your build folder:

docker run --rm --user=`id -u`:`id -g` -v $(realpath $(pwd)):/workdir openttd/compile-farm:<your flavor>

This will produce the resulting binaries in the bundles directory of your source directory. Depending on the target, this can be a zip, deb, ..

Running (CI)

The dockers marked 'ci' are meant for code validation and tests (like regression-check). These don't produce any binaries, but only validate that the new code is correct. It follows the above chapter exactly, with a few key differences:

  • The image name is not 'openttd/compile-farm', but 'openttd/compile-farm-ci'.
  • When running the docker, it doesn't produce any output in bundles folder.

Listing current images

To list all the images you currently have on your system, simply run:

docker images openttd/compile-farm --format "{{.Tag}}"

Or for all the CI images:

docker images openttd/compile-farm-ci --format "{{.Tag}}"

Targets

In this repository you see different folders, each for their own target.

A short walkthrough:

  • ci-commit-checker: scripts to validate commit / commit messages.
  • ci-linux-*: targets that only validate sources on errors.
  • release-linux-deb-gcc: targets that produce .deb files (Debian and Ubuntu).
  • release-linux-generic-gcc: targets that produce tarballs (for any Linux OS, build with GCC).