From 7c9c38f26cda593c3dbc7fdf1574e62d7ec93dd2 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 17 Apr 2016 14:26:58 +0200 Subject: [PATCH 1/3] Add initial .travis.yml Signed-off-by: Uli Schlachter --- .travis.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..7976444 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,38 @@ +addons: + apt: + packages: + - ikiwiki + - asciidoc + - imagemagick + - 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 + # Dependencies for xcb-util-cursor + - libxcb-render-util0-dev + - libxcb-image0-dev + +install: + # 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) + + # 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" + +script: + - PKG_CONFIG_PATH="$HOME/install/lib/pkgconfig" make push + +after_success: + - echo TODO: update the gh-pages here (if on the right branch, not a PR etc) From 601f442c71385d6492608a36f4e103de1ad0e301 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 16 May 2016 15:07:50 +0200 Subject: [PATCH 2/3] Use https://awesomewm.org/ for ikiwiki output --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 697fe66..e3c2816 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ push: output ldoc changelogs manpages output: authors.mdwn ikiwiki $(CURDIR) html -v --wikiname about --plugin=goodstuff --templatedir=templates \ - --exclude=html --exclude=Makefile --rss --url http://awesome.naquadah.org + --exclude=html --exclude=Makefile --rss --url https://awesomewm.org/ authors.mdwn: echo '## Primary' > authors.mdwn From 6da11338c4bc9f8f09b7273780f901b37b1ef51e Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 16 May 2016 13:21:22 +0200 Subject: [PATCH 3/3] Travis: push to awesomeWM.github.io for builds on master --- .travis.yml | 98 +++++++++++++++++++++++++++++++++++++---------------- Makefile | 16 ++++++--- 2 files changed, 80 insertions(+), 34 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7976444..c478bab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,38 +1,76 @@ +branches: + only: + - master +env: + global: + - BUILD_WEB=/tmp/build-web + - secure: dMquVRuM4Wi/N3oZJaNIWSW5mpehxVuzDiDnC51OwfMtdNfdyWV7qKJQY44MjbveuyQd7eA/AuTLE+loaAFxiRfBXl2yI5NkAOrJwbbDyw/lAN9Og2FmNi+QLaTsNhpbYZ4zaUNEEqRWs9gIajGaXcWdO/HNYiKHHrk7+XXNDeM= addons: - apt: - packages: - - ikiwiki - - asciidoc - - imagemagick - - 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 - # Dependencies for xcb-util-cursor - - libxcb-render-util0-dev - - libxcb-image0-dev + apt: + packages: + - ikiwiki + - asciidoc + - imagemagick + - 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 + # Dependencies for xcb-util-cursor + - libxcb-render-util0-dev + - libxcb-image0-dev + +# Clone the awesomeWM.github.io repo before building, so that in case of +# concurrent builds, the push will fail later. +# Stderr is redirected to not reveal the token. +before_install: + - | + set -e + git clone --quiet \ + https://${GH_APIDOC_TOKEN}@github.com/awesomeWM/awesomeWM.github.io \ + "$BUILD_WEB" 2>/dev/null + 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 install: - # 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) + # 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) - # 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" + # 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" script: - - PKG_CONFIG_PATH="$HOME/install/lib/pkgconfig" make push + - PKG_CONFIG_PATH="$HOME/install/lib/pkgconfig" make build_for_travis after_success: - - echo TODO: update the gh-pages here (if on the right branch, not a PR etc) + - | + 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 . + git commit -m "Update from Travis for awesome-www@${commit_hash}" + git show --stat + git push origin "$(git symbolic-ref --quiet HEAD)" 2>/dev/null diff --git a/Makefile b/Makefile index e3c2816..390c6ea 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -push: output ldoc changelogs manpages - rsync -PaOvz --chmod=u=rwX,g=rwX,o=rX,Dg+s --exclude src html/ awesome.naquadah.org:/var/www/awesome.naquadah.org/ - rsync -PaOvz --chmod=u=rwX,g=rwX,o=rX,Dg+s --delete src/build/doc/ awesome.naquadah.org:/var/www/awesome.naquadah.org/doc/api - rsync -PaOvz --chmod=u=rwX,g=rwX,o=rX,Dg+s /usr/share/asciidoc/icons awesome.naquadah.org:/var/www/awesome.naquadah.org/doc/manpages/icons +# Make git not use user's config. +HOME:=/dev/null + +all: output ldoc changelogs manpages output: authors.mdwn ikiwiki $(CURDIR) html -v --wikiname about --plugin=goodstuff --templatedir=templates \ @@ -38,4 +38,12 @@ manpages: do asciidoc -a icons -b xhtml11 -o ../../html/doc/manpages/`basename $${manpage} .txt`.html $$manpage || exit 1; \ done +build_for_travis: all + rsync -PaOvz --chmod=u=rwX,g=rwX,o=rX,Dg+s --exclude src html/ \ + $${BUILD_WEB} + rsync -PaOvz --chmod=u=rwX,g=rwX,o=rX,Dg+s --delete src/build/doc/ \ + $${BUILD_WEB}/doc/api + rsync -PaOvz --chmod=u=rwX,g=rwX,o=rX,Dg+s /usr/share/asciidoc/icons \ + $${BUILD_WEB}/doc/manpages/icons + .PHONY: authors.mdwn changelogs manpages