Add concurrency setting to codeql workflow (#22678)

### Description
1. Add concurrency setting to codeql workflow
2. Modify lint workflow's PATH setting.


### Motivation and Context
To save machine resource.
This commit is contained in:
Changming Sun 2024-10-31 16:01:07 -07:00 committed by GitHub
parent 8e8b62b8b5
commit f9bc24e1a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 3 deletions

View file

@ -15,6 +15,10 @@ on:
schedule:
- cron: '41 13 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze

View file

@ -49,10 +49,15 @@ jobs:
with:
toolchain: stable
components: rustfmt
- name: Update PATH
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Install dependencies
run: |
python -m pip install -r requirements-dev.txt
python -m pip install lintrunner lintrunner-adapters
set -e -x
python -m pip install --user -r requirements-dev.txt
python -m pip install --user lintrunner lintrunner-adapters
lintrunner init
- name: Run lintrunner on all files
run: |
@ -81,8 +86,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Update PATH
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Install ninja
run: python -m pip install --upgrade ninja
run: python -m pip install --user --upgrade ninja
- name: Generate compile_commands.json
run: |
python tools/ci_build/build.py \