Skip to content

Deploy OS X and Debian packages from Travis-CI

mazmazz requested to merge travis-deployer into master

Here's the Travis-CI framework for cross platform releases (first proposed in !352 (closed)). It can be improved, but I don't plan to work more on it. It's "good enough" for release purposes.

For configuration, Deployer uses Travis environment variables. For full documentation, see:

https://wiki.srb2.org/wiki/User:Digiku/Cross-platform_deployment

Deployer is triggered only under these conditions:

  • DPL_ENABLED=1 is set AND a branch is pushed that contains the word deployer
  • DPL_ENABLED=1 is set AND DPL_TAG_ENABLED=1 is set AND a release tag is pushed
  • Pull requests will never trigger Deployer

Deployer defines release buildbots separately from test buildbots:

  • When Deployer is not triggered: the test buildbots remain ON and release buildbots are toggled OFF.
  • For deployer branch builds when DPL_ENABLED=1: the test buildbots remain ON unless DPL_TERMINATE_TESTS=1 is set, then they are toggled OFF. Release buildbots are toggled ON.
  • For release tags when DPL_TAG_ENABLED=1: the test buildbots always remain ON and release buildbots are toggled ON.

Features

What it does currently:

  • Build OS X DMG installer via CMake and upload to non-secure FTP
  • Build Debian source packages via dpkg and upload to Launchpad via dput

What was not tested (and may not work):

  • Upload to SFTP or FTPS
  • Build Debian binary packages

What would be nice for the future:

  • Build Debian packages via CMake, and possibly scrap the debian-template scripts
  • Build Windows packages via CMake

.travis.yml changes

  • matrix
    • if conditions added to every buildbot to toggle them ON or OFF if Deployer is triggered
    • Release buildbots are added
  • before_install
    • deployer_defaults.sh defines some defaults used in the main travis script, including asset download links and md5 hash files.
    • deployer.sh evaluates whether Depoyer is triggered, and whether to terminate the buildbot early if it's a deployer branch and the optional filter conditions are not met (see documentation)
  • install
    • OS X: sdl2_mixer --with-flac --with-mpg123 is installed. The other packages are the same. Both sdl2 and sdl2_mixer are the latest versions on Homebrew.
  • before_script:
    • Asset download will only trigger if the server modified date is newer than the cache modified date
    • Asset download path changed to GitHub Releases hosting

Other changes

  • Some CMAKE variables are made configurable (CACHE)
  • Debian scripts are template-ized -- outside of Travis, they can be filled in by running the debian_template.sh script, using defaults or environment variables from deployer_defaults.sh

Buildbot results

Edited by mazmazz

Merge request reports

Loading