[AANT-2053] Build XCFramework for MacCatalyst #4
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: Lint | |
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
jobs: | |
lint-python: | |
name: Lint Python | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: flake8 | |
uses: reviewdog/action-flake8@v3 | |
with: | |
github_token: ${{ secrets.github_token }} | |
# Change reviewdog reporter if you need [github-pr-check, github-check, github-pr-review]. | |
reporter: github-pr-check | |
# Change reporter level if you need. | |
# GitHub Status Check won't become failure with a warning. | |
level: error | |
filter_mode: file | |
- name: pyflakes | |
uses: reviewdog/action-pyflakes@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-check | |
level: warning | |
- name: misspell # Check spellings as well | |
uses: reviewdog/action-misspell@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
locale: "US" | |
reporter: github-pr-check | |
level: info | |
filter_mode: diff_context | |
- name: shellcheck # Static check shell scripts | |
uses: reviewdog/action-shellcheck@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-check | |
level: info | |
filter_mode: file | |
- name: pyright | |
uses: jordemort/action-pyright@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-check | |
level: warning | |
filter_mode: added | |
lib: true | |
pyright_version: 1.1.291 | |
- name: pylint | |
uses: dciborow/[email protected] | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-check | |
level: warning | |
filter_mode: diff_context | |
glob_pattern: "**/*.py" | |
lint-python-format: | |
# Separated black/isort from other Python linters because we want this job to | |
# fail and not affect other linters | |
# According to https://black.readthedocs.io/en/stable/integrations/github_actions.html: | |
# We recommend the use of the @stable tag, but per version tags also exist if you prefer that. | |
# Note that the action’s version you select is independent of the version of Black the action will use. | |
# The version of Black the action will use can be configured via version. | |
name: Python format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- uses: psf/black@stable | |
with: | |
options: "--check --diff --color" | |
version: "22.12.0" | |
- uses: isort/isort-action@master | |
lint-cpp: | |
name: Lint C++ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install ninja | |
run: python -m pip install --upgrade ninja | |
- name: Generate compile_commands.json | |
run: | | |
python tools/ci_build/build.py \ | |
--cmake_generator "Ninja" \ | |
--build_dir build \ | |
--update \ | |
--cmake_extra_defines CMAKE_EXPORT_COMPILE_COMMANDS=ON | |
- name: Generate ONNX protobuf files | |
run: cmake --build build/Debug --config Debug --target onnx_proto | |
# - name: Run clang-tidy | |
# uses: ZedThree/clang-tidy-review@526cbfb043719639f1ebdeedae0cc1eacd219d8f | |
# with: | |
# token: ${{ secrets.github_token }} | |
# build_dir: "build/Debug" | |
# config_file: ".clang-tidy" | |
# lgtm_comment_body: "" | |
- uses: reviewdog/action-cpplint@master | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-check | |
level: warning | |
flags: --linelength=120 --exclude=java/src/main/native/*.c | |
filter: "-runtime/references" | |
lint-js: | |
name: Lint JavaScript | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: reviewdog/action-eslint@v1 | |
with: | |
reporter: github-pr-check | |
level: error | |
filter_mode: file | |
eslint_flags: "--ext .ts --ext .tsx" | |
workdir: "js/" |