Will need to fix this soon. Lets temp remove arch to get results for the
other systems.
Build fail on Arch:
```
src/pgp/gpg.c: In function ‘p_gpg_decrypt’:
src/pgp/gpg.c:659:36: error: implicit declaration of function ‘gpgme_key_get_string_attr’ [-Wimplicit-function-declaration]
659 | const char* addr = gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
src/pgp/gpg.c:659:67: error: ‘GPGME_ATTR_EMAIL’ undeclared (first use in this function)
659 | const char* addr = gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0);
| ^~~~~~~~~~~~~~~~
src/pgp/gpg.c:659:67: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:2085: src/pgp/gpg.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1314: all] Error 2
```
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
flavor: [debian, fedora, ubuntu]
|
|
|
|
name: Linux
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Run tests
|
|
run: |
|
|
docker build -f Dockerfile.${{ matrix.flavor }} -t profanity .
|
|
docker run profanity ./ci-build.sh
|
|
|
|
code-style:
|
|
runs-on: ubuntu-22.04
|
|
name: Check coding style
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
# if this check fails, you have to update the number of auto types known and the list of auto types in the check below
|
|
- name: Check auto types are up-to-date
|
|
run: |
|
|
[[ "$(find src -type f -name '*.[ch]' -exec awk '/^#define auto_[\W]*/ {print $2}' '{}' \; | sort -u | wc -l)" == "8" ]] || exit -1
|
|
- name: Check auto types are initialized
|
|
run: |
|
|
grep -P 'auto_(char|gchar|gcharv|guchar|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true
|
|
- name: Run clang-format
|
|
uses: jidicula/clang-format-action@v4.11.0
|
|
with:
|
|
clang-format-version: '16'
|
|
check-path: 'src'
|
|
|
|
spell-check:
|
|
runs-on: ubuntu-22.04
|
|
name: Check spelling
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y --no-install-recommends codespell
|
|
- name: Check spelling
|
|
run: |
|
|
codespell
|