Skip to content

Commit f9bc24e

Browse files
authored
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.
1 parent 8e8b62b commit f9bc24e

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/codeql.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
schedule:
1616
- cron: '41 13 * * 0'
1717

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
20+
cancel-in-progress: true
21+
1822
jobs:
1923
analyze:
2024
name: Analyze

.github/workflows/lint.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,15 @@ jobs:
4949
with:
5050
toolchain: stable
5151
components: rustfmt
52+
- name: Update PATH
53+
run: |
54+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
55+
5256
- name: Install dependencies
5357
run: |
54-
python -m pip install -r requirements-dev.txt
55-
python -m pip install lintrunner lintrunner-adapters
58+
set -e -x
59+
python -m pip install --user -r requirements-dev.txt
60+
python -m pip install --user lintrunner lintrunner-adapters
5661
lintrunner init
5762
- name: Run lintrunner on all files
5863
run: |
@@ -81,8 +86,12 @@ jobs:
8186
runs-on: ubuntu-latest
8287
steps:
8388
- uses: actions/checkout@master
89+
- name: Update PATH
90+
run: |
91+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
92+
8493
- name: Install ninja
85-
run: python -m pip install --upgrade ninja
94+
run: python -m pip install --user --upgrade ninja
8695
- name: Generate compile_commands.json
8796
run: |
8897
python tools/ci_build/build.py \

0 commit comments

Comments
 (0)