Skip to content

Refactor build of C++ for pygambit extension. #1048

Refactor build of C++ for pygambit extension.

Refactor build of C++ for pygambit extension. #1048

Workflow file for this run

name: Linters and coding standards checks
on:
push:
pull_request:
jobs:
clang-format:
name: clang-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++
uses: jidicula/clang-format-action@v4.11.0
with:
clang-format-version: '17'
check-path: 'src'
include-regex: '^.*\.((((c|C)(c|pp|xx|\+\+)?$)|((h|H)h?(pp|xx|\+\+)?$))|(imp))$'
clang-tidy:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
sudo apt-add-repository 'deb https://repos.codelite.org/wx3.1.5/ubuntu/ focal universe'
sudo apt-get update
sudo apt-get install -y automake autoconf clang-tidy
sudo apt-get install -y libwxbase3.1-0-unofficial \
libwxbase3.1unofficial-dev \
libwxgtk3.1-0-unofficial \
libwxgtk3.1unofficial-dev \
wx3.1-headers \
wx-common
- run: aclocal
- run: automake --add-missing
- run: autoconf
- run: ./configure
- run: make clang-tidy
ruff:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
flake8:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: py-actions/flake8@v2
cython-lint:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python packages
run: python -m pip install cython-lint
- name: cython-lint
run: cython-lint .