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

Perform SWT-natives build as part of the master/verification build #514

Merged

Conversation

HannesWell
Copy link
Member

@HannesWell HannesWell commented Dec 27, 2022

First part of #513

The build procedure is based on the configurations in https://ci.eclipse.org/releng/view/SWT%20Natives/
Namely these are:

The steps of all those jobs are now perform in the Jenkins-build of this o.e.swt repo and thus makes all the mentioned jobs obsolete. This also makes building the swt-binaries as part of the I-builds obsolete. It has also the advantage that one can get immediate feedback in verification-builds for changes that affect the SWT-binaries.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 27, 2022

Test Results

     303 files       303 suites   5m 49s ⏱️
  4 048 tests   4 035 ✔️   8 💤 4  1 🔥
12 071 runs  11 995 ✔️ 70 💤 5  1 🔥

For more details on these failures and errors, see this check.

Results for commit a78d1fe.

♻️ This comment has been updated with latest results.

@HannesWell HannesWell force-pushed the binariesBuildOnMaster branch 27 times, most recently from f212a61 to 70d06d8 Compare December 27, 2022 21:00
@HannesWell
Copy link
Member Author

Besides that it looks like the project is not prepared to push to the swt(-natives)-repo:

  + git push origin HEAD:refs/heads/testSWTNativesInPipeline
  [email protected]: Permission denied (publickey).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.

This was because I oversaw the SSH-agent setup in the existing/old SWT-Increment_if_needed job. After adding a sshagent(['github-bot-ssh']) step, the pipeline now successfully pushes to the swt and swt.binaries repo.

You can see the results here:

But while testing pushing I noticed that the automated natives-build respectively the automated enforced-qualifier commits will trigger another round of automated updates, which likely leads to an infinite update-cycle.
So I will need to think about a mechanism to detect if the latest commit was created by the automated SWT-update.
Probably based on the commit message and committer/author.
On the long run, the enforced qualifier updates should not be necessary at all, which then hopefully makes this mechanism obsolete. But I don't want to change that in this PR.

@fredg02
Copy link
Contributor

fredg02 commented Feb 22, 2023

Looks like the initial error is fixed, but there seems to be another one on the new macos-x86_64 node

That error should be fixed as well now. It required to update the MacOS Developer Command Line Tools from version 12.5 to 13.2 (with softwareupdate -i "Command Line Tools for Xcode-13.2") .

@HannesWell HannesWell force-pushed the binariesBuildOnMaster branch 3 times, most recently from 6087e41 to 27b0c59 Compare February 22, 2023 23:14
@HannesWell
Copy link
Member Author

Looks like the initial error is fixed, but there seems to be another one on the new macos-x86_64 node

That error should be fixed as well now. It required to update the MacOS Developer Command Line Tools from version 12.5 to 13.2 (with softwareupdate -i "Command Line Tools for Xcode-13.2") .

Great. Thank you! I can confirm that the mac build is now working for both architectures.

But while testing pushing I noticed that the automated natives-build respectively the automated enforced-qualifier commits will trigger another round of automated updates, which likely leads to an infinite update-cycle.
So I will need to think about a mechanism to detect if the latest commit was created by the automated SWT-update.
Probably based on the commit message and committer/author.

I prevent such self-loop now by performing a check if the HEAD commit was committed by the Eclipse Releng Bot. In that case the build simply aborts, as you can see for example in https://ci.eclipse.org/releng/job/eclipse.platform.swt/job/testSWTNativesInPipeline/8/console.
This way and endless loop of builds where the automated update triggers a new build immediately which again triggers a new build is prevented.

So I think this is ready now. You can see the results here:

The only thing to do, before this can be submitted is to remove the last commit (which was only used to test pushing) and to squash the others.

@mickaelistria, @akurtakov or anybody else: Do you want to review this?
I assume you prefer to wait until the master branch opens for the 2023-06 before submitting this?

@mickaelistria
Copy link
Contributor

@mickaelistria, @akurtakov or anybody else: Do you want to review this?

I've personally lost track (again) on this topic and don't intend to refocus on it soon enough to give a helpful review, sorry.

I assume you prefer to wait until the master branch opens for the 2023-06 before submitting this?

Yes please.

@HannesWell HannesWell force-pushed the binariesBuildOnMaster branch 3 times, most recently from d2f5a7a to d5fc0fa Compare February 25, 2023 00:21
@HannesWell
Copy link
Member Author

@mickaelistria, @akurtakov or anybody else: Do you want to review this?

I've personally lost track (again) on this topic and don't intend to refocus on it soon enough to give a helpful review, sorry.

OK, no problem. I did some more testing (changes and a few more adjust and I'm now relatively confident that this change is fine as it is.
Therefore I suggest to submit this as soon as the master opens again and if anyone encounters problems I'll try to fix them as soon as possible.
Of course everybody interested is invited to review this PR until then.

@HannesWell HannesWell marked this pull request as ready for review February 25, 2023 00:37
@HannesWell HannesWell force-pushed the binariesBuildOnMaster branch 2 times, most recently from 1efd983 to 3e65c69 Compare March 8, 2023 20:15
@HannesWell
Copy link
Member Author

Since the master branch is now open I plan to submit this PR tomorrow evening, unless anybody objects.

First part of
eclipse-platform#513

The build procedure is based on the configurations in
https://ci.eclipse.org/releng/view/SWT%20Natives/
Namely these are:
- https://ci.eclipse.org/releng/job/SWT-Increment_if_needed/configure
- https://ci.eclipse.org/releng/job/cocoa_aarch64/configure
- https://ci.eclipse.org/releng/job/cocoa_x86_64/configure
- https://ci.eclipse.org/releng/job/gtk_linux_aarch64/configure
- https://ci.eclipse.org/releng/job/gtk_linux_ppc64le/configure
- https://ci.eclipse.org/releng/job/gtk_linux_x86_64/configure
- https://ci.eclipse.org/releng/job/win32_x86_64/configure

The steps of all those jobs are now perform in the Jenkins master-build
of this o.e.swt repo and thus makes all the mentioned jobs obsolete.
This also makes building the swt-binaries as part of the I-builds
obsolete. It has also the advantage that one can get immediate feedback
in verification-builds for changes that affect the SWT-binaries on all
platforms.
@HannesWell
Copy link
Member Author

All tests on Jenkins are green and the GH-workflow failures are the same like on previous master builds. Therefore I believe they are unrelated.
So this is ready for submission now; Merging.
I will monitor the next master branch build to verify that it behaves as expected.

Thanks to everyone that helped to make this happen, especially @fredg02!

@HannesWell HannesWell merged commit 0ef0c96 into eclipse-platform:master Mar 9, 2023
@HannesWell HannesWell deleted the binariesBuildOnMaster branch March 9, 2023 21:22
@HannesWell
Copy link
Member Author

So the build succeeded as expected in https://ci.eclipse.org/releng/job/eclipse.platform.swt/job/master/24/ 🎉
And as intended the subsequent master-branch triggered from the push of the updated timestamps was aborted to prevent an endless build loop: https://ci.eclipse.org/releng/job/eclipse.platform.swt/job/master/25/

Unfortunately we will now see aborted builds in the master queue, but I didn't found an elegant way to suppress. Maybe it would be possible with adjusting the Jenkins/GH-hook configuration. But I don't have access to that.

The build procedure is based on the configurations in https://ci.eclipse.org/releng/view/SWT%20Natives/ Namely these are:

* https://ci.eclipse.org/releng/job/SWT-Increment_if_needed/configure

* https://ci.eclipse.org/releng/job/cocoa_aarch64/configure

* https://ci.eclipse.org/releng/job/cocoa_x86_64/configure

* https://ci.eclipse.org/releng/job/gtk_linux_aarch64/configure

* https://ci.eclipse.org/releng/job/gtk_linux_ppc64le/configure

* https://ci.eclipse.org/releng/job/gtk_linux_x86_64/configure

* https://ci.eclipse.org/releng/job/win32_x86_64/configure

The steps of all those jobs are now perform in the Jenkins-build of this o.e.swt repo and thus makes all the mentioned jobs obsolete. This also makes building the swt-binaries as part of the I-builds obsolete. It has also the advantage that one can get immediate feedback in verification-builds for changes that affect the SWT-binaries.

Since the mentioned seven jobs are now not necessary anymore I suggest we delete them on the long run. For some time I think it is reasonable to keep them as a reference but once we are confident everything works I think we can just delete them.
From how the jobs are configured I assume they are not used for any maintenance work, is that correct.

HannesWell added a commit to HannesWell/eclipse.platform.releng.aggregator that referenced this pull request Mar 9, 2023
With eclipse-platform/eclipse.platform.swt#514
SWT-natives are build as part of the SWT master-branch build.
HannesWell added a commit to HannesWell/eclipse.platform.releng.aggregator that referenced this pull request Mar 9, 2023
With eclipse-platform/eclipse.platform.swt#514
SWT-natives are build as part of the SWT master-branch build.
HannesWell added a commit to HannesWell/eclipse.platform.releng.aggregator that referenced this pull request Mar 15, 2023
With eclipse-platform/eclipse.platform.swt#514
SWT-natives are build as part of the SWT master-branch build.
HannesWell added a commit to eclipse-platform/eclipse.platform.releng.aggregator that referenced this pull request Mar 17, 2023
With eclipse-platform/eclipse.platform.swt#514
SWT-natives are build as part of the SWT master-branch build.
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.

8 participants