aboutsummaryrefslogtreecommitdiffstats
path: root/.builds
Commit message (Collapse)AuthorAgeFilesLines
* lint,validate: fix for openbsdRobin Jarry2023-12-141-7/+7
| | | | | | | | | | | | | | - Remove GNU specific stuff (ln -v, mktemp --tempdir, grep --color) - Remove GCC specific flags in sendemail-validate (-Warith-conversion) - Add -std=c99 and -Wpedantic and fix the reported warnings. - Explicitly call gmake everywhere. - Run our custom analyzer standalone. Golangci lint plugins are not supported on OpenBSD. Indirect dependency to golang.org/x/mod is required somehow... Reported-by: Johannes Thyssen Tishman <johannes@thyssentishman.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
* ci: use make -C instead of changing directoriesRobin Jarry2023-08-242-20/+9
| | | | | | | This is a matter of preference. I prefer -C over changing dirs. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Karel Balej <balejk@matfyz.cz>
* ci: run all testsRobin Jarry2023-08-241-1/+1
| | | | | | | Do not restrict to go tests only. Also run filter tests. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Karel Balej <balejk@matfyz.cz>
* mk: deprecate BSD make in favor of GNU makeRobin Jarry2023-08-111-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Being portable between BSD and GNU make is a nightmare. It restricts features to a very minimal surface and in turn requires a lot of code duplication and manual updating of file lists. Worse, aerc's makefile relies on the shell assignment operator (!=) which has been supported by BSD make 2.2 since 1997 but GNU make 4.0 since 2013. Unfortunately, MacOS runs GNU make 3.8 which does not have that feature. Reducing the feature set even more. Stop that nonsense and remove BSD make compatibility. The majority of aerc's users either run a GNU Linux distribution or MacOS. For those who run any *BSD variant, it is easy for them to install GNU make (gmake) if they don't have it installed already. Use GNU make constructs to generate build and install rules dynamically based on source files discovery. GNU make will use "GNUmakefile" in priority over "Makefile" if possible. Leverage this to display an explicit message when other flavours of make are used. Leave a "Makefile" with a .DEFAULT: target and rename the actual file to "GNUmakefile". Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* filters: fix option parsing on arm cpusRobin Jarry2023-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When running colorize or wrap on ARM, both programs exit immediately displaying their help message whatever the provided arguments. This is caused by an implicit downcast of the getopt return value. On most architectures, char is signed by default. On ARM, char is unsigned for performance reasons. Since the signed int return value of getopt is forced into a char, the results differ on ARM compared to x86. * Add -Wconversion -Warith-conversion to CFLAGS in CI builds to ensure catching such issues in the future. * Fix all -Wconversion -Warith-conversion reported issues. * Wide char functions need to deal with wint_t and wchar_t and it is guaranteed that a wchar_t can always fit into a wint_t. Add explicit casts to silence the reported warnings. Link: https://www.arm.linux.org.uk/docs/faqs/signedchar.php Link: https://lwn.net/Articles/911914/ Fixes: https://todo.sr.ht/~rjarry/aerc/164 Reported-by: Bence Ferdinandy <bence@ferdinandy.com> Suggested-by: Allen Sobot <chilledfrogs@disroot.org> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
* mod: drop support for go 1.17Robin Jarry2023-04-241-2/+2
| | | | | | | | | | | | | A lot of libraries are starting to use generics (introduced in go 1.18). Restricting aerc on 1.17 prevents us from updating our dependencies. Since 1.18 is a major milestone, it has a chance to remain supported for a while. Update the minimum go version to 1.18. Run go mod tidy -compat=1.18. Update our CI to run on 1.18. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
* Revert "ci: use alpine/latest instead of edge"Robin Jarry2023-02-261-1/+1
| | | | | | | | This reverts commit fff5e2f1bbe4e1d2afecada9b69fca0fc7cec424. Should work now. Signed-off-by: Robin Jarry <robin@jarry.cc>
* mod: remove support for go 1.16Robin Jarry2023-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | The dependency to x/tools@v0.6.0 drags x/sys@v0.5.0 which is not compatible with go 1.16 # golang.org/x/sys/unix golang.org/x/sys@v0.5.0/unix/syscall.go:83:16: undefined: unsafe.Slice golang.org/x/sys@v0.5.0/unix/syscall_linux.go:2271:9: undefined: unsafe.Slice golang.org/x/sys@v0.5.0/unix/syscall_unix.go:118:7: undefined: unsafe.Slice golang.org/x/sys@v0.5.0/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice note: module requires Go 1.17 Since go 1.16 is now EOL, update the minimal go version to 1.17. Update go.mod and go.sum with the following command: go mod tidy -compat=1.17 Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* ci: use alpine/latest instead of edgeRobin Jarry2023-02-111-1/+1
| | | | | | | | The edge branch sometimes has pre-release go versions which do not play well with some of our dependencies. Make sure to stay on the latest stable version. Signed-off-by: Robin Jarry <robin@jarry.cc>
* ci: fix obscure build errorRobin Jarry2023-01-261-3/+1
| | | | | | | | | | | | | | | | | Fix the following obscure build error: gcc -O2 -g -Wall -Wextra -Werror -Wformat-security -Wstack-protector -fstack-protector-strong -fanalyzer gcc: fatal error: no input files The issue is that CFLAGS contains newline characters '\n' because of the yaml > continuation. I had misinterpreted the spec hoping that the final newline will also be stripped which is not. Put all CFLAGS on a single line. Link: https://yaml.org/spec/1.0/#id2567537 Fixes: 3191ee171c43 ("filters: rewrite wrap in c") Signed-off-by: Robin Jarry <robin@jarry.cc>
* filters: rewrite wrap in cRobin Jarry2023-01-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This utility introduced in commit c9524d265793 ("filters: add wrap utility written in go") allows to reflow text to view emails that have very long lines without breaking quotes, lists and indentation. For such a simple task, go produces a binary that is 2.0M bytes on disk. After stripping debugging symbols, it can be reduced to 1.2M bytes. All of this for 267 lines of source code. This is a bit ridiculous, provided people may load this binary into memory multiple times per minute. This tool is a small side-project that seems not suitable for golang. Rewrite it in C. It now only depends on a POSIX libc to run. It is safe to assume that there is one available on all *NIX systems in the world of 2023. The resulting binary is now 27K bytes (15K after stripping). To build it, a C compiler and libc headers are required. These should most likely be available since they are dependencies of the go compiler toolchain. I have tested compilation (with clang-analyzer and gcc -fanalyzer) and basic operation on FreeBSD, Fedora (glibc) and Alpine (musl libc). More tests would probably be required on MacOSX and older Linux distros. I also added test vectors to give some confidence that this works as expected. Update CI with aggressive gcc hardening flags and to run these tests with valgrind --leak-check=full. Command line options are unchanged: usage: wrap [-h] [-w INT] [-r] [-l INT] [-f FILE] Wrap text without messing up email quotes. options: -h show this help message -w INT preferred wrap margin (default 80) -r reflow all paragraphs even if no trailing space -l INT minimum percentage of letters in a line to be considered a paragaph -f FILE read from filename (default stdin) Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Tested-by: Maxwell G <gotmax@e.email>
* ci: move check-patches at the end of pipelinesRobin Jarry2022-12-201-3/+3
| | | | | | | This is less important than reporting actual coding errors. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* contributing: add tooling for git send-emailRobin Jarry2022-12-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Add a gitconfig target in the Makefile to configure a new clone with sane defaults: - set subject prefix - set correct mailing list address - enable sendemail.validate - install sendemail-validate hook The sendemail-validate hook will make a shallow clone of the current upstream repo, apply every patch on it and run some checks (a stripped down version of what is run by the upstream CI). Add a new check-patches script that verifies that the commit message actually contains something and that the Signed-off-by trailer from the patch author is present. Call check-patches in both the CI and the sendemail-validate hook. Update CONTRIBUTING.md accordingly. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
* go: bumped minimum required version 1.16Moritz Poldrack2022-08-051-2/+2
| | | | | | | | Due to github.com/daixiang0/gci requiring io/fs, the minimum required Go version for aerc needs to be bumped to 1.16 Signed-off-by: Moritz Poldrack <git@moritz.sh> Signed-off-by: Robin Jarry <robin@jarry.cc>
* ci: add missing yaml document headerRobin Jarry2022-07-111-0/+1
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* ci: fix go-1.13 installationMoritz Poldrack2022-06-281-4/+4
| | | | | | | | | | For some reason the official way of getting older Go versions does not work, this patch makes the CI downgrade the package on a package manager level Signed-off-by: Moritz Poldrack <git@moritz.sh> Tested-by: builds.sr.ht <builds@sr.ht> Acked-by: Robin Jarry <robin@jarry.cc>
* ci: fix go1.13 stepMoritz Poldrack2022-06-261-0/+1
| | | | | | | | | | | | Fix the following error: + make GO=/home/build/go/bin/go1.13 make: *** No targets specified and no makefile found. Stop. Fixes: dbc5bb41a51b ("ci: slim down CI Pipeline") Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* mk: merge checkfmt into lintRobin Jarry2022-06-241-3/+0
| | | | | | No need to have two separate targets. Signed-off-by: Robin Jarry <robin@jarry.cc>
* mk: add lint targetMoritz Poldrack2022-06-241-0/+3
| | | | | | | | Run go vet only for now. More linters can be added later. Run linters in the CI pipeline. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* ci: slim down CI PipelineMoritz Poldrack2022-06-244-49/+4
| | | | | | | | | | | | | | | | | | | | | Since the totality of sourcehut only has 4 CI slots at the moment, slim the CI pipeline down to the lowest common denominator: Linux (alpine-edge) - GNU make - latest Go version - Go1.13 OpenBSD - BSD make - latest available Go Version (currently lagging behind 1 version) We might also want to consider changing OpenBSD to FreeBSD as to my knowledge FreeBSD is the more common Home-Computer-Version of BSD instead of OpenBSD which is mainly used for servers. (please don't lynch me, dear 3 OpenBSD people) Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* builds: add gnupg in preparation of gpg integrationRobin Jarry2022-04-144-0/+4
| | | | | | This is required for future gpg unit tests to run. Signed-off-by: Robin Jarry <robin@jarry.cc>
* builds: test with notmuchRobin Jarry2022-04-143-0/+6
| | | | | | This is never tested. Let's check that it compiles at least. Signed-off-by: Robin Jarry <robin@jarry.cc>
* builds: reformat yamlRobin Jarry2022-04-144-50/+53
| | | | | | Use two spaces for indentation consistently. Signed-off-by: Robin Jarry <robin@jarry.cc>
* build: check make installMark Dain2022-01-244-0/+24
| | | | Ensure that install works on all platforms.
* build: replace archlinux by openbsdMark Dain2022-01-242-13/+14
| | | | | | | This commit drops Arch Linux in favor of a BSD so there's more variety in CI. Link: https://lists.sr.ht/~rjarry/aerc-devel/%3C20220122033806.91728-1-ktprograms%40gmail.com%3E
* build: add multiple distributionsRobin Jarry2022-01-204-0/+55
Add build and test on debian, fedora and archlinux. Only check code formatting on alpine. Signed-off-by: Robin Jarry <robin@jarry.cc>