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

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

merged 6 commits into from
Apr 10, 2023

Conversation

uditagarwal97
Copy link
Contributor

This PR (1) enables running Windows Build + LIT + E2E tests during pre-commit testing, (2) Fix windows_test_comment_trigger workflow after #8656

@uditagarwal97 uditagarwal97 requested a review from a team as a code owner April 6, 2023 19:42
@uditagarwal97 uditagarwal97 temporarily deployed to aws April 6, 2023 20:09 — with GitHub Actions Inactive
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.

if: github.repository == 'intel/llvm'
uses: ./.github/workflows/sycl_gen_test_matrix.yml
with:
lts_config: "l0_gen9;win_l0_gen12"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we have Linux task ("l0_gen9") here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps, we don't need it. I've fixed it.

@uditagarwal97 uditagarwal97 temporarily deployed to aws April 6, 2023 21:01 — with GitHub Actions Inactive
Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

Having both configurations: Windows pre-commit and Windows testing on demand doesn't make sense to me.
We added on-demand Windows testing because according to our estimates CI doesn't have enough resources to handle the load added by Windows pre-commit. Both jobs do the same thing, but pre-commit launches automatically for each commit. On-demand testing is not needed if each commit is tested.

I have no objections to run an experiment with enabling Windows in pre-commit to check how CI will handle the load.

There should be only on configuration, so if you go with pre-commit, please, remove or disable "on-demand" testing.

@romanovvlad, FYI.

@uditagarwal97 uditagarwal97 temporarily deployed to aws April 6, 2023 21:31 — with GitHub Actions Inactive
@uditagarwal97
Copy link
Contributor Author

@bader Agree. I've temporarily disabled the "on-demand" windows testing workflow. We can remove it completely, let's say after a week, if the Windows CI handles the load as we expect.

@uditagarwal97 uditagarwal97 requested a review from bader April 6, 2023 22:19
@uditagarwal97 uditagarwal97 temporarily deployed to aws April 6, 2023 22:42 — with GitHub Actions Inactive
@uditagarwal97 uditagarwal97 temporarily deployed to aws April 6, 2023 23:17 — with GitHub Actions Inactive
@uditagarwal97 uditagarwal97 requested a review from bader April 6, 2023 23:40
@uditagarwal97 uditagarwal97 temporarily deployed to aws April 7, 2023 00:04 — with GitHub Actions Inactive
@uditagarwal97 uditagarwal97 temporarily deployed to aws April 7, 2023 00:33 — with GitHub Actions Inactive
Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

@uditagarwal97
Copy link
Contributor Author

@intel/llvm-gatekeepers The PR is ready!

@uditagarwal97 uditagarwal97 temporarily deployed to aws April 10, 2023 16:34 — with GitHub Actions Inactive
@AaronBallman
Copy link
Contributor

Don't let me hold anything up in this space, but one thing to consider for Windows-specific precommit testing is to build a debug configuration so that we get checked & debug iterator testing (https://learn.microsoft.com/en-us/cpp/standard-library/safe-libraries-cpp-standard-library?view=msvc-170). That helps catch quite a few mistakes (I just fixed one this morning that turned out to be A.find(X) != B.end() where A and B are the same type but different objects -- MSVC debug iterators caught the issue immediately).

@bader bader merged commit 26e4493 into sycl Apr 10, 2023
@bader bader deleted the WinPreCommitTest branch April 10, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants