Skip to content
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

Use official Jenkins CI to build and test winp #116

Merged
merged 26 commits into from
Apr 26, 2024

Conversation

pbo-linaro
Copy link
Contributor

@pbo-linaro pbo-linaro commented Apr 25, 2024

This PR is the answer to he discussion we had on arm64 support (#112).

Basically, it was identified that the current situation was not satisfying, and that code should be built and tested directly on CI infrastructure. This is what we do here.

Jenkins infra team added Visual Studio 2019 to official runners (jenkins-infra/helpdesk#4047), which was a prerequisite to make this possible.

This PR does not add support for any new architecture, it just updates minimal Visual Studio version required. In more, we delete committed binaries on this repository, and integrate c++ build with maven.

Fixes #40

VladRassokhin and others added 10 commits April 25, 2024 16:17
- extract build-native.cmd
- build.cmd: catch errors from build-native.cmd
- build.cmd: fix path to artifacts
- build.cmd: do not update version in pom.xml
Some error code were found on windows-arm64 machine, and we now ignore a
code for specific protected processes. The unit test concerned lists all
processes on the machine, which makes it hard to reproduce and reliable.
Visual Studio 2017 is not supported anymore.
Official Jenkins CI will perform compilation from now on.
This environment has access to VS 2019.
@pbo-linaro
Copy link
Contributor Author

New Jenkinsfile should be validated, as C++ build is now done as part of maven build, and thus, requires windows.

Copy link
Member

@basil basil 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 the PR! This is much appreciated, and a huge contribution to this project. Kudos!

The next step after this PR is to create a PR that enables JEP-229 CD for this repository, using GitHub Actions as is standard for CD in the Jenkins project. The CD portion should largely follow https://www.jenkins.io/doc/developer/publishing/releasing-cd/ but may be slightly more involved in that it needs to run on a Windows system in GitHub Actions rather than a Linux system in GitHub Actions as the instructions currently describe.

DEVELOPER.md Outdated Show resolved Hide resolved
DEVELOPER.md Outdated Show resolved Hide resolved
Jenkinsfile Show resolved Hide resolved
src/test/java/org/jvnet/winp/NativeAPITest.java Outdated Show resolved Hide resolved
* Windows XP SP2 and above
* Windows Server 2003 and above
* Windows 10 and above
* Windows Server 2019 and above
Copy link
Member

Choose a reason for hiding this comment

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

BTW do you know if this is dropping support for Windows Server 2016? I am definitely OK with dropping support for Windows Server 2012, since its extended end date of October 2023 has already passed, but I wonder if there may be Jenkins users still using Windows Server 2016. Jenkins users might still be using Windows Server 2016 since although its mainstream end date was in January of 2022, its extended end date isn't until 2027. Keeping support for it would be ideal if it isn't prohibitively costly, but dropping support wouldn't be the end of the world — after all, we dropped support for CentOS 7 — but this would need to be communicated broadly to existing users (in the changelog and upgrade guide) and might be worth highlighting on the developer list in case others have a strong opinion about this.

Copy link
Member

Choose a reason for hiding this comment

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

I am going to go ahead with this PR, but I am still hoping for a response to this comment, after which we can update the Release Notes/Upgrade Guide if necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I looked for information about which windows version was officially supported with default sdk for VS 2019, and found only Windows 10 and Server 2019. After all, Microsoft is trying to kill previous versions and force people to migrate, so we should not expect more than this.

Regarding our dependencies and windows functions used, I think it's pretty safe to say that Server 2016 should keep supported, as we don't use any "recent" API function.

Finally, people staying on a previous version of Windows probably prefer to stay on a previous version of Jenkins as well (it's more "stable" you know), so I would not worry too much about this.

build-native.cmd Outdated Show resolved Hide resolved
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

This needs an actual CI build ran, its using the master build.

‘Jenkinsfile’ has been modified in an untrusted revision

I've suggest setting the default branch for this at ci_windows potentially

@basil basil changed the title Use official CI jenkins to build and test winp Use official Jenkins CI to build and test winp Apr 26, 2024
Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

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

I've cleaned up the README, minimized the size of the diff, tested the Debug configuration, and updated the Maven build to allow for both Release and Debug configurations as well as to gracefully execute the non-native tests on Linux.

@basil basil merged commit 0b0dfc6 into jenkinsci:master Apr 26, 2024
13 checks passed
@basil basil mentioned this pull request Apr 26, 2024
@basil
Copy link
Member

basil commented Apr 26, 2024

Many thanks again! I have filed #117 to cover the CD work that is needed before we'll be able to release this.

basil added a commit to basil/winp that referenced this pull request Apr 26, 2024
@basil basil mentioned this pull request Apr 26, 2024
basil added a commit that referenced this pull request Apr 26, 2024
@pbo-linaro
Copy link
Contributor Author

Thanks @basil for fixing the last bits and merge this PR. I'll take a look to CD part, should be easy as the same code will compile cleanly on GitHub Actions thanks to previous versions.

@basil
Copy link
Member

basil commented May 6, 2024

Caused #119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of binaries in the repo
4 participants