20 Commits

Author SHA1 Message Date
Orestis Floros
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
Orestis Floros
892ae730cb
Update ubuntu & clang-format in builds (#5467) 2023-04-02 16:24:15 +02:00
Michael Stapelberg
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
Michael Stapelberg
612a9317b0
GitHub Actions: declare /usr/src/i3 as safe directory (#4992) 2022-05-31 18:29:36 +02:00
Orestis Floros
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
Michael Stapelberg
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
Orestis Floros
2fb2ef60de
travis: Dockerfile: Add build-essential (#4065)
Fixes the recent travis failures
2020-05-05 17:37:32 +02:00
Michael Stapelberg
7ade46c61f
switch to clang-format-6.0 (#3533) 2018-11-28 17:38:16 +01:00
Michael Stapelberg
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
Michael Stapelberg
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
Michael Stapelberg
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
Michael Stapelberg
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
Michael Stapelberg
460e33a847 travis: ubuntu: install libxcb-xrm from our repository
see #2363
2016-05-26 14:53:30 +02:00
Michael Stapelberg
8e125e9845 travis: ubuntu: install libtool 2016-05-25 07:49:14 +02:00
Michael Stapelberg
57dc46b4ec travis: ubuntu: also install autotools-dev and automake 2016-05-24 22:39:18 +02:00
Michael Stapelberg
d08b0c428b travis: ubuntu: install autoconf (for autoreconf) 2016-05-24 22:04:26 +02:00
Michael Stapelberg
a24a048cc9 travis: ubuntu: install ca-certificates to make git clone work 2016-05-24 20:21:08 +02:00
Michael Stapelberg
8dbdcde9a6 travis: ubuntu: remove libxcb-xrm-dev from Build-Deps
It’s installed separately.

This should fix the failing travis build.
2016-05-24 20:07:01 +02:00
Ingo Bürk
47562b4143 Introduce support for specifying variables from X resources. (#2286)
This patch introduces a new 'set_from_resource' config directive which
allows defining a variable by retrieving its value from the X resource
database. This avoids having to configure a color scheme in multiple
files. The directive takes an additional fallback value which is used
in case the resource cannot be found or during config validation where
no X connection is available.

Furthermore, this patch includes the following changes:
- If the same variable is defined twice, we now properly overwrite the
  value of the assignment rather than inserting two variable definitions
  with the same key.
- We now depend on xcb-util-xrm to query the resource.
- Increase the buffer size for variable / resource assignments.

fixes #2130
2016-05-08 12:55:27 +02:00
Michael Stapelberg
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