Commit Graph

18 Commits (master)

Author SHA1 Message Date
NRK 420a0a2455 ci: fix macos build
for whatever reason, the path where homebrew installs headers
and libraries are no longer being searched by default. work
around it by manually specifying them with -I and -L.
22 hours ago
NRK e1b851c488 remove legacy multi-frame loaders
this removes the legacy gif and webp loaders. moving forward
multi-frame/animated images will be loaded by imlib2 itself.

Closes: https://codeberg.org/nsxiv/nsxiv/issues/397
8 months ago
NRK d19924f288 various README nits (#470)
don't capitalize "berg" in "Codeberg" spelling. Codeberg's official
sites does not seem to do so.

switch from "GPLv2" to "GPL-2.0-or-later" according to the spdx short
identifier: https://spdx.org/licenses/GPL-2.0-or-later.html

explicitly mention that Imlib2 needs to be built with X11 support.

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/470
Reviewed-by: explosion-mental <explosion-mental@noreply.codeberg.org>
9 months ago
NRK 112ba3a2fc config.mk: do not explicitly set CC (#455)
1. `c99` doesn't exist on openbsd
2. `c99` behaves weirdly on macos (doesn't support -Wall)

since make will already set CC (required by POSIX if the implementation
supports C, see `man 1p make`) to something appropriate (or it might be
set in the environment) go ahead and remove explicitly setting it on our
end.

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/455
Reviewed-by: TAAPArthur <taaparthur@noreply.codeberg.org>
11 months ago
NRK 28018e92d3 CI: misc cleanups + faster analysis (#449)
* switch to git ls-files to avoid picking up any other local .c files
* enable assertions during static analysis since we used some assertions to
  disable/silence certain warnings.
* update TCC commit hash to a more recent one
* parallelize static analysis

cppcheck already has -j argument to parallelize it's analysis and
provide results faster, clang-tidy unfortunately doesn't.

so use xargs -P to archive parallel execution. on my system this brings
down the analysis time from ~27s to ~5s.
12 months ago
NRK a924fe004d [ci]: fix things (#400)
for the spellcheck issue, the solution was to just bypass the system
package manager and use pip.

and the macos workaround is taken from here:
https://github.com/actions/setup-python/issues/577

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/400
Reviewed-by: explosion-mental <explosion-mental@noreply.codeberg.org>
1 year ago
NRK aa56aa2303 [ci]: try building all combination with tcc (#338)
this will hopefully catch issues like [337] in the future.

not using gcc and/or clang since we have 5 build options right now,
which means 2^5 = 32 different combination. using gcc/clang would take
too much resources and time; meanwhile tcc is lightning fast.

[337]: https://codeberg.org/nsxiv/nsxiv/pulls/337

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/338
Reviewed-by: eylles <eylles@noreply.codeberg.org>
2 years ago
NRK d9f20a4122 [ci]: build with macos on github
should help catch *BSD compilation issues.
2 years ago
NRK fb9686c650 Move uncritical files into `etc/` (#350)
This is mainly just to reduce the amount of files in the project root.
The criteria of what gets into `etc/` are the following:

* The file should not be necessary for building nsxiv. This excludes the
  `icon/*` stuff since that's needed by `window.c`.
* The file shouldn't have any valid reason to stay in the project root.
  This excludes things like `README.md`, `.gitignore` etc.

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/350
Reviewed-by: explosion-mental <explosion-mental@noreply.codeberg.org>
2 years ago
NRK a67665a1c1 add codeberg ci and cleanup github one (#311)
- apt-get is slow, takes up ~1m40s just to install deps, fix it by not
  using it. instead use alpine linux for codeberg ci, which brings build
  time down to 25s.
- And since alpine uses musl, it's probably a good idea to use it on our
  ci since it might catch us using any glibc extensions. The github ci
  can keep using ubuntu.
- remove duplication of CFLAGS by having it on a separate file instead.
- remove pull_request from github ci since we no longer accept PRs
  there.

Closes: https://codeberg.org/nsxiv/nsxiv/issues/307

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/311
Reviewed-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
Reviewed-by: TAAPArthur <taaparthur@noreply.codeberg.org>
2 years ago
NRK 4c6d26bef4 Move over to codeberg (#293)
Reviewed-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
2 years ago
N-R-K 3a22e6a6c5
Declare every extern function/variable in `nsxiv.h` (#268)
with a couple exceptions as they cause too many -Wshadow warnings.

also moves the `extcmd_t` typedef on top for cosmetic purposes.

also enable `-Wmissing-prototypes` in the ci
2 years ago
N-R-K d9db7d76b4
Makefile: cleanup non-posix stuff (#225)
remove some non-posix extensions which slipped through and adjust ci to
new Makefile changes

users can still overwrite the variables explicitly by using
`make VAR=VALUE`

packagers can also add extra libs to LDLIBS, we're internally using
NSXIV_LDLIBS now.
2 years ago
N-R-K 3cf4fc5e81
Fix broken ci and enable higher level optimization (#220)
* [ci] fix broken ci

* [ci] enable higher optimization level and lto

higher optimization levels enable more warnings and deeper analysis.
likewise, lto can catch a couple errors which typically goes unnoticed
without it.
2 years ago
NRK a9c6cbcd20 [ci] separate dep from build
removes /dev/null redirections from the dep step so in case some dep
fails to install/compile we will have the log.
2 years ago
NRK 35a9ca33d6 [ci] fetch tcc from a known working commit
avoids our ci failing in case there's a faulty new commit on tcc.
2 years ago
NRK 598f4c7855 add additional warning and -Werror to github workflow 2 years ago
NRK 1c8ea413f3 add github actions (#195)
this runs both default and minimal build with gcc, clang and tcc.
2 years ago