Skip to content

[CI] Try to fix lint issues #9876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2023
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
31 changes: 11 additions & 20 deletions .github/workflows/sycl_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,21 @@ jobs:
# actions/checkout fails without "--privileged".
options: -u 1001:1001 --privileged
steps:
- name: Fake actions/checkout task
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
# cached_checkout below uses actions/checkout internally. However, when
# actions/checkout is run from within another action step (not from
# workflow), github seems to try to download from within the container
# and doesn't have requried filesystem permissions. Make sure it's
# already downloaded by the time it's needed by checking out some small
# repository.
repository: actions/checkout
path: fake-checkout
- name: 'PR commits + 1'
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- name: Setup action
# We can switch to `cp -r /actions .` once changes in cached_checkout are
# propagated into the nightly container image.
run: |
mkdir -p actions/cached_checkout
wget raw.githubusercontent.com/intel/llvm/sycl/devops/actions/cached_checkout/action.yml -P ./actions/cached_checkout
- uses: ./actions/cached_checkout
ref: ${{ github.event.pull_request.merge_commit_sha }}
sparse-checkout: |
devops/actions/cached_checkout
- name: 'PR commits + 2'
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 2 ))" >> "${GITHUB_ENV}"
- uses: ./devops/actions/cached_checkout
with:
path: src
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
ref: ${{ github.event.pull_request.head.sha }}
# clang-format uses github.event.pull_request.base.sha that has the top
# of the base branch, not the merge base. As such, checkout the merge
# commit instead of github.event.pull_request.head.sha.
ref: ${{ github.event.pull_request.merge_commit_sha }}
cache_path: "/__w/repo_cache/"
merge: false
- name: Run clang-format
Expand Down