* Move binrz meson directives to binrz/ dir * Move rizin-shell-parser to a subproject * Move bochs to a meson subproject * Move rzqnx to meson subproject * Move winkd to a meson subproject * Move rzar to a meson subproject * Move rzw32dbg_wrap to a meson subproject * Move ptrace-wrap to a meson subproject * Move rzgdb to a meson subproject * Rename w32dbg_wrap to rzw32dbg_wrap * Update CODEOWNERS * Remove old references to shlr * Move shlr/heap stuff in core and remove shlr/arm * Move spp to a meson subproject * Remove last references to shlr * Remove use_webui option * Move include files directives to librz/include/meson.build * Move librz meson directives into librz/meson.build * Handle d/ directories inside the specific module meson.build * Move plugins listing to specific module meson.build * Move rzheap to its own subproject * Fix js linter and licenses * Use meson.override_dependency for all rz_ modules
131 lines
4 KiB
YAML
131 lines
4 KiB
YAML
name: "Mixed linter and checks"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'dev'
|
|
- 'stable'
|
|
- 'container-*'
|
|
pull_request:
|
|
|
|
jobs:
|
|
changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
yaml: ${{ steps.filter.outputs.yaml }}
|
|
clang-format: ${{ steps.filter.outputs.clang-format }}
|
|
prettier: ${{ steps.filter.outputs.prettier }}
|
|
python: ${{ steps.filter.outputs.python }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: dorny/paths-filter@v2
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
yaml:
|
|
- '**.yml'
|
|
- '**.yaml'
|
|
- '.github/workflows/linter.yml'
|
|
clang-format:
|
|
- '**.c'
|
|
- '**.h'
|
|
- '**.in'
|
|
- '**.inc'
|
|
- '.github/workflows/linter.yml'
|
|
- 'sys/clang-format.py'
|
|
- '.clang-format'
|
|
prettier:
|
|
- '**.js'
|
|
- '.github/workflows/linter.yml'
|
|
python:
|
|
- '**.py'
|
|
- '.github/workflows/linter.yml'
|
|
- '.pylintrc'
|
|
|
|
cmd_descs_yaml_check:
|
|
needs: changes
|
|
runs-on: ubuntu-20.04
|
|
if: ${{ needs.changes.outputs.yaml == 'true' }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install tools
|
|
run: sudo apt-get install yamllint python3-yaml
|
|
- name: Check YamlLint
|
|
run: |
|
|
yamllint -d "{rules: {line-length: {max: 120}}}" ./librz/core/cmd_descs/*.yaml
|
|
- name: Check sync between yaml and C/H files
|
|
run: |
|
|
./librz/core/cmd_descs/cmd_descs_generate.py --output-dir /tmp ./librz/core/cmd_descs/*.yaml
|
|
diff /tmp/cmd_descs.c ./librz/core/cmd_descs/cmd_descs.c && diff /tmp/cmd_descs.h ./librz/core/cmd_descs/cmd_descs.h
|
|
|
|
clang-format:
|
|
needs: changes
|
|
runs-on: ubuntu-20.04
|
|
if: ${{ needs.changes.outputs.clang-format == 'true' }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install wget, software-properties-common, lsb-release (dependencies of LLVM install script)
|
|
run: sudo apt --assume-yes install wget software-properties-common lsb-release
|
|
|
|
- name: Install automatic LLVM 13
|
|
run: wget https://apt.llvm.org/llvm.sh -O /tmp/llvm-install.sh; chmod +x /tmp/llvm-install.sh; sudo /tmp/llvm-install.sh 13
|
|
|
|
- name: Install clang-format-13
|
|
run: sudo apt --assume-yes install clang-format-13
|
|
|
|
- name: Install gitpython
|
|
run: sudo pip install gitpython
|
|
|
|
- name: Run clang-format
|
|
run: |
|
|
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-13 130
|
|
clang-format --version
|
|
python sys/clang-format.py --check --verbose
|
|
|
|
prettier:
|
|
needs: changes
|
|
runs-on: ubuntu-20.04
|
|
if: ${{ needs.changes.outputs.prettier == 'true' }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install prettier
|
|
run: |
|
|
sudo apt --assume-yes install npm
|
|
npm install prettier
|
|
|
|
- name: Run prettier
|
|
run: find . -name "*.js" | grep -v "subprojects/tree-sitter-0" | grep -v "bindings/node/index.js" | xargs npx prettier --print-width 120 --check
|
|
|
|
python:
|
|
needs: changes
|
|
runs-on: ubuntu-20.04
|
|
if: ${{ needs.changes.outputs.python == 'true' }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install pylint, black, isort
|
|
run: pip install pylint black isort
|
|
|
|
- name: Run black
|
|
run: |
|
|
export PATH=${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
|
|
find . -name "*.py" | grep -v "subprojects" | xargs black --check
|
|
|
|
- name: Run pylint
|
|
run: |
|
|
export PATH=${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
|
|
find . -name "*.py" | grep -v "subprojects" | grep -v "librz/bin/format/xnu/scripts/" | xargs pylint
|
|
|
|
licenses:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: REUSE Compliance Check
|
|
uses: fsfe/reuse-action@v1.1
|