Skip to content

Conversation

@HannesWell
Copy link
Member

In the SWT maven build local building of the native binaries can be activated by setting the system property native to ${ws}.${os}.${arch}.
Consequently the full command for a complete Maven build of SWT that also builds the natives is (with the SWT-repo root as working directory):
mvn clean verify -Dnative=${ws}.${os}.${arch}

This full build takes a few minutes and if one skips the test execution, by appending -DskipTests, the complete build terminates earlier.

The fastest way to build the native binaries for a platform with Maven is to only run the execution of the maven-antrun-plugin that contains the local natives build. On the CLI this would be (with the SWT-repo root as working directory):
mvn clean antrun:run@build-native-binaries -f binaries/org.eclipse.swt.${ws}.${os}.${arch} -Dnative=${ws}.${os}.${arch}

This PR adds a Maven launch configuration (requires Eclipse m2e) to the org.eclipse.swt project to perform such native binaries only build for the currently running platform. The launch-config uses the latter Maven command and infers the ${ws}, ${os} and ${arch} placeholder using the launch variables ${target.ws}, ${target.os} and ${target.arch}. With that one can just build the natives without further configuration after the necessary prerequisites are installed as described in the corresponding articles in https://www.eclipse.org/swt/docs.php.

@github-actions
Copy link
Contributor

Test Results

   299 files  ±0     299 suites  ±0   5m 53s ⏱️ -18s
 4 098 tests ±0   4 090 ✅ ±0   8 💤 ±0  0 ❌ ±0 
12 206 runs  ±0  12 133 ✅ ±0  73 💤 ±0  0 ❌ ±0 

Results for commit 2d3eef1. ± Comparison against base commit 5c9180b.

@HannesWell HannesWell merged commit dd0447c into eclipse-platform:master Jan 21, 2024
@HannesWell HannesWell deleted the natives-build-launch branch January 21, 2024 15:51
@lathapatil
Copy link
Contributor

For local testing what are the replacement commands or steps using maven build
6th step here may be outdated by now

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.

2 participants