Exploring the Sample Build Projects
The Installer file of Incredibuild Linux includes the two sample projects. They are located at: /opt/incredibuild/samples/-
Sample build for Make - this sample demonstrates the distribution of GCC processes using Make.
Location: /opt/incredibuild/samples/make_build/ -
Sample Custom build - this sample demonstrates the distribution of custom processes by configuring an ib_profile.xml file to run them remotely.
Location: /opt/incredibuild/samples/custom_execution/
Executing the Sample Builds
Sample Build for Make
The sample build for Make demonstrates how to execute builds that are run by Make with Incredibuild Linux. In Make, the-j command option indicates the maximum number of processes that Make will execute in parallel. Usually this command option corresponds with the number of CPU cores on the machine where the build occurs. With Incredibuild, since you can use the remote CPU cores of your entire Incredibuild Environment, you should set a high value to the -j command option, to execute in parallel as many processes as possible.
Other build tools may have a different command option for multiprocessing execution, or they may require changes in specific configuration files to allow multiprocessing execution.
To execute the sample build for Make:
- Prerequisite: Make and gcc compiler must be installed.
- In the terminal, go to the directory of the sample Make build at:/opt/incredibuild/samples/make_build/
-
In the build directory, enter:
ib_console make -j <Number_of_Processes_to_Run_in_Parallel>Note: The-jvalue should be much higher than the number of local cores, to ensure that tasks are distributed to the remote Helper machines in your Incredibuild Environment. If there is more than one -j option, the last one is used.For example:
Sample Custom Build
The sample Custom build demonstrate how to configure custom processes to be distributed across available cores in Incredibuild Environment, by adding their setting into an ib_profile.xml file. The sample Custom build includes a custom build tool - “ib_test_invoker”. This custom tool executes a custom process - “sleep”. The default ib_profile.xml file does not include a custom process called “sleep”. Therefore, this custom process should be added to another ib_profile.xml file, which will be saved at a different location - either at the project, home, or machine level. In the new ib_profile.xml file, the “sleep” process should be defined as “allow remote”, which means that the process can be executed by the cores of both local and remote machines. The sample Custom build already includes a customized ib_profile.xml file, located at: /opt/incredibuild/samples/custom_execution. This customized file contains the “sleep” custom process, and defines it as “allow remote”:- In the terminal, go to the directory of the sample Custom build at: /opt/incredibuild/samples/custom_execution/
-
In the build directory, enter:
ib_console ./ib_test_invoker <Number_of_Processes> <Duration_of_Each_Process_in_Seconds>- Number of Processes – the number of “sleep” processes that will run once the build is executed.- Duration of Each Process in Seconds - the amount of time of each process execution.For example, to execute 20 processes that will run for 30 seconds each, the following command is entered:ib_console ./ib_test_invoker 20 30