63 Commits

Author SHA1 Message Date
e8e063cf00 Fix AdressSanitizer failures in tests (#6502)
Example in
https://github.com/i3/i3/actions/runs/18260895234/job/51988635887?pr=6502
`i3-log-for-124-move.t`:
```
../libi3/font.c:332:9: runtime error: signed integer overflow: 2147483641 + 11 cannot be represented in type 'int'
    #0 0x5611ce962d65 in draw_text_xcb ../libi3/font.c:332
    #1 0x5611ce962d65 in draw_text ../libi3/font.c:376
    #2 0x5611ce95de20 in draw_util_text ../libi3/draw_util.c:219
    #3 0x5611ce947e7a in x_draw_decoration ../src/x.c:751
    #4 0x5611ce94f93a in x_push_node ../src/x.c:1097
    #5 0x5611ce94e9d8 in x_push_node ../src/x.c:1204
    #6 0x5611ce94e9d8 in x_push_node ../src/x.c:1204
    #7 0x5611ce94e9d8 in x_push_node ../src/x.c:1204
    #8 0x5611ce952e9b in x_push_changes ../src/x.c:1373
    #9 0x5611ce922d1f in tree_render ../src/tree.c:468
    #10 0x5611ce8d1bbb in handle_run_command ../src/ipc.c:220
    #11 0x5611ce8c87fe in ipc_receive_message ../src/ipc.c:1481
    #12 0x7effc262b64a in ev_invoke_pending (/lib/x86_64-linux-gnu/libev.so.4+0x564a) (BuildId: cfcffb10ff16734dcc7d31d002a90940abff0323)
    #13 0x7effc262f22e in ev_run (/lib/x86_64-linux-gnu/libev.so.4+0x922e) (BuildId: cfcffb10ff16734dcc7d31d002a90940abff0323)
    #14 0x5611ce809d48 in ev_loop /usr/include/ev.h:841
    #15 0x5611ce809d48 in main ../src/main.c:1229
    #16 0x7effc1e41ca7  (/lib/x86_64-linux-gnu/libc.so.6+0x29ca7) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)
    #17 0x7effc1e41d64 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29d64) (BuildId: def5460e3cee00bfee25b429c97bcc4853e5b3a8)
    #18 0x5611ce80e770 in _start (/usr/src/i3/build/i3+0x230770) (BuildId: 181abde9a3dd28a8a4be68b90b9b710c8e280633)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../libi3/font.c:332:9 
```

Unrelated but I fixed the build fails in `next` because of a
false-positive:
```
In file included from ../include/all.h:40,
                 from ../src/commands.c:10:
../src/commands.c: In function ‘cmd_floating’:
../include/log.h:30:33: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
   30 | #define DLOG(fmt, ...) debuglog("%s:%s:%d - " fmt, __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)
      |                                 ^~~~~~~~~~~~~
../src/commands.c:1193:13: note: in expansion of macro ‘DLOG’
 1193 |             DLOG("should switch mode to %s\n", floating_mode);
      |             ^~~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.
```
2025-10-06 08:09:17 +02:00
d1daf169bb GitHub Actions: stop pushing to Balto (they’re shutting down) (#6491)
fixes https://github.com/i3/i3/issues/6490
2025-08-29 18:30:55 +02:00
892ae730cb Update ubuntu & clang-format in builds (#5467) 2023-04-02 16:24:15 +02:00
ecb9b895c7 docker: fix missing address sanitizer dependency (#5466) 2023-04-02 15:39:13 +02:00
6911c116e7 GitHub Actions: push artifacts only on next branch (#5388) 2023-01-23 17:39:55 +01:00
46de32eedd GitHub Actions: remove i386 autobuild packages (#5345)
They are newly failing since the previous commit (upgrading to Ubuntu focal),
so instead of debugging what the issue is, let’s just remove them entirely.
Not many i386 users are left, as the world is on amd64 and arm64 these days.
2023-01-02 12:24:54 +01:00
944a262688 GitHub Actions: build Ubuntu packages using Ubuntu focal (#5344)
This is required to satisfy our meson.build minimal Meson version.
2023-01-02 12:10:36 +01:00
a59423df81 check-spelling: add another false positive (#5247) 2022-11-05 15:56:36 +01:00
103dc7b55d fix travis/check-spelling.pl for recent Lintian changes 2022-07-28 09:25:55 +02:00
458c148934 cleanup-bintray: remove remaining bintray references (#5038)
* The `cleanup-bintray.pl` script is just unused
* The `dh_builddeb` override is no longer necessary as bintray is no longer used
2022-06-30 08:21:54 +02:00
612a9317b0 GitHub Actions: declare /usr/src/i3 as safe directory (#4992) 2022-05-31 18:29:36 +02:00
680ddc7e10 Move clang-format, safe-wrappers, release notes check in new job
Benefits:
- Faster feedback in case of error
- More checks run in parallel
- Removes stuff from Dockerfiles
- Uses newest available clang-format (in ubuntu repos)
2021-11-05 18:29:42 +01:00
b3d4281b8b fix travis/check-spelling.pl for updated API 2021-10-06 18:23:46 +02:00
c94f41b2da switch from Travis to GitHub actions for continuous integration (CI) (#4428) 2021-05-23 15:44:28 +02:00
b95bab0e34 mark travis/push-balto.sh as executable (#4347)
related to https://github.com/i3/i3/issues/4340
2021-02-13 10:10:59 +01:00
521949b567 travis: push i3 autobuild packages to balto instead of bintray (#4345)
related to https://github.com/i3/i3/issues/4340
2021-02-13 09:56:15 +01:00
74b461e25e build.i3wm.org: disallow search engine indexing (#4295)
related to https://github.com/i3/i3.github.io/issues/41
2020-12-29 20:05:59 +01:00
3a1e44da68 check-spelling: exempt typo until upstream merges the fix
This must have come in with a new version of clang.
2020-12-29 17:13:11 +01:00
466f7c16f9 travis: fix bintray deploy step
Commit be1065f62d moved the Debian/Ubuntu package
builds into the distbuild/ directory.

fixes #4179
2020-10-25 21:54:07 +01:00
ff77b67101 switch from clang-format-6 to clang-format-9 (#4121)
No changes required, but this unbreaks our CI
2020-06-06 14:03:31 +02:00
abf9b18f12 docs.sh: no longer rely on now-deleted debian/i3-wm.{manpages,docs}
related to #4086
2020-05-19 20:27:50 +02:00
be1065f62d debian-build: s/build/distbuild/
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
ef8935b1db autotools: place binaries in top level of build dir, not in subdirs (#4093)
meson only supports the top level (no subdirs), so this makes the transition
easier.

For this to work with autotools, we need to *disable* the subdir-objects option,
that autotools wants us to enable for forward-compatibility.

This results in a bunch of warnings at autoreconf-time, but we don’t care, given
that we intend to switch away from autotools. Both build systems working next to
each other (as best as they can) is more important.

related to #4086
2020-05-18 22:18:00 +02:00
2fb2ef60de travis: Dockerfile: Add build-essential (#4065)
Fixes the recent travis failures
2020-05-05 17:37:32 +02:00
e7191af8b3 pod2html: render without stylesheet by default (#4016)
fixes #3956
2020-04-12 11:07:43 +02:00
72a6ad2013 check-spelling: update to new Lintian::Profile API
This changed between Lintian 2.62.0 and 2.64.0.
2020-04-07 17:41:56 +02:00
f01a75cee8 travis/check-spelling.pl: check_spelling moved to Lintian::Spelling 2019-11-28 08:51:26 +01:00
9bd2224520 travis: remove deprecated docker login -e flag (#3651) 2019-03-19 09:49:59 +01:00
7ade46c61f switch to clang-format-6.0 (#3533) 2018-11-28 17:38:16 +01:00
07e5747c8c travis: move (failing) ubuntu build from xenial to bionic
Ubuntu’s apt started refusing to load package files from unauthenticated
repositories, but the package for which we did that (xcb-xrm) is available in
newer versions of Ubuntu, so I just removed that part altogether.

Apparently this has been broken since April, and nobody noticed :-/
2018-11-04 15:24:10 +01:00
eedb257655 switch to clang-format-4.0
clang-format-3.8 is old enough to have vanished from Debian testing, which we
use for our CI.
2018-11-03 09:16:16 +01:00
40bf2192f0 travis: fix mk-build-deps call by providing changelog file
mk-build-deps started using the changelog file to get the version number, but a
bug prevents it from falling back correctly to 1.0 if no changelog is
present. This has been fixed upstream in
4b15abd4f0,
but we can just ship the changelog file until that fix lands.
2018-10-15 08:40:00 +02:00
44a6efb5b0 tests: run under Xvfb by default (if available) (#2951)
This shaves off two seconds of wall-clock time (10s → 8s).
2017-10-13 00:18:49 -07:00
d968d39b27 Replace http:// with https:// where applicable
The testcases will be updated automatically in a separate commit.
2017-09-24 10:19:07 +02:00
d0b8f93d4f travis: install xrandr in Docker container for t/533-randr15.t (#2949) 2017-09-14 17:48:22 +02: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
a91544b5b3 testcases: remove external AnyEvent::I3 dependency 2017-08-19 18:13:19 +02:00
fff3f79da9 switch to clang-format-3.8 (#2547)
https://llvm.org/bugs/show_bug.cgi?id=30353 was filed for the unintended
line break between in e.g. “TAILQ_ENTRY(foo)\nbar;”.

Until that’s fixed or a workaround is known, we’ll live with line
breaks. To make it a bit easier for readers to see what’s going on, I
added extra line breaks around each such struct member/variable
definition, so that they at least visually are a single unit.

fixes #2174
2016-11-08 13:46:43 -08:00
7ad5736875 travis: use correct path to debian packages (#2521) 2016-10-28 23:41:13 +02:00
b10eb0c3e6 travis/docs.sh: call asciidoc directly
…instead of the no longer existing docs-clean and docs targets.
2016-10-26 08:46:39 +02:00
758fc7d331 travis/clang-analyze: look for dist tarball in build/ 2016-10-26 08:46:26 +02:00
ca98c7e614 Update travis for autotools 2016-10-23 21:09:24 +02:00
47b84ca5ed travis-base.Dockerfile: depend on perl, not perl-modules
As per the package description, perl-modules is an implementation detail
and packages should depend on perl instead.
2016-09-26 20:42:51 +02:00
23ee16077a travis: build ubuntu packages for xenial, not wily (#2474)
The extra rm command when configuring the repository is necessary
because of https://bugs.debian.org/838779.
2016-09-24 12:24:47 -07:00
14f49aa6d3 travis/cleanup-bintray: use dpkg --compare-versions (#2453)
…instead of lexicographically sorting strings, which fails for the
following situation:

    4.12-96-g086276b
    4.12-97-g59c070b
    4.12-108-gb850cfb

This bug resulted in new packages being built and uploaded, then
immediately deleted.

Thanks to eeemsi for reporting the issue.
2016-09-24 08:16:02 -07:00
086276b329 travis: only enable asan workaround for clang (breaks gcc)
fixes #2437
2016-09-05 08:55:40 +02:00
6584f70d28 travis: work around asan broken-ness with libc ≥ 2.24
fixes #2437
2016-09-05 08:42:34 +02:00
460e33a847 travis: ubuntu: install libxcb-xrm from our repository
see #2363
2016-05-26 14:53:30 +02:00