Files
cproof/.github/workflows/main.yml
Jabber Developer 2bd56d35c0
Some checks failed
CI / Linux (debian) (pull_request) Has been cancelled
CI / Linux (fedora) (pull_request) Has been cancelled
CI / Linux (ubuntu) (pull_request) Has been cancelled
CI / Linux (arch) (pull_request) Has been cancelled
CI / Check spelling (pull_request) Has been cancelled
CI / Check coding style (pull_request) Failing after 1m32s
Fix workflow
2025-06-19 23:13:47 +02:00

77 lines
2.2 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: [arch, 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-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)" == "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: Show workspace dir
run: |
echo "PWD: $(pwd)"
echo "GITHUB_WORKSPACE: ${{ github.workspace }}"
echo "env GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
ls -l
ls -l src || echo "src directory not found"
- name: Run clang-format
uses: jidicula/clang-format-action@v4.15.0
with:
clang-format-version: '20'
check-path: 'src'
- name: Show workspace dir after
run: |
echo "PWD: $(pwd)"
echo "GITHUB_WORKSPACE: ${{ github.workspace }}"
echo "env GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
ls -l
ls -l src || echo "src directory not found"
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