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

SWT/Native Builds on Foundation

< SWT

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