All checks were successful
CI Code / Check coding style (pull_request) Successful in 32s
CI Code / Check spelling (pull_request) Successful in 15s
CI Code / Linux (debian) (pull_request) Successful in 6m43s
CI Code / Linux (ubuntu) (pull_request) Successful in 6m49s
CI Code / Linux (arch) (pull_request) Successful in 8m52s
CI Code / Code Coverage (pull_request) Successful in 7m19s
Merge profanity-im/profanity master (373 commits) into cproof fork.
Source changes (manual merge):
- src/command/: cmd_defs, cmd_funcs, cmd_ac — upstream g_new0, auto_gchar,
launch_editor callback; keep our XEP-0308 LMC, force-encryption, CWE-134
- src/config/: preferences, tlscerts, account — upstream UNIQUE dedup,
dynamic pad capacity; keep our db_history_result_t, scroll logic
- src/database.*: upstream g_new0 memory mgmt; keep our return types,
add null-check fix for msg->timestamp
- src/omemo/, src/pgp/: upstream _gpgme_key_get_email, g_new0;
keep our replace_id in omemo_on_message_send
- src/tools/: editor, http_upload, bookmark_ignore — upstream launch_editor
callback API
- src/ui/: console, window, chatwin, mucwin, inputwin, buffer —
upstream win_warn_needed/sent dedup, PAD_MIN_HEIGHT dynamic pads;
keep our y_start_pos scroll, _truncate_datetime_suffix
- src/xmpp/: message, stanza, presence, roster_list, iq, session —
upstream connection_get_available_resources; keep our LMC stanza logic
- src/common.c: fix format-security (cons_show)
Build system:
- Makefile.am: updated test paths to subdirectory structure, added
test_cmd_ac, test_forced_encryption
- Restored autotools files deleted by upstream meson migration:
bootstrap.sh, autogen.sh, m4/ax_valgrind_check.m4, configure-debug
Tests:
- Unit tests: upstream unittests.c base + our forced_encryption tests
(482 passed, 0 failed across all 4 configurations)
- Functional tests: kept our version (93 passed, 0 failed)
upstream version requires stbbr_for_xmlns not yet in our stabber fork
- Updated test stubs: stub_xmpp.c, stub_omemo.c from upstream
Compile fixes:
- src/common.c: cons_show(errmsg) -> cons_show("%s", errmsg)
- src/database.c: null-check before msg->timestamp access
- src/ui/console.c: size_t -> (int) cast for format width
- src/config/tlscerts.c: %d -> %zu for size_t
113 lines
3.3 KiB
YAML
113 lines
3.3 KiB
YAML
name: CI Code
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- 'apidocs/**'
|
|
- 'README.md'
|
|
pull_request:
|
|
branches: [master]
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- 'apidocs/**'
|
|
- 'README.md'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
flavor: [arch, debian, ubuntu]
|
|
|
|
name: Linux
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build
|
|
run: docker build -f ci/Dockerfile.${{ matrix.flavor }} -t profanity .
|
|
- name: Run tests
|
|
run: docker run profanity ./ci-build.sh
|
|
|
|
code-style:
|
|
runs-on: ubuntu-latest
|
|
name: Check coding style
|
|
continue-on-error: true
|
|
env:
|
|
GITHUB_WORKSPACE: ${{ runner.workspace }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
# 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)" == "9" ]] || exit -1
|
|
- name: Check auto types are initialized
|
|
run: |
|
|
grep -P 'auto_(char|gchar|gcharv|guchar|gerror|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true
|
|
|
|
- name: Check CWE-134 format string vulnerabilities
|
|
run: ./check-cwe134.sh
|
|
|
|
- name: Install clang-format
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y clang-format
|
|
|
|
- name: Run clang-format check
|
|
run: |
|
|
echo $(clang-format --version)
|
|
# Find all source files you care about
|
|
INCLUDE_REGEX='^.*\.((((c|C)(c|pp|xx|\+\+)?$)|((h|H)h?(pp|xx|\+\+)?$))|(ino|pde|proto|cu))$'
|
|
CHECK_PATH='src'
|
|
files=$(find "$CHECK_PATH" -name .git -prune -o -regextype posix-egrep -regex "$INCLUDE_REGEX" -print)
|
|
if [ -z "$files" ]; then
|
|
echo "✅ No source files found to check."
|
|
exit 0
|
|
fi
|
|
|
|
# Run clang-format in dry-run mode and collect any improperly formatted files
|
|
failed=0
|
|
for file in $files; do
|
|
if ! output=$(clang-format --dry-run --Werror --style=file "$file" 2>&1); then
|
|
echo "❌ Failed on file: $file"
|
|
echo "$output"
|
|
echo "----------------------------------------"
|
|
failed=1
|
|
fi
|
|
done
|
|
|
|
if [ $failed -ne 0 ]; then
|
|
echo "🚫 One or more files are not properly formatted."
|
|
else
|
|
echo "✅ All files are properly formatted."
|
|
fi
|
|
exit $failed
|
|
|
|
spell-check:
|
|
runs-on: ubuntu-latest
|
|
name: Check spelling
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y --no-install-recommends codespell
|
|
- name: Check spelling
|
|
run: |
|
|
codespell
|
|
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
name: Code Coverage
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build
|
|
run: docker build -f ci/Dockerfile.arch -t profanity-cov .
|
|
- name: Run coverage
|
|
run: docker run profanity-cov ./ci-build.sh --coverage-only |