Commit graph

76 commits

Author SHA1 Message Date
Daniel Hahler
eb8b98eef3 ci: only install ldoc for BUILD_APIDOC
The example tests are being run explicitly by now, and not implicitly
when building the docs.
2017-01-08 20:34:13 +01:00
Daniel Hahler
06eeef47d8 ci: fix test-prev-commits: checkout -; no coverage; improve msg
- checkout previous commit, so the coverage upload uses the current
   code
 - do not run coverage reports when testing previous commits
 - improve failure message: display subject/author/name for each commit
2017-01-08 20:34:13 +01:00
Daniel Hahler
6aee6c2053 ci: overhaul coverage processing
- Execute the tests without compiling, and don't mess with the source
   files when coverage is enabled.
   This ensures that the coverage report lines are correct.
   This disables the doc tests, as their results would be unused.
   Hack: it still expands macros on util.lua, because of
   `util.get_themes_dir()` and `util.get_awesome_icon_dir()`, which might
   be moved later.  Ref:
   https://github.com/awesomeWM/awesome/pull/1239#discussion_r93828178.
 - ensure that BUILD_APIDOC and DO_COVERAGE are not used together
 - awesomeConfig.cmake: add DO_COVERAGE as an option
 - Travis: only install codecov with DO_COVERAGE=codecov
 - Travis: do not use set -v; use set -x with DO_COVERAGE
 - do not use trailing slashes with dirs in tests/examples/CMakeLists.txt / .luacov
 - Use latest luacov (0.12.0-1) again
   This reverts parts of 4cc6a815.
   I think it is better to fix any failure that 4cc6a815 tried to work around.
 - Travis: simplify/fix require('luacov') for functionaltests
 - tests/examples/CMakeLists.txt: resolve ../.. in SOURCE_DIR
 - tests/examples/CMakeLists.txt: add DO_COVERAGE to env
 - Cleanup/simplify .luacov: work with SOURCE_DIRECTORY alone
 - tests/run.sh: pass through / set SOURCE_DIRECTORY when running awesome
 - tests/run.sh: resolve source_dir
 - use DO_COVERAGE from env only
2017-01-08 20:34:13 +01:00
Emmanuel Lepage Vallee
d89b044adc ci: Build the API doc on the fastest target
Do less in the coverage one, as it's much slower
2017-01-08 04:10:55 -05:00
Uli Schlachter
1078a9f395 Bump minimal LGI version to 0.8.0 (#1350)
Turns out that menubar already uses features that were only added in
that version.

Fixes: https://github.com/awesomeWM/awesome/issues/1348
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:53:02 +01:00
Daniel Hahler
bdf4c3e0c0 Travis: unpin ldoc again (#1334) 2016-12-31 00:39:55 +01:00
Daniel Hahler
69915fb658 Travis: fix "Testing previous commits"
Fixes/massages TRAVIS_COMMIT_RANGE.

Ref: https://github.com/awesomeWM/awesome/pull/1298#pullrequestreview-14364986
2016-12-25 16:03:40 +01:00
Daniel Hahler
88cca77fdb Travis: use travis_fold function for folds
Ref: 7cac7d393c/lib/travis/shell/generator/bash.rb (L109-L116)
2016-12-25 16:03:40 +01:00
Uli Schlachter
9dba9bbc90 Fix luacheck installation on Travis
A trivial typo in .travis.yml caused luacheck to never run.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-18 11:23:08 +01:00
Daniel Hahler
5158f39c49 Travis: use Lua from lua.org again (#1244)
This reverts commit cf96296f27 (partly).

Fixes https://github.com/awesomeWM/awesome/issues/1242.
Ref: https://github.com/awesomeWM/awesome/pull/1243#issuecomment-264212802.
2016-12-01 18:04:18 +01:00
Daniel Hahler
333cd6491f Travis: run luacheck just once (#1230)
This also helps to easier spot failures because of this when looking
at the build matrix.

 - Add new check-qa target, to be run only once.
 - Add explicit check-unit-coverage target, used with DO_COVERAGE.
2016-11-27 15:24:04 +01:00
Daniel Hahler
c42213caff Merge pull request #1143 from awesomeWM/doc-fix-wibox.widget.base
Doc fixes for wibox.widget.base
2016-11-22 03:08:35 +01:00
Daniel Hahler
b2358a312a Travis: branches: only: master, 3.5 2016-11-22 02:40:15 +01:00
Daniel Hahler
326271f73b Travis: remove luajit from allow_failures: seems to be fixed (#1231) 2016-11-22 01:02:06 +01:00
Daniel Hahler
cf96296f27 Travis: use Lua 5.3.3, from GitHub mirror (#1208) 2016-11-06 20:43:45 +01:00
Uli Schlachter
0e81479a3f Use xcb-util-xrm
Instead of using Xlib for parsing resource files, this now uses the
dedicated xcb-based library that is meant for exactly this task.

Fixes: https://github.com/awesomeWM/awesome/issues/1176
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-11-03 13:34:43 +01:00
Daniel Hahler
b4d6bfa4db Travis: fix codecov (#1105)
tests/run.sh: no slash with --search lib

Fixes https://github.com/awesomeWM/awesome/issues/1049.
2016-09-20 19:53:10 +02:00
Daniel Hahler
99657f49cf Travis: pin ldoc at 1.4.4
Ref: https://github.com/awesomeWM/awesome/pull/1051#issuecomment-241327733
2016-08-22 17:27:48 -04:00
Uli Schlachter
c22b939630 Be less strict about warnings from "example tests" (#1045)
The build is no longer aborted when one of the "example tests" produces a
message on stderr. However, on Travis this requirement is still made. This
should catch "bad errors" via Travis while not breaking the build for users.

Fixes: https://github.com/awesomeWM/awesome/issues/821
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-08-20 18:59:28 +02:00
Daniel Hahler
65e8b9c36b Travis: fix return/exit usage (#1043)
Return 0 (success) in do_codecov function.  It is used in "&&" chains,
and should just do nothing for "coverall", but not break it.

This also makes use of "set -ev" instead of "exit" in general.

The "exit" caused the whole build to stop, but it was still green!
https://travis-ci.org/awesomeWM/awesome/jobs/151943526

"exit" is not really supported:
https://docs.travis-ci.com/user/customizing-the-build/#How-does-this-work%3F-(Or%2C-why-you-should-not-use-exit-in-build-steps)

This also wraps (most of) the "cd" commands in a subshell, to ensure
being in the repo directory all the time (except for $BUILD_IN_DIR).
2016-08-14 02:25:20 +02:00
Daniel Hahler
0d1331e592 Travis: allow failures with LuaJIT (#1025)
This is not nice and we should still try to fix it, but it seems better
to have green PRs without triggering a rebuild etc.

See https://github.com/awesomeWM/awesome/issues/982#issuecomment-231522318.
2016-08-13 00:21:33 +02:00
Uli Schlachter
4cc6a8155f Travis: Install luacov 0.11.0-1 (#991)
With luacov 0.12.0-1 our travis build fails. It was always kinda broken, but now
this breakage is revealed.

What likely happens: Our .luacov errors out because some needed environment
variable to figure out where to put the results is not set. Due to the way we
load luacov, it runs with its default config which luckily happens to work. With
luacov 0.12.0-1 the error is propagated instead and the build fails.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-07-08 22:46:41 +02:00
Daniel Hahler
a99bfd534c Travis: check each commit separately (for the sake of git-bisect) (#936)
Previous commits are only tested within one build (luajit, which appears
to be the fastest, maybe/also because it does no coverage).

Fixes https://github.com/awesomeWM/awesome/issues/935.
2016-07-05 22:14:41 +02:00
Uli Schlachter
d2b9bb8c39 .travis.yml: Add codecov support (#960)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-11 18:47:29 +02:00
Uli Schlachter
0c784d1472 .travis.yml: Stop installing rxvt-unicode (#961)
The last place where we used urxvt for testing was removed in 6b4a2625cb.

[ci skip]

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-11 13:12:33 +02:00
Daniel Hahler
547fec2824 Travis: run "make check" only once with DO_COVERAGE=true (#940)
Fixes https://github.com/awesomeWM/awesome/issues/938.
2016-06-05 16:12:57 +02:00
Emmanuel Lepage Vallee
ac7ea4c70f tests: Fix coverage data
As the documentation generation insert increasingly large ammount
of code into the lua files, the coverage data is getting less and
less accurate. This try to fix this by only collecting such data
after the `configure_file` calls are done.
2016-05-30 17:51:19 -04:00
Uli Schlachter
cc8e10e4be Travis: Build Lua 5.3 with -DLUA_USE_APICHECK (#907)
This defines some assertions in Lua that should catch API misuses. It might be
that Lua is a bit slower due to this, but so what?

Fixes: https://github.com/awesomeWM/awesome/issues/740
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-16 03:10:58 +02:00
Uli Schlachter
9d30bf87ae Merge branch 'more-travis-variance' of https://github.com/psychon/awesome 2016-05-09 18:42:09 +02:00
Daniel Hahler
58209cd89e Use an uneven screen width/height (1921x1079) in one Travis job (#870)
This is meant to trigger issues that would need `math.ceil()` fixes etc.

Ref: https://github.com/awesomeWM/awesome/issues/848#issuecomment-216068831
2016-05-08 20:58:19 +02:00
Uli Schlachter
bebdaf4ea3 Use an out-of-tree build for one Travis job
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 18:52:19 +02:00
Daniel Hahler
95f1b1ad56 Travis: use new GH_APIDOC_TOKEN
While still being used via Travis' `secure` env mechanism, we could
additionally set it through an env for the repo (not displayed by
default), and revoke/regenerate it when it gets revealed.
The token provides access only to the `apidoc` repo.

Closes https://github.com/awesomeWM/awesome/pull/866.
2016-05-02 00:56:01 +02:00
Emmanuel Lepage Vallee
30a527fcfd travis: Install GTK
So the tests can generate custom clients to suit their purpose.
2016-04-18 23:55:52 -04:00
Daniel Hahler
8387d8fecc .travis.yml: improve comments 2016-04-18 22:35:50 +02:00
Daniel Hahler
5eec87e043 Travis: move BUILD_APIDOC=true (Lua 5.2) to the beginning 2016-04-06 02:12:48 +02:00
Daniel Hahler
7116fda78d Travis: cleanup LGIVER matrix assignment 2016-04-06 02:06:35 +02:00
Daniel Hahler
7cbbfdf181 Travis: move luarocks install into single block 2016-04-06 02:06:35 +02:00
Daniel Hahler
9c76d2dbb6 Travis: build luajit from source (2.0.4 as of now) 2016-04-06 02:06:35 +02:00
Daniel Hahler
ce3e6648ac Travis: pin lua-term to 0.4-1 to fix the Lua 5.3 build
Ref: https://github.com/hoelzro/lua-term/issues/16
Ref: https://github.com/awesomeWM/awesome/pull/792#issuecomment-205123319
Closes: https://github.com/awesomeWM/awesome/pull/801
2016-04-04 20:57:28 +02:00
Daniel Hahler
0cbab1320c Travis: update luarocks: 2.2.2 => 2.3.0 2016-04-04 20:41:22 +02:00
Uli Schlachter
02cdb5103b Run shape-example-generation under LuaCov
This is ugly, but at least it works. Hopefully...

Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
2016-03-17 10:22:42 +01:00
Uli Schlachter
43dba09c28 Add& use Luacheck support
This commit adds a new "luacheck" target to the Makefiles. This target is
automatically included in "make check" when luacheck is found in $PATH.
Additionally, this includes luacheck in Travis so that the build fails when
luacheck complains about something.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-16 19:45:10 +01:00
Uli Schlachter
029a6a18b0 Lua 5.3: Disable Lua 5.2 compatibility
Lua 5.3's build system provides the LUA_COMPAT_5_2 and LUA_COMPAT_5_1 defines to
enable some compatibility with these older Lua versions. LUA_COMPAT_5_2 is
defined by default while LUA_COMPAT_5_1 is not.

This commit also disables LUA_COMPAT_5_2 on the Lua version that we build on
Travis so that the build will hopefully break if some feature is used that was
removed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-15 20:51:52 +01:00
Uli Schlachter
9e05ff63ce Code coverage: Also consider functional tests
Lots of our code depends on the C API and thus can only be tested when that is
available. Hence, it makes sense to also run the functional tests under LuaCov.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-12 09:26:29 +01:00
Uli Schlachter
b823dd4ed4 Add code coverage support
This uses coveralls.io and integrates the collection of coverage information
with Travis.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-12 09:26:07 +01:00
Uli Schlachter
7ec7483928 Travis: Run "make check"
Wait, what? Up to now Travis hasn't actually used "make check" but called some
things individually?!?

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-11 21:55:32 +01:00
Daniel Hahler
2a57f0335f .travis.yml: fix indent 2016-02-11 21:40:46 +01:00
Uli Schlachter
6479baf0ba Travis: also run against Lua 5.3
This also removes some obsolete dependencies and it also and creates
`/usr/bin/lua` even when using luajit.  Without this, our lgi-check.sh
script complains about a missing lgi installation because it cannot find
a lua binary.

Closes https://github.com/awesomeWM/awesome/pull/652.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-01-29 23:57:52 +01:00
Daniel Hahler
0eac1ee91e Travis: use travis_retry with apt-get update
Ref: https://travis-ci.org/awesomeWM/awesome/jobs/96732636
2015-12-17 00:22:23 +01:00
Frederik
0d2e6d2068 Get LuaRocks via HTTPS instead of HTTP
[ci skip]

Closes https://github.com/awesomeWM/awesome/pull/570.
2015-11-20 17:17:52 +01:00