Compile acceleration in pipeline
The following tutorial will guide you through how to use the acceleration solution in the pipeline after you have successfully customized it
Preparation work
If your pipeline is on a private build machine, install client as root on your machine in advance.
If your pipeline uses a public builder, this step is unnecessary.
Step1 Modify the compilation script
Suppose the original compiled script is:
As you can see, the commands in the previous section are doing some preparatory work. The actual compiling instructions are:
We just need to modify this sentence to execute the compile instruction with the accelerator and get the acceleration.
The bk-booster is the accelerator provided by the plug-in to start the acceleration Parameter meanings in the command are
-bt cc: cc is used for c/ C ++ compilation on linux.
-p $TURBO_PLAN_ID: specifies the scheme ID. In the Turbo Compilation Acceleration plug-in, the ID of the selected scheme is injected by default.
--hook, open the hook command, will automatically hijack gcc/clang and other compilers to achieve acceleration.
-a "make -j@BK_JOBS all", specifying the compile command to execute, with @BK_JOBS as a placeholder that will be automatically replaced with the recommended amount of concurrency at run time.
Step2 Open the pipeline and add the plugin "Turbo Compilation Acceleration"
Note: This step requires the addition of a code plug-in
Step3 Select a registered acceleration scheme
Step4 Configure the compilation script
Last updated