Skip to content

[CI] Enable pre-commit testing on Windows #8980

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 6 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
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
11 changes: 10 additions & 1 deletion .github/workflows/sycl_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: ./.github/workflows/sycl_gen_test_matrix.yml
with:
ref: ${{ github.event.pull_request.head.sha }}
lts_config: "hip_amdgpu;ocl_x64;ocl_gen9;l0_gen9;esimd_emu;cuda_aws"
lts_config: "hip_amdgpu;ocl_x64;ocl_gen9;l0_gen9;esimd_emu;cuda_aws;win_l0_gen12"

linux_default:
name: Linux
Expand All @@ -66,3 +66,12 @@ jobs:
build_cache_suffix: "default"
lts_matrix: ${{ needs.test_matrix.outputs.lts_lx_matrix }}
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}

windows_default:
name: Windows
needs: test_matrix
if: github.repository == 'intel/llvm'
uses: ./.github/workflows/sycl_windows_build_and_test.yml
with:
lts_matrix: ${{ needs.test_matrix.outputs.lts_wn_matrix }}
build_ref: ${{ github.event.pull_request.head.sha }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that it follows Linux path, but maybe github.ref could be a better choice:

The fully-formed ref of the branch or tag that triggered the workflow run. For workflows triggered by push, this is the branch or tag ref that was pushed. For workflows triggered by pull_request, this is the pull request merge branch. For workflows triggered by release, this is the release tag created. For other triggers, this is the branch or tag ref that triggered the workflow run. This is only set if a branch or tag is available for the event type. The ref given is fully-formed, meaning that for branches the format is refs/heads/<branch_name>, for pull requests it is refs/pull/<pr_number>/merge, and for tags it is refs/tags/<tag_name>. For example, refs/heads/feature-branch-1.

Anyway, could/should be a separate PR if at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Perhaps a separate PR for fixes to both Linux and Windows jobs would be better.

12 changes: 10 additions & 2 deletions .github/workflows/windows_test_comment_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,27 @@ jobs:
outputs:
PR_SHA: ${{ steps.sha.outputs.result }}

test_matrix:
name: Generate Test Matrix
needs: [windows_test_preparation]
if: github.repository == 'intel/llvm'
uses: ./.github/workflows/sycl_gen_test_matrix.yml
with:
lts_config: "win_l0_gen12"

windows_default:
name: Windows
needs: [windows_test_preparation]
needs: [windows_test_preparation, test_matrix]
if: github.repository == 'intel/llvm'
uses: ./.github/workflows/sycl_windows_build_and_test.yml
with:
build_ref: ${{ needs.windows_test_preparation.outputs.PR_SHA }}
lts_matrix: ${{ needs.test_matrix.outputs.lts_wn_matrix }}

windows_test_completion:
runs-on: ubuntu-20.04
needs: [windows_test_preparation, windows_default]
if: always()
if: ${{ always() && needs.windows_test_preparation.result != 'skipped' }}
steps:
- name: update_pr_status_success
if: needs.windows_default.result == 'success'
Expand Down