Compare commits
1 Commits
79832ef86c
...
c6bc85ccd5
| Author | SHA1 | Date | |
|---|---|---|---|
|
c6bc85ccd5
|
4
.github/workflows/ci-code.yml
vendored
4
.github/workflows/ci-code.yml
vendored
@@ -45,10 +45,10 @@ jobs:
|
||||
# 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
|
||||
[[ "$(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|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true
|
||||
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
|
||||
|
||||
64
.github/workflows/codeql.yml
vendored
64
.github/workflows/codeql.yml
vendored
@@ -1,64 +0,0 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: 'c-cpp'
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libcmocka-dev libcurl4-openssl-dev libgcrypt20-dev libglib2.0-dev \
|
||||
libgpgme-dev libgtk-3-dev libmicrohttpd-dev libncursesw5-dev \
|
||||
libnotify-dev libotr5-dev libreadline-dev libsignal-protocol-c-dev \
|
||||
libomemo-c-dev libssl-dev libtool libxss-dev meson ninja-build \
|
||||
pkg-config python3-dev python-dev-is-python3 libsqlite3-dev \
|
||||
libgdk-pixbuf-2.0-dev libqrencode-dev libenchant-2-dev \
|
||||
autoconf autoconf-archive automake cmake expect
|
||||
|
||||
- name: Install stabber and libstrophe
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/profanity-im/stabber /tmp/stabber
|
||||
cd /tmp/stabber && ./bootstrap.sh && ./configure --prefix=/usr && make -j$(nproc) && sudo make install
|
||||
|
||||
git clone --depth 1 https://github.com/strophe/libstrophe /tmp/libstrophe
|
||||
cd /tmp/libstrophe && ./bootstrap.sh && ./configure --prefix=/usr && make -j$(nproc) && sudo make install
|
||||
|
||||
- name: Build for Analysis
|
||||
run: |
|
||||
meson setup build_codeql \
|
||||
-Dnotifications=enabled \
|
||||
-Dpython-plugins=enabled \
|
||||
-Dc-plugins=enabled \
|
||||
-Dotr=enabled \
|
||||
-Dpgp=enabled \
|
||||
-Domemo=enabled \
|
||||
-Domemo-qrcode=enabled \
|
||||
-Dicons-and-clipboard=enabled \
|
||||
-Dgdk-pixbuf=enabled \
|
||||
-Dxscreensaver=enabled \
|
||||
-Dspellcheck=enabled \
|
||||
-Dtests=false
|
||||
meson compile -C build_codeql
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:c-cpp"
|
||||
34
.github/workflows/commit-lint.yml
vendored
34
.github/workflows/commit-lint.yml
vendored
@@ -1,34 +0,0 @@
|
||||
name: "Lint"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
name: "conventional commits"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Fetch all history so commitlint can see the commits in the PR
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Conventional Commits"
|
||||
uses: wagoid/commitlint-github-action@v6
|
||||
|
||||
dco:
|
||||
name: "DCO"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Get PR Commits"
|
||||
id: "get-pr-commits"
|
||||
uses: tim-actions/get-pr-commits@v1.3.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: "Check DCO"
|
||||
uses: tim-actions/dco@v1.1.0
|
||||
with:
|
||||
commits: ${{ steps.get-pr-commits.outputs.commits }}
|
||||
81
.github/workflows/cygwin-build.yml
vendored
81
.github/workflows/cygwin-build.yml
vendored
@@ -1,81 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
cygwin-build:
|
||||
name: cygwin / build only
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
CYGWIN: winsymlinks:nativestrict
|
||||
|
||||
# Wrapper:
|
||||
# - convert temp script + workspace to POSIX paths
|
||||
# - strip CRLF
|
||||
# - enable igncr and run under Cygwin bash
|
||||
defaults:
|
||||
run:
|
||||
shell: >
|
||||
C:\tools\cygwin\bin\bash.EXE --login -eo pipefail -c
|
||||
"p=$(/usr/bin/cygpath -au '{0}');
|
||||
w=$(/usr/bin/cygpath -au '${{ github.workspace }}');
|
||||
/usr/bin/sed -i 's/\r$//' \"$p\" || true;
|
||||
set -o igncr;
|
||||
cd \"$w\" || (/usr/bin/pwd; /usr/bin/ls -la; exit 2);
|
||||
/usr/bin/bash -leo pipefail \"$p\""
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Cygwin with build dependencies
|
||||
uses: egor-tensin/setup-cygwin@v4
|
||||
with:
|
||||
packages: >-
|
||||
meson
|
||||
ninja
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
make
|
||||
pkg-config
|
||||
autoconf-archive
|
||||
gcc-core
|
||||
gettext-devel
|
||||
git
|
||||
libncursesw-devel
|
||||
libglib2.0-devel
|
||||
libcurl-devel
|
||||
libreadline-devel
|
||||
libsqlite3-devel
|
||||
libexpat-devel
|
||||
libcmocka-devel
|
||||
|
||||
- name: Build and install libstrophe from source
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
mkdir -p deps && cd deps
|
||||
git clone --depth 1 https://github.com/strophe/libstrophe.git
|
||||
cd libstrophe
|
||||
autoreconf -i
|
||||
./configure --prefix=$PWD/install
|
||||
make -j2 install
|
||||
|
||||
- name: Meson setup
|
||||
env:
|
||||
CC: /usr/bin/gcc
|
||||
PKG_CONFIG_PATH: ${{ github.workspace }}/deps/libstrophe/install/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
meson setup build_run
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
meson compile -C build_run
|
||||
80
.github/workflows/functional-tests.yml
vendored
80
.github/workflows/functional-tests.yml
vendored
@@ -1,80 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-func-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
functional-tests:
|
||||
runs-on: ubuntu-latest
|
||||
name: ubuntu | func | signal
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libcmocka-dev libcurl4-openssl-dev libgcrypt20-dev libglib2.0-dev \
|
||||
libgpgme-dev libgtk-3-dev libmicrohttpd-dev libncursesw5-dev \
|
||||
libnotify-dev libotr5-dev libreadline-dev libsignal-protocol-c-dev \
|
||||
libomemo-c-dev libssl-dev libtool libxss-dev meson ninja-build \
|
||||
pkg-config python3-dev python-dev-is-python3 libsqlite3-dev \
|
||||
libgdk-pixbuf-2.0-dev libqrencode-dev libenchant-2-dev \
|
||||
autoconf autoconf-archive automake cmake expect
|
||||
|
||||
- name: Install stabber
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/profanity-im/stabber /tmp/stabber
|
||||
cd /tmp/stabber
|
||||
./bootstrap.sh
|
||||
./configure --prefix=/usr
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
|
||||
- name: Install libstrophe (master)
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/strophe/libstrophe /tmp/libstrophe
|
||||
cd /tmp/libstrophe
|
||||
./bootstrap.sh
|
||||
./configure --prefix=/usr
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
|
||||
- name: Configure and Build
|
||||
run: |
|
||||
# Use --buildtype=debugoptimized (-O2) for fast execution.
|
||||
# Explicitly disable sanitizers to avoid the performance penalty.
|
||||
meson setup build_run \
|
||||
--buildtype=debugoptimized \
|
||||
-Db_sanitize=none \
|
||||
-Dnotifications=enabled \
|
||||
-Dpython-plugins=enabled \
|
||||
-Dc-plugins=enabled \
|
||||
-Dotr=enabled \
|
||||
-Dpgp=enabled \
|
||||
-Domemo=enabled \
|
||||
-Domemo-qrcode=enabled \
|
||||
-Dicons-and-clipboard=enabled \
|
||||
-Dgdk-pixbuf=enabled \
|
||||
-Dxscreensaver=enabled \
|
||||
-Dspellcheck=enabled \
|
||||
-Dtests=true
|
||||
meson compile -C build_run profanity:executable functionaltests
|
||||
|
||||
- name: Verify Profanity Binary
|
||||
run: |
|
||||
./build_run/profanity --version
|
||||
|
||||
- name: Run Functional Tests
|
||||
env:
|
||||
TERM: xterm
|
||||
LC_ALL: C.UTF-8
|
||||
run: |
|
||||
./build_run/functionaltests
|
||||
45
.github/workflows/style.yml
vendored
45
.github/workflows/style.yml
vendored
@@ -1,45 +0,0 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
code-style:
|
||||
runs-on: ubuntu-22.04
|
||||
name: 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)" == "9" ]] || exit -1
|
||||
- name: Check auto types are initialized
|
||||
run: |
|
||||
grep -P 'auto_(char|gchar|gcharv|gerror|guchar|jid|sqlite|gfd|FILE)[\w *]*;$' -r src && exit -1 || true
|
||||
- name: Run clang-format
|
||||
uses: jidicula/clang-format-action@v4.16.0
|
||||
with:
|
||||
clang-format-version: '21'
|
||||
check-path: 'src'
|
||||
|
||||
spell-check:
|
||||
runs-on: ubuntu-22.04
|
||||
name: spellcheck
|
||||
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
|
||||
Reference in New Issue
Block a user