Skip to content

Commit

Permalink
Add concurrency setting to codeql workflow (#22678)
Browse files Browse the repository at this point in the history
### Description
1. Add concurrency setting to codeql workflow
2. Modify lint workflow's PATH setting.


### Motivation and Context
To save machine resource.
  • Loading branch information
snnn authored Oct 31, 2024
1 parent 8e8b62b commit f9bc24e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit f9bc24e

Please sign in to comment.