2016-12-24 11:39:02 +01:00
|
|
|
dist: trusty
|
2016-05-16 13:21:22 +02:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- BUILD_WEB=/tmp/build-web
|
|
|
|
- secure: dMquVRuM4Wi/N3oZJaNIWSW5mpehxVuzDiDnC51OwfMtdNfdyWV7qKJQY44MjbveuyQd7eA/AuTLE+loaAFxiRfBXl2yI5NkAOrJwbbDyw/lAN9Og2FmNi+QLaTsNhpbYZ4zaUNEEqRWs9gIajGaXcWdO/HNYiKHHrk7+XXNDeM=
|
2017-01-21 21:31:16 +01:00
|
|
|
# CLOUDFLARE_AUTH_EMAIL/CLOUDFLARE_AUTH_KEY
|
|
|
|
- secure: JYKSA0crhIfgE7l51aF+qYr4JERLU3hXWRzKSmwuBi4uZzNxWfAm1hQ8qJ4+TTIIjJpr4dceVLdXRZDvX5B83hP8W4m4eoRp98IqwLinS5plB86Kv/C53vYGaMIaE+3u0EdehRgpSIN+2qmAUTNoQkFZsZh1Ok4vaN3QZaE2+f8=
|
|
|
|
# CLOUDFLARE_ZONE
|
|
|
|
- secure: LYV3F3ink6p8XfR2rjCcYDfTDSK22QRU4kYK4e77t42e3zky/tbiNZcJsrq9J5FwNEBZXDLxuXsgeEza3+x6N0uxjBIdopuEullL5jf5WRISxUja2wplOgCa8RC8CIvWyZOsbtw8UWJvbCyjwUXPT8q9sUT1U+KhYSuqVMo32GI=
|
2016-04-17 14:26:58 +02:00
|
|
|
addons:
|
2016-05-16 13:21:22 +02:00
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- ikiwiki
|
|
|
|
- asciidoc
|
|
|
|
- imagemagick
|
2016-05-16 17:51:31 +02:00
|
|
|
- perlmagick
|
2016-05-16 13:21:22 +02:00
|
|
|
- luarocks
|
|
|
|
- cmake
|
|
|
|
- libxcb-randr0-dev
|
|
|
|
- libxcb-xtest0-dev
|
|
|
|
- libxcb-xinerama0-dev
|
|
|
|
- libxcb-shape0-dev
|
|
|
|
- libxcb-util0-dev
|
|
|
|
- libxcb-keysyms1-dev
|
|
|
|
- libxcb-icccm4-dev
|
|
|
|
- libxdg-basedir-dev
|
|
|
|
- libstartup-notification0-dev
|
2016-12-24 11:39:02 +01:00
|
|
|
- libxcb-xkb-dev
|
|
|
|
- libxkbcommon-dev
|
|
|
|
- libxkbcommon-x11-dev
|
|
|
|
- gir1.2-pango-1.0
|
2016-05-16 13:21:22 +02:00
|
|
|
# Dependencies for xcb-util-cursor
|
|
|
|
- libxcb-render-util0-dev
|
|
|
|
- libxcb-image0-dev
|
2016-12-24 11:39:02 +01:00
|
|
|
# Dependencies for xcb-util-xrm
|
|
|
|
- xutils-dev
|
2017-03-18 11:08:01 +01:00
|
|
|
# Dependencies for lgi
|
|
|
|
- libgirepository1.0-dev
|
2016-05-16 13:21:22 +02:00
|
|
|
|
2016-05-18 00:17:34 +02:00
|
|
|
# Clone the awesomeWM.github.io repo before building, because we need the
|
|
|
|
# working copy to be there for updating already.
|
|
|
|
before_install:
|
|
|
|
- |
|
|
|
|
if [ -n "$GH_APIDOC_TOKEN" ]; then
|
|
|
|
set -e
|
|
|
|
git clone \
|
|
|
|
https://${GH_APIDOC_TOKEN}@github.com/awesomeWM/awesomeWM.github.io \
|
|
|
|
"$BUILD_WEB" 2>&1 | sed "s/$GH_APIDOC_TOKEN/GH_APIDOC_TOKEN/g"
|
|
|
|
if [ "$TRAVIS_PULL_REQUEST" = false ]; then
|
|
|
|
branch="$TRAVIS_BRANCH"
|
|
|
|
else
|
|
|
|
branch="pr-$TRAVIS_PULL_REQUEST"
|
|
|
|
fi
|
|
|
|
if [ "$branch" != master ]; then
|
|
|
|
cd $BUILD_WEB
|
|
|
|
if ! git checkout -b "$branch" "origin/$branch"; then
|
|
|
|
git checkout -b "$branch"
|
|
|
|
fi
|
|
|
|
cd -
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2016-04-17 14:26:58 +02:00
|
|
|
install:
|
2016-05-16 13:21:22 +02:00
|
|
|
# libxcb-cursor-dev is not available in Ubuntu Ancient
|
|
|
|
- travis_retry wget --no-check-certificate https://xcb.freedesktop.org/dist/xcb-util-cursor-0.1.3.tar.bz2 -O /tmp/util-cursor.tar.bz2
|
|
|
|
- (cd /tmp && tar -xvjf util-cursor.tar.bz2 && cd xcb-util-cursor* && ./configure --prefix=$HOME/install && make && make install)
|
2016-04-17 14:26:58 +02:00
|
|
|
|
2016-12-24 11:39:02 +01:00
|
|
|
# xcb-util-xrm is not available in Ubuntu Ancient
|
|
|
|
- (cd /tmp && git clone --recursive https://github.com/Airblader/xcb-util-xrm.git && cd xcb-util-xrm && ./autogen.sh --prefix=$HOME/install && make && make install)
|
|
|
|
|
2016-05-16 13:21:22 +02:00
|
|
|
# ldoc is not available in Ubuntu Ancient
|
|
|
|
- travis_retry luarocks --local install ldoc
|
|
|
|
- luarocks path --bin
|
|
|
|
- eval `luarocks path --bin`
|
|
|
|
# Of course Ubuntu's Luarocks version is too old for --bin
|
|
|
|
- PATH="$PATH:$HOME/.luarocks/bin"
|
2016-04-17 14:26:58 +02:00
|
|
|
|
2017-03-18 11:08:01 +01:00
|
|
|
# lgi is too old
|
|
|
|
- travis_retry luarocks --local install lgi
|
|
|
|
|
2017-10-31 14:14:13 +01:00
|
|
|
- gem install mdl
|
|
|
|
|
2019-02-25 13:25:36 +01:00
|
|
|
after_install:
|
|
|
|
- luarocks --local list --porcelain | column -t -s $'\r'
|
|
|
|
|
2016-04-17 14:26:58 +02:00
|
|
|
script:
|
2016-05-16 13:21:22 +02:00
|
|
|
- PKG_CONFIG_PATH="$HOME/install/lib/pkgconfig" make build_for_travis
|
2017-10-31 14:14:13 +01:00
|
|
|
- mdl --git-recurse .
|
2016-04-17 14:26:58 +02:00
|
|
|
|
|
|
|
after_success:
|
2016-05-16 13:21:22 +02:00
|
|
|
- |
|
2016-05-16 17:51:31 +02:00
|
|
|
if [ -n "$GH_APIDOC_TOKEN" ]; then
|
|
|
|
set -e
|
|
|
|
commit_hash=$(git rev-parse --short HEAD)
|
|
|
|
cd $BUILD_WEB
|
|
|
|
git config user.name "awesome-robot on Travis CI"
|
|
|
|
git config user.email "awesome-robot@users.noreply.github.com"
|
|
|
|
git add --all .
|
2019-02-25 13:25:47 +01:00
|
|
|
git commit -m "Update from Travis for awesome-www@${commit_hash}\n\nCommits: https://github.com/awesomeWM/awesome/compare/${TRAVIS_COMMIT_RANGE/.../..}\nBuild URL: https://travis-ci.com/awesomeWM/awesome/builds/${TRAVIS_BUILD_ID}"
|
2016-12-25 12:42:55 +01:00
|
|
|
git --no-pager show --stat
|
2016-05-16 17:51:31 +02:00
|
|
|
git push origin "$(git symbolic-ref --quiet HEAD)" 2>&1 | sed "s/$GH_APIDOC_TOKEN/GH_APIDOC_TOKEN/g"
|
2017-01-21 21:31:16 +01:00
|
|
|
|
|
|
|
# Purge CloudFlare cache.
|
|
|
|
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE/purge_cache" \
|
|
|
|
-H "X-Auth-Email: $CLOUDFLARE_AUTH_EMAIL" \
|
|
|
|
-H "X-Auth-Key: $CLOUDFLARE_AUTH_KEY" \
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
--data '{"purge_everything":true}'
|
2016-05-16 17:51:31 +02:00
|
|
|
fi
|