Ensure instances of auto types are initialized #1260
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
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 | |
macos: | |
runs-on: macos-latest | |
name: macOS | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run brew bundle | |
run: brew bundle | |
- name: Run tests | |
env: | |
# Ensure that "keg-only" Homebrew versions are used. | |
PKG_CONFIG_PATH: "/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig:/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:$PKG_CONFIG_PATH" | |
run: ./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 list of auto types 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)" == "6" ]] || exit -1 | |
- name: Check auto types are initialized | |
run: | | |
grep -P 'auto_(char|gchar|gcharv|guchar|jid|sqlite)[\w *]*;$' -r src && exit -1 || true | |
- name: Run clang-format | |
uses: jidicula/[email protected] | |
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 |