Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SWT/Native Builds on Foundation"

< SWT
(Build Schedule)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
SWT Native Builds are run on the Eclipse Foundation Infrastructure.
+
SWT Native Builds are run on the Eclipse Foundation Infrastructure. (Associated bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=476642)
  
The Jobs are on the Releng HIPP and can be seen in the SWT Natives view (https://hudson.eclipse.org/releng/view/SWT%20Natives/)
+
The Jobs are on the Releng HIPP and can be seen in the SWT Natives view (https://ci.eclipse.org/releng/view/SWT%20Natives/)
  
The SWT Native build has been broken down into multiple steps. There are separate jobs for each of these steps and they run in a sequence automatically.
+
The SWT Native build has been broken down into multiple steps. There are separate jobs for native builds on each platform and they run in a sequence automatically.
  
Sequence of the jobs:
+
== 1-SWT-Increment_if_needed ==
== Step1: 1-SWT-Increment_if_needed ==
+
The 1-SWT-Increment_if_needed job (https://ci.eclipse.org/releng/view/SWT%20Natives/job/1-SWT-Increment_if_needed/configure) is triggerred to start the SWT build.
Clones the SWT source and binaries repo and checks the java compilation. Checks for source and native changes in the repo.
+
If there are no changes in the repo, then the Build exits at this step.
+
If natives_changed = true, then jobs to build the SWT libraries are triggerred.
+
1. SWT-native-build
+
2. win32_x86, win32_x86_64, gtk_linux_x86, gtk_linux_x86_64, cocoa_x86_64, gtk_linux_ppc64, gtk_linux_ppc64le
+
3. swt-collect-libs
+
 
+
== Step2: 2-SWT-Commit_Binaries_and_Tag ==
+
Generates and Writes the qualifier to pom file source and binaries repo\
+
Commits the changes in source and binaries repo
+
Tags the commits
+
  
== Step3: 3-SWT-git_push ==
+
Steps that are part of this job:<br/>
Pushes the commits in source and binaries repo to remote
+
 
 +
1. Clones the SWT source and binaries repo.
 +
 
 +
2. Checks the java compilation.
 +
 
 +
<code>ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml check_compilation</code>
 +
 
 +
3. Checks if there are source and native changes in the repo.
 +
 
 +
<code>ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml new_build_with_create_file</code>
 +
 
 +
<b>check_build_changed</b> target checks if there are any source changes in the repo and build_changed is set to true if there are changes.
 +
If build_changed is not set, then the Build exits at this step.
 +
If build_changed = true, then tmp/build_changed.txt file is created in the job workspace.
 +
 
 +
<b>check_natives_changed</b> target checks if there are any changes in the repo that require native build and natives_changed is set to true if there are changes.
 +
If natives_changed = true, then tmp/natives_changed.txt file is created in the job and jobs to build the SWT libraries will be triggered later.
 +
If natives_changed is not set, jobs to build the native libraries are not triggered.
 +
 
 +
4. Creates a zip of all the files required to build the natives for each platform.
 +
 
 +
For example:
 +
<code>ant -f ${WORKSPACE}/eclipse.platform.swt.binaries/bundles/org.eclipse.swt.cocoa.macosx.x86_64/build.xml copy_library_src_and_create_zip</code>
 +
 
 +
5. If native build is required (tmp/natives_changed.txt exists), these native build jobs are triggered:
 +
* win32_x86_64 - https://ci.eclipse.org/releng/view/SWT%20Natives/job/win32_x86_64/configure
 +
* gtk_linux_x86_64 - https://ci.eclipse.org/releng/view/SWT%20Natives/job/gtk_linux_x86_64_pipeline/configure
 +
* cocoa_x86_64 - https://ci.eclipse.org/releng/view/SWT%20Natives/job/cocoa_x86_64/configure
 +
* gtk_linux_ppc64le - https://ci.eclipse.org/releng/view/SWT%20Natives/job/gtk_linux_ppc64le/configure
 +
 
 +
 
 +
The steps involved in the native build job:<br/>
 +
* Get the source zip created in the Step 4
 +
* Unzip the sources
 +
* Set any required environment variables, such as MODEL, OUTPUT_DIR
 +
* Execute the build script (build.sh or build.bat)
 +
** Windows: cmd /c build.bat x86_64 all install
 +
** Linux: sh build.sh clean install
 +
** Mac: sh build.sh install
 +
* Zip the built native libraries.
 +
 
 +
 
 +
6. Get the zip of native libraries built on the build machines and sign them.
 +
 
 +
7. Generates and Writes the qualifier to pom file source and binaries repo
 +
 
 +
<code>ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildInternal.xml write_qualifier -Dlib.dir=${WORKSPACE} -Dbuild_changed=true</code>
 +
 
 +
8. Commits the changes in source and binaries repo
 +
 
 +
<code>ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml commit_poms_and_binaries</code>
 +
 
 +
9. Tags the commits
 +
 
 +
<code>ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml tag_projects</code>
 +
 
 +
10. Pushes the commits in source and binaries repo to remote. This step is skipped if <b>skipCommit</b> parameter in the job is set to true.
 +
 
 +
<code>ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml push_remote_from_workspace</code>
  
 
== Build Schedule ==
 
== Build Schedule ==
  
1-SWT-Increment_if_needed job is scheduled to run automatically everyday before the I-build.  
+
1-SWT-Increment_if_needed job is triggered automatically by the I-build job as the first step.
Here is the schedule:
+
* schedule for milestone week and RC phase
+
** 0 7 * * 7,1,2,3,6
+
** 0 19 * * 5,7,1,2,3
+
** 0 12 * * 6
+
* regular I-builds
+
** 0 19 * * 1,2,3,4,5,7
+
** 0 12 * * 6
+
  
 
== Manual Build Input ==
 
== Manual Build Input ==
To do a SWT build input, go to Job 1-SWT-Increment_if_needed - https://hudson.eclipse.org/releng/view/SWT%20Natives/job/1-SWT-Increment_if_needed/ and build now. This will automatically run all the other jobs and push the changes/tags to the repos.
+
To do a SWT build input, go to Job 1-SWT-Increment_if_needed - https://ci.eclipse.org/releng/view/SWT%20Natives/job/1-SWT-Increment_if_needed/ and build now. This will automatically run all the other jobs and push the changes/tags to the repos.
  
 
== Force Build Natives ==
 
== Force Build Natives ==
 
1-SWT-Increment_if_needed job will exit if there are no changes in the repos for a new build. And if there are no changes in the source repo that require native build, then natives will not be built.
 
1-SWT-Increment_if_needed job will exit if there are no changes in the repos for a new build. And if there are no changes in the source repo that require native build, then natives will not be built.
To force native build in this case, pass -Dbuild_changed=true -Dnatives_changed=true while executing target <new_build_with_create_file>.
+
 
 +
<b>New way:</b><br/>
 +
The job is parameterized. To force build natives, check the <b>forceNativeBuilds</b> checkbox before triggering the build. This supercedes the <b>forcetagging</b> parameter.
 +
 
 +
<b>Old way: (Not recommended)</b><br/>
 +
To force native build in this case, uncomment these lines in the job.
 +
#touch "${WORKSPACE}/tmp/build_changed.txt"
 +
#touch "${WORKSPACE}/tmp/natives_changed.txt"

Latest revision as of 06:32, 2 July 2020

SWT Native Builds are run on the Eclipse Foundation Infrastructure. (Associated bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=476642)

The Jobs are on the Releng HIPP and can be seen in the SWT Natives view (https://ci.eclipse.org/releng/view/SWT%20Natives/)

The SWT Native build has been broken down into multiple steps. There are separate jobs for native builds on each platform and they run in a sequence automatically.

1-SWT-Increment_if_needed

The 1-SWT-Increment_if_needed job (https://ci.eclipse.org/releng/view/SWT%20Natives/job/1-SWT-Increment_if_needed/configure) is triggerred to start the SWT build.

Steps that are part of this job:

1. Clones the SWT source and binaries repo.

2. Checks the java compilation.

ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml check_compilation

3. Checks if there are source and native changes in the repo.

ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml new_build_with_create_file

check_build_changed target checks if there are any source changes in the repo and build_changed is set to true if there are changes. If build_changed is not set, then the Build exits at this step. If build_changed = true, then tmp/build_changed.txt file is created in the job workspace.

check_natives_changed target checks if there are any changes in the repo that require native build and natives_changed is set to true if there are changes. If natives_changed = true, then tmp/natives_changed.txt file is created in the job and jobs to build the SWT libraries will be triggered later. If natives_changed is not set, jobs to build the native libraries are not triggered.

4. Creates a zip of all the files required to build the natives for each platform.

For example: ant -f ${WORKSPACE}/eclipse.platform.swt.binaries/bundles/org.eclipse.swt.cocoa.macosx.x86_64/build.xml copy_library_src_and_create_zip

5. If native build is required (tmp/natives_changed.txt exists), these native build jobs are triggered:


The steps involved in the native build job:

  • Get the source zip created in the Step 4
  • Unzip the sources
  • Set any required environment variables, such as MODEL, OUTPUT_DIR
  • Execute the build script (build.sh or build.bat)
    • Windows: cmd /c build.bat x86_64 all install
    • Linux: sh build.sh clean install
    • Mac: sh build.sh install
  • Zip the built native libraries.


6. Get the zip of native libraries built on the build machines and sign them.

7. Generates and Writes the qualifier to pom file source and binaries repo

ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildInternal.xml write_qualifier -Dlib.dir=${WORKSPACE} -Dbuild_changed=true

8. Commits the changes in source and binaries repo

ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml commit_poms_and_binaries

9. Tags the commits

ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml tag_projects

10. Pushes the commits in source and binaries repo to remote. This step is skipped if skipCommit parameter in the job is set to true.

ant -f ${WORKSPACE}/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml push_remote_from_workspace

Build Schedule

1-SWT-Increment_if_needed job is triggered automatically by the I-build job as the first step.

Manual Build Input

To do a SWT build input, go to Job 1-SWT-Increment_if_needed - https://ci.eclipse.org/releng/view/SWT%20Natives/job/1-SWT-Increment_if_needed/ and build now. This will automatically run all the other jobs and push the changes/tags to the repos.

Force Build Natives

1-SWT-Increment_if_needed job will exit if there are no changes in the repos for a new build. And if there are no changes in the source repo that require native build, then natives will not be built.

New way:
The job is parameterized. To force build natives, check the forceNativeBuilds checkbox before triggering the build. This supercedes the forcetagging parameter.

Old way: (Not recommended)
To force native build in this case, uncomment these lines in the job.

  1. touch "${WORKSPACE}/tmp/build_changed.txt"
  2. touch "${WORKSPACE}/tmp/natives_changed.txt"

Back to the top