Commit Graph

39 Commits

Author SHA1 Message Date
a4c12432cf travis: remove autotools build in favor of meson
related to https://github.com/i3/i3/issues/4086
2020-11-15 16:42:41 +01:00
4544a6d595 travis: build dist tarball after running tests
This way, users get more detailed feedback about new test failures.

related to #4086
2020-05-19 20:27:50 +02:00
2e23412f5d debian-build: use release tarball from build step
…instead of building a release tarball over and over again.

This has become an issue as meson insists on running tests before creating a
release tarball (which is a good policy).

related to #4086
2020-05-19 19:36:56 +02:00
aba6ec3e52 add meson build files (#4094)
Motivation:

• faster builds (on an Intel Core i9-9900K):
  ( ../configure --disable-sanitizers && make -j8; )
  19,47s user 2,78s system 395% cpu 5,632 total

  ( meson .. -Dmans=true -Ddocs=true -Dprefix=/usr && ninja; )
  38,67s user 3,73s system 1095% cpu 3,871 total

• more approachable build system configuration in the
  python-esque meson domain specific language instead of
  the autotools m4 macro language

• built-in language server support thanks to ninja:
  the required compile_commands.json is built automatically
  and only needs to be linked from the source dir, e.g.:
  ln -s build/compile_commands.json .

Changes:

• the embedded vcs version info format changed from e.g.
  4.18-282-gabe46f69 (2020-05-16, branch "next")
  to:
  4.18-282-gabe46f69
  I think it’s better to lose a little bit of detail for
  the gained cleanliness of using meson’s vcs_tag()

• Drop unused xcb-event dependency.

• We can no longer enable sanitizers and debug options
  based on whether we are in a release or non-release build,
  because our new version logic runs at ninja build time,
  not at meson configure time.

  The new behavior is probably for the better in terms of
  what people expect, and we can make the CI use address sanitizer
  explicitly to ensure it is still exercised.

• We lose the AX_EXTEND_SRCDIR behavior, i.e. including the
  path component of the parent of the source dir in all paths.
  This was a trick we used for easier debugging, so that stack
  traces would contain e.g. ../i3-4.18.1/src/main.c, instead of
  just src/main.c.

  The other mechanism (_i3_version symbol) that we have for including
  the version number in the “backtrace full” (but not merely
  “backtrace”) output of gdb still works.

• Release tarballs now use tar.xz. Why not.

Migration plan

This commit adds the meson build files to the tree, but does not remove
autotools yet. For the development phase, we will keep both build systems
functional (and built on travis).

Then, just before the i3 v4.19 release, we will remove autotools from the tree
and the release tarball will require meson to compile.

This way, we incentivize maintainers to change, while also offering them an easy
way out (if desired) by reverting the most recent commit. In practice, switching
a distribution package from autotools to meson should only be a few line change,
easier than applying the provided patch :). Take a look at the debian/ changes
in this commit for an example.

meson is broadly available everywhere that i3 is available: Both xorg-server and
systemd gained meson build files in 2017, so we can follow suit:
https://anholt.livejournal.com/52574.html
https://in.waw.pl/~zbyszek/blog/systemd-meson.html

How do I?

For producing a coverage report, enable the b_coverage meson base option
and run ninja coverage-html:
% cd build
% meson .. -Db_coverage=true
% ninja
% ninja test
% ninja coverage-html
See also https://mesonbuild.com/howtox.html#producing-a-coverage-report

For using the address sanitizer, memory sanitizer or undefined behavior
sanitizer, use the b_sanitize meson base option:
% cd build
% meson .. -Db_sanitize=address
% ninja
See also https://mesonbuild.com/Builtin-options.html#base-options

related to #4086
2020-05-19 14:45:06 +02:00
cb1012e608 Travis: Default to -fno-common
See #3914
2020-02-01 17:41:19 +01:00
6ec7b91cff fix travis build by switching away from deprecated-2017Q3 (#3650)
Also remove “sudo: false” as per
https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
2019-03-19 09:30:04 +01:00
a65914f338 Fix missing prototypes
i3 will now compile with no warnings when -Wmissing-prototypes is used.
2018-10-13 21:10:10 +03:00
2a9522dda4 Enforce strict prototypes
i3 will now compile with no warnings when -Wstrict-prototypes is used.
2018-10-13 21:10:09 +03:00
1a2ce3edaf travis: remove clang-analyze (#2917)
• The output currently contains a large number of false-positives and — AFAICT —
  no actual issues.

• Upstream shows little interest in addressing the long-standing issues with the
  TAILQ macros, so the false-positive situation probably won’t change soon:
  https://bugs.llvm.org/show_bug.cgi?id=18222

Currently, we largely spend travis CPU cycles on this, for no additional value.
2017-09-09 18:30:17 +02:00
3137064efc travis: downgrade temporarily due to asan issue
fixes #2912
2017-09-09 08:15:03 +02:00
86ad867277 travis: switch to container-based trusty (#2550)
fixes #2546
2016-11-08 14:04:46 -08:00
ca98c7e614 Update travis for autotools 2016-10-23 21:09:24 +02:00
59c070bffc travis: pass through CC to run-tests
fixes #2437
2016-09-05 09:01:41 +02:00
bd29745eff travis: build debian packages and documentation
The resulting packages are pushed to Debian repositories hosted on
bintray.com.

This is the first step to move away from our custom buildbot setup (see
https://i3wm.org/docs/buildbot.html for details on that) towards
infrastructure which is more standard (travis) and in the open.
2016-04-08 09:31:07 +02:00
fbfbdb8e12 travis: check spelling of binaries and manpages, use docker
We now build a docker base container based on debian sid (where the very
latest packages are available). That base container is updated once a
month, or whenever travis-build.Dockerfile or debian/control change, but
re-used for subsequent travis runs. While the initial build might take
up to 15 minutes, subsequent builds typically run in a minute or two.

All the different steps that we run on travis are now factored into
separate scripts in the travis/ directory.

Switching to docker should also help with issue #2174.
2016-02-06 10:36:43 +01:00
9a4dbf366b travis: use trusty (simpler config, faster builds) 2016-01-11 21:18:11 +01:00
dd33cd36dd travis: build with AddressSanitizer enabled
This requires us to use a more recent compiler.
2016-01-11 20:59:26 +01:00
624b33fd79 travis: install git 1.9.1 from trusty for git fetch --unshallow 2015-12-09 23:11:18 +01:00
a2b20c8d9a travis: call git fetch --unshallow, so that git describe works 2015-11-30 21:08:00 +01:00
6a7f9370db Add i3test::XTEST, add 2 test cases for key bindings 2015-11-16 09:37:54 +01:00
73289a7394 travis: install clang-format-3.5 from llvm repository
Ubuntu utopic disappeared from archive.ubuntu.com, it’s EOL.
2015-10-11 00:12:38 +02:00
7ef3fdec00 .travis.yml: add a wrapped functions grepper script 2015-08-03 12:51:39 +03:00
f262445de3 Install xdotool to run tests requiring it on Travis. 2015-06-04 17:05:53 +02:00
909eefb868 travis: remove FORTIFY_SOURCE, causes trouble with clang 2015-03-29 17:20:11 +02:00
ba89fe0a93 travis: enable more warnings, add -Werror
This will ensure that our code stays free of warnings, at least for the
warnings that we have enabled. (Using _FORTIFY_SOURCE > 0 leads to more
warnings, some of them are harder to address.)
2015-03-29 17:11:21 +02:00
658d106fce fix travis config with regards to clang-format 2015-03-23 09:21:06 +01:00
cd48bcf2a5 travis: verify code was formatted using clang-format 2015-03-14 22:32:23 +01:00
8eb5656c69 travis: cat complete-run.log on failures 2015-03-14 12:35:01 +01:00
69be6e4a8e travis: run tests serialized, install latest AnyEvent::I3 2015-03-13 23:38:56 +01:00
26d17c6b88 travis: install as many perl pkgs as possible via apt instead of cpanm 2015-03-13 23:38:33 +01:00
2cf40f4867 travis: fix pinning setup (newlines and YAML are complicated) 2015-03-13 23:38:13 +01:00
f8ac5fcfe2 travis: escape strings for YAML 2015-03-13 21:04:03 +01:00
8dd6591c59 travis: install more perl dependencies, pull in trusty packages 2015-03-13 20:52:53 +01:00
0b3601c2ef travis: also cat cpanm build logs after failure 2015-03-13 13:24:02 +01:00
9088fa03bc travis: cpanm: set -v so that we get error messages in the travis output 2015-03-13 11:39:59 +01:00
439cadf441 travis: directly use cpanm -n to skip tests
X11::XCB currently fails its tests
2015-03-13 10:21:02 +01:00
b370c5ac71 travis runs on ubuntu 12.04, so use libinline-perl 2015-03-13 10:12:00 +01:00
f549089c30 travis: mk-build-deps needs equivs 2015-03-13 10:09:21 +01:00
92d8b4d469 add configuration for travis-ci.com 2015-03-13 10:06:57 +01:00