Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/reusable_linux_build_intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,46 @@ jobs:
name: vcpkg-manifest-install-log-${{ inputs.architecture }}-${{ inputs.build_config }}
path: ${{ runner.temp }}/${{ inputs.build_config }}/${{ inputs.build_config }}/vcpkg-manifest-install.log
if-no-files-found: ignore


lint-python-format:
name: Python format
runs-on: [self-hosted, Linux, X64]

permissions:
contents: read

steps:
- uses: actions/checkout@v6

- name: Create Virtual Env
run: |
python3 -m venv .venv
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH

- name: Update PATH
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"

- name: Install dependencies
run: |
set -e -x
python -m pip install -r requirements-dev.txt
lintrunner init

- name: Run lintrunner on all files
run: |
set +e
if ! lintrunner --force-color --all-files --tee-json=lint.json -v; then
echo ""
echo -e "\e[1m\e[36mYou can reproduce these results locally by using \`lintrunner\`. To set up lintrunner locally, see https://github.com/microsoft/onnxruntime/blob/main/docs/Coding_Conventions_and_Standards.md#linting .\e[0m"
exit 1
fi

- name: Cleanup Virtual Environment
if: always()
run: |
if [ -d ".venv" ]; then
echo "Deleting virtual environment..."
rm -rf .venv
fi
Loading