* 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.
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>
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>
- 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>
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
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.
* [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.