Files
mscclpp/.github/workflows/lint.yml
Changho Hwang 544ff0c21d ROCm support (#213)
Co-authored-by: Binyang Li <binyli@microsoft.com>
2023-11-24 16:41:56 +08:00

59 lines
1.4 KiB
YAML

name: Lint
on:
pull_request:
branches:
- '**'
jobs:
cpplint:
runs-on: ubuntu-20.04
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install ClangFormat
run: |
sudo apt-get update
sudo apt-get install -y clang-format
- name: Run cpplint
run: |
CPPSOURCES=$(find ./src ./include ./python ./test -regextype posix-extended -regex '.*\.(c|cpp|h|hpp|cc|cxx|cu)')
clang-format -style=file --verbose --Werror --dry-run ${CPPSOURCES}
pylint:
runs-on: ubuntu-20.04
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3
- name: Install Python dependencies
run: python3 -m pip install black
- name: Run black
run: python3 -m black --check --config pyproject.toml .
spelling:
runs-on: ubuntu-20.04
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Download misspell
run: |
curl -L https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_linux_64bit.tar.gz -o /tmp/misspell_0.3.4_linux_64bit.tar.gz
tar -xzf /tmp/misspell_0.3.4_linux_64bit.tar.gz -C .
- name: Check spelling
run: |
./misspell -error .