WO2023051034A1 - Terminal code incremental compilation method, system, apparatus, server, and storage medium - Google Patents

Terminal code incremental compilation method, system, apparatus, server, and storage medium Download PDF

Info

Publication number
WO2023051034A1
WO2023051034A1 PCT/CN2022/110947 CN2022110947W WO2023051034A1 WO 2023051034 A1 WO2023051034 A1 WO 2023051034A1 CN 2022110947 W CN2022110947 W CN 2022110947W WO 2023051034 A1 WO2023051034 A1 WO 2023051034A1
Authority
WO
WIPO (PCT)
Prior art keywords
compilation
server
task
compiling
incremental
Prior art date
Application number
PCT/CN2022/110947
Other languages
French (fr)
Chinese (zh)
Inventor
齐祥
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2023051034A1 publication Critical patent/WO2023051034A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the embodiments of the present application relate to the computer field, and in particular to a terminal code incremental compilation method, system, device, server and storage medium.
  • R&D personnel In the process of compiling the code, R&D personnel often download the code on a fixed large-capacity compiler. After the code download is completed, the R&D personnel manually merge the incremental code, and then perform incremental compilation.
  • the hardware and software resources of the compiler selected by the R&D personnel may not match the requirements for hardware and software resources in the actual compilation process, that is, it is difficult to reasonably allocate hardware and software resources.
  • manually incorporating incremental code for compilation may cause a certain waste of human resources.
  • the main purpose of the embodiments of the present application is to provide a terminal code incremental compilation method, system, device, server and storage medium, which can rationally schedule software and hardware resources and save human resources.
  • the embodiment of the present application provides a terminal code incremental compilation method, including: obtaining the compilation task through the front-end configuration interface; according to the compilation task, determining the compilation task in multiple compilation server clusters A matching target compiling server; sending the compiling task to the matching target compiling server, for the target compiling server to obtain the file to be compiled from the distributed file storage system according to the compiling task for incremental compiling of the code;
  • the multiple compiling server clusters are server clusters of different platforms, and the compiling server clusters share the distributed file storage system.
  • the embodiment of the present application also provides a terminal code incremental compilation system, including: a distributed resource scheduling server, a compilation server cluster, and a distributed file storage system; the distributed resource scheduling server is used to configure an interface for obtaining a compiling task, determining a target compiling server matching the compiling task in a plurality of compiling server clusters according to the compiling task, and sending the compiling task to the matching target compiling server; the compiling The target compilation server in the server cluster is used to obtain the files to be compiled from the distributed file storage system according to the compilation task to perform incremental compilation of the code; the distributed file storage system is used to transmit the files to be compiled to the The target server; wherein, the compilation server clusters share the distributed file storage system; the multiple compilation server clusters are server clusters of different platforms.
  • the embodiment of the present application also provides a terminal code incremental compilation device, including: a configuration module, used to obtain compilation tasks through the front-end configuration interface; a distribution module, according to the compilation tasks, in multiple compilation Determine the target compilation server that matches the compilation task in the server cluster; the scheduling module sends the compilation task to the matched target compilation server for the target compilation server to download from the distributed file storage system according to the compilation task Acquire the files to be compiled to perform incremental compilation of the code; wherein, the multiple compilation server clusters are server clusters of different platforms, and the compilation server clusters share the distributed file storage system.
  • an embodiment of the present application further provides a server, including: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores information that can be used by the at least one processor An instruction executed by a processor, the instruction is executed by the at least one processor, so that the at least one processor can execute the above terminal code incremental compilation method.
  • an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and implementing the above terminal code incremental compilation method when the computer program is executed by a processor.
  • Fig. 1 is a flowchart of a method for incrementally compiling terminal codes according to one embodiment of the present application
  • FIG. 2 is a schematic diagram of a device for incrementally compiling terminal codes according to an embodiment of the present application
  • Fig. 3 is a schematic diagram of a user configuration interface provided in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a terminal code incremental compilation device provided in an embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of a server according to another embodiment of the present application.
  • An embodiment of the present application relates to a terminal code incremental compilation method, which can be applied to a server, but is not limited thereto.
  • the terminal code incremental compilation method in this embodiment includes: obtaining a compilation task through a front-end configuration interface; according to the compilation task, determining a target compilation server that matches the compilation task in a plurality of compilation server clusters; The compilation task is sent to the matching target compilation server for the target compilation server to obtain the files to be compiled from the distributed file storage system according to the compilation task for incremental compilation of the code; wherein, the multiple compilation server clusters It is a server cluster of different platforms, and the compilation server cluster shares the distributed file storage system.
  • the compilation task is obtained through the front-end configuration interface, and the target server that matches the compilation task is determined in multiple server clusters according to the compilation task, so that there is no need for the R&D personnel to determine the server that needs to log in and log in remotely to compile.
  • the R&D personnel only need to It is necessary to configure the compilation task to realize incremental compilation and save human resources.
  • the target server in the embodiment of this application will automatically obtain the compiled code from the distributed storage system according to the compilation task and perform incremental compilation to realize the automatic scheduling of the server. , which makes the allocation of server resources more reasonable.
  • Multiple server clusters are server clusters of different platforms, which conforms to the characteristics of multi-platform compilation of mobile phone software development, facilitates code maintenance and reduces maintenance costs.
  • Step 101 obtain compilation tasks through the front-end configuration interface.
  • resource tags are carried in the compilation task.
  • Nodes are servers in a compilation server cluster.
  • Compiler server clusters can include multiple server clusters of different platforms, as shown in Figure 2, including Qualcomm platform clusters, MTK platform clusters, and Zhanrui platform clusters.
  • Cluster servers on different platforms have different software and hardware resources, and resource labels represent The software and hardware resources required for incremental compilation, such as a certain compilation server cluster where the required compilation server is located, the number of CPU cores required for compilation, memory resources, etc.
  • the resource tag may be a tag of a compiling server cluster, and each compiling server cluster may be configured with servers with different hardware resources.
  • the server provides developers with a visual user configuration interface, as shown in the schematic diagram of the project configuration interface shown in Figure 3, to configure the projects involved in the compilation, which may include the following configuration items:
  • Searchfilter gerrit web page query conditions.
  • Mergedfileter the single number in the merge state.
  • CodeMode Indicates the update code mode.
  • the Dailybuild mode indicates that the code is updated based on the daily build code + the current searchfilter code;
  • the Latest mode indicates that the code is updated after repo sync + the current searchfilter code based on the daily build code.
  • AP is selected, it means that only the AP side is compiled; if Modem is selected, it means that only the Modem side is built.
  • Node A resource label representing the software and hardware required for the compilation task, such as Qualcomm (qualcomm) label, mtk label, and Zhanrui (sprd) label.
  • NeedVersionFile Indicates whether the version file needs to be uploaded to ftp for download after the incremental compilation is completed.
  • NeedOut Indicates whether to keep the out directory before incremental compilation. If the value is Yes, it indicates that the ot directory is retained before incremental compilation. If the value is No, it indicates that the out directory is deleted before incremental compilation.
  • CompileProject Characterizes the name of the project to be compiled.
  • the front-end configuration interface can also provide configurations such as task management, resource management, log management, and plug-in management.
  • the server can be managed based on the configuration, and the compilation server cluster can be automatically scheduled.
  • Task management including compilation task operation, compilation task execution configuration, compilation task trigger mode, compilation task execution status, etc.
  • Compile task operation provide configuration functions such as adding, editing, and deleting tasks, obtaining task running status, task starting, suspending, pausing, and re-executing.
  • Compilation task execution configuration Provide configuration functions including selection of execution process stages, corresponding manifest file, version type, task timeout control, compilation task failure retry, task failure alarm, etc.
  • Compilation task triggering mode may include a scheduled task (Cron) mode, a task-dependent mode, and an execution mode of directly invoking an application programming interface (api) to trigger a task.
  • Pron scheduled task
  • api application programming interface
  • Compilation task execution status success (success), failure (fail), abort (abort), etc.
  • Log management display of log information during incremental compilation.
  • Plug-in management dynamically configure and upload plug-in dependent packages through the plug-in configuration service, complete the addition and modification of plug-ins, and meet rich and flexible business needs.
  • Step 102 determine a target compiling server matching the compiling task in multiple compiling server clusters.
  • the compiling task is matched with the server with the distributed resource scheduling engine in FIG. 2 , so as to allocate the target compiling server for the compiling task.
  • the server with the distributed resource scheduling function is the same as the server with the continuous integration engine.
  • the target server meeting the resource tag requirement is obtained.
  • the resource tag carried by the compilation task is: qualcomm
  • the target server that meets the resource tag requirement is a Qualcomm server.
  • the resource tag can be carried in the compilation task, which simplifies the configuration of the task by the R&D personnel and further reduces the labor cost.
  • the selection of the target server according to the software and hardware resources represented by the resource tag is in line with the requirements of different software projects when compiling. The demand for software and hardware resources improves compilation efficiency.
  • the distributed resource management engine includes the following functions.
  • Console configuration management includes: configure and compile server resources through configuration files, such as yaml and json, such as platform information, project information, CPU, memory, hard disk information, etc.
  • Scheduler Receives the scheduled tasks issued by the access, splits and distributes the tasks, finds the executor in the registration center, then sends the task to the executor for execution, and registers with the registration center at the same time.
  • Executor Receive scheduling tasks and report the status to the registration center.
  • Registration center synchronization and coordination of machine and task status.
  • Step 103 sending the compiling task to the matching target compiling server, so that the target compiling server can obtain the file to be compiled from the distributed file storage system according to the compiling task to perform incremental compiling of the code.
  • the multiple compiling server clusters are server clusters of different platforms, and the compiling server clusters share the distributed file storage system.
  • the target server obtains the file to be compiled from the distributed storage system according to the compilation task, and uses a generalized incremental compilation script to incrementally compile the compiled file, wherein the generalized incremental compilation script uses a shared library model.
  • This embodiment uses a generalized incremental compilation script in the shared library mode, which is convenient for each platform to perform incremental compilation using the generalized incremental compilation script, facilitates code maintenance, and reduces maintenance costs.
  • the file to be compiled is incrementally compiled in a container in the target compilation server, and the compilation environment of the container is consistent with the compilation environment configured for the file to be compiled.
  • the compilation environment of the container is consistent with the compilation environment configured for the file to be compiled.
  • FIG. 2 An exemplary reference is shown in Figure 2. Install different platforms to divide the compilation server cluster into Qualcomm platform cluster and Zhanrui platform cluster. When scheduling, the mirror server pulls the image (image) and generates one or more containers for incremental compilation. .
  • the first type of files in the distributed file storage system are transferred after being merged into the second type of files; the first type of files are files whose capacity is smaller than the first preset value, and the second type of files are files whose capacity reaches The file of the second default value.
  • This embodiment avoids reading and writing operations of a large number of small files.
  • cache data is set to analyze small files for cache processing, and merge processing is performed after reaching the standard value of large files, so as to avoid IO read and write operations of a large number of small files.
  • the code base file in the distributed file storage system is separated from the compilation process file, and the file to be compiled is obtained by duplicating the code base file and incremental code. Specifically, the code base file and the compilation process file are separated by stacking the file system. In this embodiment, a stacked file system is used to save a clean compilation environment, so that developers can compile simultaneously based on the same code base file.
  • the compiled files of the distributed file storage system are deleted after the incremental compilation is completed.
  • developers will generate a large number of compilation process files after the first incremental compilation.
  • the environment must be manually cleaned before incremental compilation can be performed again. Therefore, in this embodiment, the code base file and the compilation process file can be automatically cleaned up after the compilation is completed, that is, the environment is cleaned up, saving human resources, and, by stacking the file system Separate the code base file and the compilation process file to avoid a large number of compiled files from polluting the environment, and it is convenient for multiple people to perform incremental compilation at the same time.
  • stacked files can be divided into three layers, the base layer A can store the basic code file fileA, the change layer B can store fileB, and the C layer can store files: fileA and fileB, and the compilation server can call the C layer
  • the files are incrementally compiled, and the files generated during the incremental compilation process can be put into the B layer at the same time. After the incremental compilation is completed, the files in the B layer and the C layer can be cleared.
  • the distributed file system may include the following parts:
  • the metadata service is used to record the metadata in the compilation server cluster, such as node information, SSD information, volume information, etc.
  • File access interface responsible for providing external file read and write, delete, create and other operation functions.
  • Storage node cluster responsible for storing basic code files and compiling process files.
  • Cache data analysis A large number of small files will be generated for the mobile phone software version, so the cache data is set to analyze small files for caching processing, and then merge processing after reaching the standard value of large files to avoid IO read and write operations of a large number of small files.
  • the small file is the first type of file
  • the large file is the second type of file
  • the standard value is the second preset value.
  • Stacked file system separate code base files and compilation process files.
  • the incremental compilation process of the mobile phone software version is as follows:
  • the program downloads relevant generalized incremental compilation scripts from the code library according to the shared library information set in the compilation task.
  • the compilation process is carried out in the stacked file system on the storage server. Clean up compiled code files in the stack file system;
  • the monitoring system can monitor distributed scheduling machines, compilation server clusters, and distributed storage clusters, and monitor information such as CPU, memory, hard disk, and network.
  • the terminal code incremental compilation system uses a distributed file system to ensure that a large number of mobile phone basic codes and The storage of compilation process files fully and rationally uses different types of idle server resources in the network through automatic scheduling technology, and uses highly versatile incremental compilation scripts using shared library mode to reduce maintenance costs, and R&D personnel only need to use their own You need to select the corresponding configuration items, and you don’t need to care about the code storage location.
  • the stacked file system in the distributed file system separates the compiled files from the code base files to ensure a clean compilation environment.
  • the location of the compiler can realize multiple platforms such as Qualcomm and MTK.
  • Incremental compilation of the Zhanrui platform saves manpower and can realize reasonable resource scheduling.
  • this embodiment separates computing and storage, and the distributed file storage system is used for storage.
  • the compilation server cluster and distributed resource scheduling server perform Calculation, easy to increase or decrease the maintenance of the machine.
  • FIG. 2 is a schematic diagram of the incremental compilation system described in this embodiment.
  • the terminal incremental compilation system includes: distributed resource scheduling server, compilation server cluster, distributed file storage system, distributed resource scheduling server communicates with each server in the compilation server cluster, and each server in the compilation server cluster and distributed file storage System communication connection.
  • the distributed resource scheduling server can provide users with a visual front-end configuration interface, obtain compilation tasks through the front-end configuration interface, determine the target compilation server that matches the compilation task in multiple compilation server clusters according to the compilation task, and send the compilation task to Matching target build server.
  • the target compilation server in the compilation server cluster is used to obtain the file to be compiled from the distributed file storage system according to the compilation task to perform incremental compilation of the code.
  • the target server in the compilation server cluster is also used to determine the compilation environment according to the compilation task, start a container matching the compilation environment, and perform incremental compilation in the container.
  • the distributed file storage system is used to transfer the files to be compiled to the target server.
  • the distributed file storage system is also used to separate the code base file and the compiled file through the stacked file system, and obtain the file to be compiled by copying the code contact file and incremental code.
  • the distributed file storage system is also used to delete the compilation process files after the incremental compilation is completed.
  • the distributed file storage system is also used to cache the first type of files in the distributed file storage system, and the cached first type of files are merged into the second type of files and then transmitted.
  • the first type of files is the capacity
  • the second type of files are files whose capacity reaches the second preset value.
  • the terminal code incremental compilation system proposed in this embodiment guarantees a large number of mobile phone basic codes and compilations through a distributed file system.
  • the stacked file system in the distributed file system is used to separate the compiled files from the code base files to ensure a clean compilation environment, and the automatic scheduling technology in the distributed resource scheduling server is used to fully and rationally use different types of idle resources in the network Server resources, use the universal and incremental compilation scripts in the shared library mode to reduce maintenance costs, and R&D personnel only need to select the corresponding configuration items according to their own needs, without caring about the code storage location and the location of the compiler.
  • Incremental compilation of multi-platforms such as Qualcomm, MTK, and Zhanrui platforms is realized, which saves manpower and enables reasonable resource scheduling.
  • this embodiment separates computing and storage, uses distributed file storage systems for storage, and compiles server clusters Computing with the distributed resource scheduling server, which is convenient for the increase and decrease of the machine maintenance.
  • FIG. 4 is a schematic diagram of the terminal code incremental compilation device described in this embodiment, including: a configuration module 401, used to obtain compilation tasks through the front-end configuration interface; a distribution module 402, according to the compilation tasks, in multiple compilation server clusters Determine the target compilation server that matches the compilation task; the scheduling module 403 sends the compilation task to the matching target compilation server for the target compilation server to retrieve from the distributed file storage system according to the compilation task Acquire the files to be compiled to perform incremental compilation of the code; wherein, the multiple compilation server clusters are server clusters of different platforms, and the compilation server clusters share the distributed file storage system.
  • the allocating module 402 is further configured to acquire a target server that satisfies the resource label requirement according to the resource label carried by the compiling task.
  • the files of the first type in the distributed file storage system in the scheduling module 403 are transferred after being merged into files of the second type; the files of the first type are files whose capacity is smaller than the first preset value, and the files of the second type The file is a file whose capacity reaches the second preset value.
  • the distributed file storage system in the scheduling module 403 includes a stacked file system, and the code base files and compilation process files of the stacked file system are separated.
  • the compilation process files of the distributed file storage system in the scheduling module 403 are deleted after the incremental compilation is completed.
  • the file to be compiled is incrementally compiled in a container in the target compilation server, and the compilation environment of the container is consistent with the compilation environment configured for the file to be compiled.
  • this embodiment is a system embodiment corresponding to the above method embodiment, and this embodiment can be implemented in cooperation with the above method embodiment.
  • the relevant technical details and technical effects mentioned in the above embodiments are still valid in this embodiment, and will not be repeated here to reduce repetition.
  • the relevant technical details mentioned in this embodiment can also be applied in the above embodiments.
  • modules involved in this embodiment are logical modules.
  • a logical unit can be a physical unit, or a part of a physical unit, or multiple physical units. Combination of units.
  • units that are not closely related to solving the technical problem proposed in the present application are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.
  • FIG. 5 Another embodiment of the present application relates to an electronic device, as shown in FIG. 5 , including: at least one processor 501; and a memory 502 communicatively connected to the at least one processor 501; wherein, the memory 502 stores Instructions that can be executed by the at least one processor 501, the instructions are executed by the at least one processor 501, so that the at least one processor 501 can execute the terminal code incremental compilation method in the foregoing embodiments.
  • the memory and the processor are connected by a bus
  • the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors and various circuits of the memory together.
  • the bus may also connect together various other circuits such as peripherals, voltage regulators, and power management circuits, all of which are well known in the art and therefore will not be further described herein.
  • the bus interface provides an interface between the bus and the transceivers.
  • a transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing means for communicating with various other devices over a transmission medium.
  • the data processed by the processor is transmitted on the wireless medium through the antenna, further, the antenna also receives the data and transmits the data to the processor.
  • the processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Instead, memory can be used to store data that the processor uses when performing operations.
  • Another embodiment of the present application relates to a computer-readable storage medium storing a computer program.
  • the above method embodiments are implemented when the computer program is executed by the processor.
  • a storage medium includes several instructions to make a device ( It may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
  • the compilation task is obtained through the front-end configuration interface, and the target server matching the compilation task is determined in multiple server clusters according to the compilation task, so that there is no need for the R&D personnel to determine the server that needs to log in and log in remotely to compile. Personnel only need to configure the compilation task to realize incremental compilation and save human resources.
  • the target server in the embodiment of this application will automatically obtain the compiled code from the distributed storage system according to the compilation task and perform incremental compilation to realize the server's Automatic scheduling makes the allocation of server resources more reasonable.
  • Multiple server clusters are server clusters of different platforms, which conforms to the characteristics of multi-platform compilation of mobile phone software development, facilitates code maintenance and reduces maintenance costs.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The present application relates to a terminal code incremental compilation method, a system, an apparatus, a server, and a storage medium. The terminal code incremental compilation method comprises: acquiring a compilation task by means of a front-end configuration interface (101); according to the compilation task, determining a target compilation server matching the compilation task from among multiple compilation server clusters (102); and sending the compilation task to the matching target compilation server, so that the target compilation server obtains a file to be compiled from a distributed file storage system so as to perform incremental compilation of code (103). The multiple compilation server clusters are server clusters of different platforms, and the compilation server clusters share the distributed file storage system.

Description

终端代码增量编译方法、系统、装置、服务器和存储介质Terminal code incremental compilation method, system, device, server and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202111162661.0、申请日为2021年9月30日的中国专利申请提出,并要求该中国专利申请的优先权。该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number 202111162661.0 and a filing date of September 30, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本申请实施例涉及计算机领域,特别涉及一种终端代码增量编译方法、系统、装置、服务器和存储介质。The embodiments of the present application relate to the computer field, and in particular to a terminal code incremental compilation method, system, device, server and storage medium.
背景技术Background technique
在手机软件研发的过程中,涉及到的代码量很大。当软件需要进行基线升级、软件需求发生变更或软件中有待解决的故障时,研发人员会对代码进行大量的修改。In the process of mobile phone software development, a large amount of code is involved. When software needs a baseline upgrade, when software requirements change, or when there are unresolved bugs in the software, developers make extensive changes to the code.
研发人员在编译代码过程中,往往会在固定大容量编译机下载代码,代码下载完成后,研发人员手工合入增量代码,然后执行增量编译。In the process of compiling the code, R&D personnel often download the code on a fixed large-capacity compiler. After the code download is completed, the R&D personnel manually merge the incremental code, and then perform incremental compilation.
然而,研发人员选择的编译机的软硬件资源,可能与实际编译过程中对软硬件资源的需求不匹配,即,难于合理调度软硬件资源。而且,手动合入增量代码进行编译,可能会对人力资源造成一定浪费。However, the hardware and software resources of the compiler selected by the R&D personnel may not match the requirements for hardware and software resources in the actual compilation process, that is, it is difficult to reasonably allocate hardware and software resources. Moreover, manually incorporating incremental code for compilation may cause a certain waste of human resources.
发明内容Contents of the invention
本申请实施例的主要目的在于提出一种终端代码增量编译方法、系统、装置、服务器和存储介质,能够合理化调度软硬件资源,且节约人力资源。The main purpose of the embodiments of the present application is to provide a terminal code incremental compilation method, system, device, server and storage medium, which can rationally schedule software and hardware resources and save human resources.
为实现上述目的,本申请实施例提供了一种终端代码增量编译方法,包括:通过前端配置界面,获取编译任务;根据所述编译任务,在多个编译服务器集群中确定与所述编译任务匹配的目标编译服务器;将所述编译任务发送至所述匹配的目标编译服务器,供所述目标编译服务器根据所述编译任务从分布式文件存储系统中获取待编译文件进行代码的增量编译;其中,所述多个编译服务器集群为不同平台的服务器集群,所述编译服务器集群共享所述分布式文件存储系统。In order to achieve the above purpose, the embodiment of the present application provides a terminal code incremental compilation method, including: obtaining the compilation task through the front-end configuration interface; according to the compilation task, determining the compilation task in multiple compilation server clusters A matching target compiling server; sending the compiling task to the matching target compiling server, for the target compiling server to obtain the file to be compiled from the distributed file storage system according to the compiling task for incremental compiling of the code; Wherein, the multiple compiling server clusters are server clusters of different platforms, and the compiling server clusters share the distributed file storage system.
为实现上述目的,本申请实施例还提供一种终端代码增量编译系统,包括:分布式资源调度服务器、编译服务器集群、分布式文件存储系统;所述分布式资源调度服务器用于通过前端配置界面,获取编译任务,根据所述编译任务,在多个编译服务器集群中确定与所述编译任务匹配的目标编译服务器,并将所述编译任务发送至所述匹配的目标编译服务器;所述编译服务器集群中的目标编译服务器用于根据所述编译任务从分布式文件存储系统中获取待编译文件进行代码的增量编译;所述分布式文件存储系统用于将所述待编译文件传输至所述目标服务器;其中,所述编译服务器集群共享所述分布式文件存储系统;所述多个编译服务器集群为不同平台的服务器集群。In order to achieve the above purpose, the embodiment of the present application also provides a terminal code incremental compilation system, including: a distributed resource scheduling server, a compilation server cluster, and a distributed file storage system; the distributed resource scheduling server is used to configure an interface for obtaining a compiling task, determining a target compiling server matching the compiling task in a plurality of compiling server clusters according to the compiling task, and sending the compiling task to the matching target compiling server; the compiling The target compilation server in the server cluster is used to obtain the files to be compiled from the distributed file storage system according to the compilation task to perform incremental compilation of the code; the distributed file storage system is used to transmit the files to be compiled to the The target server; wherein, the compilation server clusters share the distributed file storage system; the multiple compilation server clusters are server clusters of different platforms.
为实现上述目的,本申请实施例还提供了一种终端代码增量编译装置,包括:配置模块,用于通过前端配置界面,获取编译任务;分配模块,根据所述编译任务,在多个编译服务器 集群中确定与所述编译任务匹配的目标编译服务器;调度模块,将所述编译任务发送至所述匹配的目标编译服务器,供所述目标编译服务器根据所述编译任务从分布式文件存储系统中获取待编译文件进行代码的增量编译;其中,所述多个编译服务器集群为不同平台的服务器集群,所述编译服务器集群共享所述分布式文件存储系统。In order to achieve the above purpose, the embodiment of the present application also provides a terminal code incremental compilation device, including: a configuration module, used to obtain compilation tasks through the front-end configuration interface; a distribution module, according to the compilation tasks, in multiple compilation Determine the target compilation server that matches the compilation task in the server cluster; the scheduling module sends the compilation task to the matched target compilation server for the target compilation server to download from the distributed file storage system according to the compilation task Acquire the files to be compiled to perform incremental compilation of the code; wherein, the multiple compilation server clusters are server clusters of different platforms, and the compilation server clusters share the distributed file storage system.
为实现上述目的,本申请实施例还提供了一种服务器,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的终端代码增量编译方法。To achieve the above purpose, an embodiment of the present application further provides a server, including: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores information that can be used by the at least one processor An instruction executed by a processor, the instruction is executed by the at least one processor, so that the at least one processor can execute the above terminal code incremental compilation method.
为实现上述目的,本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现上述的终端代码增量编译方法。To achieve the above object, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and implementing the above terminal code incremental compilation method when the computer program is executed by a processor.
附图说明Description of drawings
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定。One or more embodiments are exemplified by pictures in the accompanying drawings, and these exemplifications are not intended to limit the embodiments.
图1是根据本申请一个实施例的终端代码增量编译方法的流程图;Fig. 1 is a flowchart of a method for incrementally compiling terminal codes according to one embodiment of the present application;
图2是根据本申请一个实施例中的终端代码增量编译的装置示意图;FIG. 2 is a schematic diagram of a device for incrementally compiling terminal codes according to an embodiment of the present application;
图3是根据本申请一个实施例中提供的一种用户配置界面的示意图;Fig. 3 is a schematic diagram of a user configuration interface provided in an embodiment of the present application;
图4是根据本申请一个实施例中提供的终端代码增量编译装置的示意图;FIG. 4 is a schematic diagram of a terminal code incremental compilation device provided in an embodiment of the present application;
图5是根据本申请另一个实施例的服务器的结构示意图。Fig. 5 is a schematic structural diagram of a server according to another embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施例进行详细的阐述。然而,本领域的普通技术人员可以理解,在本申请各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本申请的具体实现方式构成任何限定,各个实施例在不矛盾的前提下可以相互结合相互引用。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of the application, many technical details are provided for readers to better understand the application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in this application can also be realized. The division of the following embodiments is for the convenience of description, and should not constitute any limitation to the specific implementation of the present application, and the embodiments can be combined and referred to each other on the premise of no contradiction.
本申请的一个实施例涉及一种终端代码增量编译方法,可应用于服务器,但不限于此。本实施例的终端代码增量编译方法,包括:通过前端配置界面,获取编译任务;根据所述编译任务,在多个编译服务器集群中确定与所述编译任务匹配的目标编译服务器;将所述编译任务发送至所述匹配的目标编译服务器,供所述目标编译服务器根据所述编译任务从分布式文件存储系统中获取待编译文件进行代码的增量编译;其中,所述多个编译服务器集群为不同平台的服务器集群,所述编译服务器集群共享所述分布式文件存储系统。An embodiment of the present application relates to a terminal code incremental compilation method, which can be applied to a server, but is not limited thereto. The terminal code incremental compilation method in this embodiment includes: obtaining a compilation task through a front-end configuration interface; according to the compilation task, determining a target compilation server that matches the compilation task in a plurality of compilation server clusters; The compilation task is sent to the matching target compilation server for the target compilation server to obtain the files to be compiled from the distributed file storage system according to the compilation task for incremental compilation of the code; wherein, the multiple compilation server clusters It is a server cluster of different platforms, and the compilation server cluster shares the distributed file storage system.
本实施例,通过前端配置界面,获取编译任务,根据编译任务,在多个服务器集群中确定与编译任务匹配的目标服务器,从而无需研发人员确定需要登陆的服务器并远程登陆进行编译,研发人员只需进行编译任务的配置,即可实现增量编译,节约人力资源,本申请的实施例的目标服务器会根据编译任务从分布式存储系统中自动获取编译代码进行增量编译,实现服务器的自动调度,使得服务器资源的分配更加合理,多个服务器集群为不同平台的服务器集群,符合手机软件研发多平台编译的特性,便于进行代码的维护,降低了维护成本。In this embodiment, the compilation task is obtained through the front-end configuration interface, and the target server that matches the compilation task is determined in multiple server clusters according to the compilation task, so that there is no need for the R&D personnel to determine the server that needs to log in and log in remotely to compile. The R&D personnel only need to It is necessary to configure the compilation task to realize incremental compilation and save human resources. The target server in the embodiment of this application will automatically obtain the compiled code from the distributed storage system according to the compilation task and perform incremental compilation to realize the automatic scheduling of the server. , which makes the allocation of server resources more reasonable. Multiple server clusters are server clusters of different platforms, which conforms to the characteristics of multi-platform compilation of mobile phone software development, facilitates code maintenance and reduces maintenance costs.
下面对本实施例的的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须。The implementation details of this embodiment are described in detail below, and the following content is only implementation details provided for easy understanding, and is not necessary for implementing this solution.
本实施例的终端代码增量编译方法的具体流程可以如图1所示,包括:The specific flow of the terminal code incremental compilation method of this embodiment can be shown in Figure 1, including:
步骤101,通过前端配置界面,获取编译任务。 Step 101, obtain compilation tasks through the front-end configuration interface.
在一些实施例中,编译任务中携带资源标签。节点为编译服务器集群中的服务器。编译服务器集群可包括多个不同平台的服务器集群,可参见图2所示,包括高通平台集群、MTK平台集群、展锐平台集群,不同的平台的集群服务器有不同的软硬件资源,资源标签表征了增量编译需要的软硬件资源,如,所需的编译服务器所在的某个编译服务器集群、编译所需要的CPU核数、内存资源等。资源标签可以为编译服务器集群的标签,每个编译服务器集群中可配置硬件资源不同的服务器。In some embodiments, resource tags are carried in the compilation task. Nodes are servers in a compilation server cluster. Compiler server clusters can include multiple server clusters of different platforms, as shown in Figure 2, including Qualcomm platform clusters, MTK platform clusters, and Zhanrui platform clusters. Cluster servers on different platforms have different software and hardware resources, and resource labels represent The software and hardware resources required for incremental compilation, such as a certain compilation server cluster where the required compilation server is located, the number of CPU cores required for compilation, memory resources, etc. The resource tag may be a tag of a compiling server cluster, and each compiling server cluster may be configured with servers with different hardware resources.
示例性的,服务器为研发人员提供一个可视化的用户配置界面,可参见如图3所示的项目配置界面示意图,对编译中涉及到的项目进行配置,可以包括以下配置项:Exemplarily, the server provides developers with a visual user configuration interface, as shown in the schematic diagram of the project configuration interface shown in Figure 3, to configure the projects involved in the compilation, which may include the following configuration items:
Searchfilter:gerrit网页查询条件。Searchfilter: gerrit web page query conditions.
Mergedfileter:merge状态下的单号。Mergedfileter: the single number in the merge state.
CodeMode:表征更新代码模式,Dailybuild模式表征基于每日构建的代码+当前searchfileter的代码进行更新;Latest模式表征在每日构建代码基础上repo sync后+当前seachfilter的代码进行更新。CodeMode: Indicates the update code mode. The Dailybuild mode indicates that the code is updated based on the daily build code + the current searchfilter code; the Latest mode indicates that the code is updated after repo sync + the current searchfilter code based on the daily build code.
BuildMode:如果选择AP,表示只编译AP侧,如果选择Modem,表示只编译Modem侧。BuildMode: If AP is selected, it means that only the AP side is compiled; if Modem is selected, it means that only the Modem side is built.
Node:表征编译任务所需的软硬件的资源标签,例如高通(qualcomm)标签,mtk标签,展锐(sprd)标签。Node: A resource label representing the software and hardware required for the compilation task, such as Qualcomm (qualcomm) label, mtk label, and Zhanrui (sprd) label.
NeedVersionFile:表征增量编译结束后是否需要将版本文件上传至ftp供下载使用。NeedVersionFile: Indicates whether the version file needs to be uploaded to ftp for download after the incremental compilation is completed.
NeedOut:表征增量编译前是否保留out目录,如果值为Yes,则表明增量编译前保留ot目录,如果值为No,则表明增量编译前删除out目录。NeedOut: Indicates whether to keep the out directory before incremental compilation. If the value is Yes, it indicates that the ot directory is retained before incremental compilation. If the value is No, it indicates that the out directory is deleted before incremental compilation.
CompileProject:表征要编译的项目的名称。CompileProject: Characterizes the name of the project to be compiled.
上述配置项仅为示例,实际应用过程中可根据需求设置。The above configuration items are just examples, and can be set according to requirements in actual application.
前端配置界面还可提供任务管理、资源管理、日志管理、插件管理等配置,服务器可基于配置进行管理,自动调度编译服务器集群。The front-end configuration interface can also provide configurations such as task management, resource management, log management, and plug-in management. The server can be managed based on the configuration, and the compilation server cluster can be automatically scheduled.
1.任务管理,包括编译任务操作、编译任务的执行配置、编译任务的触发方式、编译任务的执行状态等。1. Task management, including compilation task operation, compilation task execution configuration, compilation task trigger mode, compilation task execution status, etc.
1)编译任务操作:提供任务的添加、编辑、删除以及任务运行状态的获取、任务启动、挂起、暂停和重新执行等配置功能。1) Compile task operation: provide configuration functions such as adding, editing, and deleting tasks, obtaining task running status, task starting, suspending, pausing, and re-executing.
2)编译任务执行配置:提供包括执行过程阶段的选择,相对应manifest文件,版本类型,任务超时控制,编译任务失败重试,任务失败告警等配置功能。2) Compilation task execution configuration: Provide configuration functions including selection of execution process stages, corresponding manifest file, version type, task timeout control, compilation task failure retry, task failure alarm, etc.
3)编译任务触发方式:可以包括计划任务(Cron)方式,任务依赖方式,直接调用应用程序编程接口(api)触发任务的执行方式。3) Compilation task triggering mode: may include a scheduled task (Cron) mode, a task-dependent mode, and an execution mode of directly invoking an application programming interface (api) to trigger a task.
4)编译任务执行状态:成功(success),失败(fail),中断(abort)等。4) Compilation task execution status: success (success), failure (fail), abort (abort), etc.
2.资源管理:添加、编辑删除编译服务器标签信息。2. Resource management: Add, edit and delete compilation server label information.
3.日志管理:增量编译过程中日志信息的展示。3. Log management: display of log information during incremental compilation.
4.插件管理:通过插件配置服务动态的进行动态配置和插件依赖包上传,完成插件的新 增和修改操作,满足丰富灵活的业务需求。4. Plug-in management: dynamically configure and upload plug-in dependent packages through the plug-in configuration service, complete the addition and modification of plug-ins, and meet rich and flexible business needs.
步骤102,根据编译任务,在多个编译服务器集群中确定与编译任务匹配的目标编译服务器。例如,编译任务与图2中的具有分布式资源调度引擎的服务器进行匹配,从而为编译任务分配目标编译服务器。具有分布式资源调度功能的服务器与具有持续集成引擎的服务器为同一服务器。 Step 102, according to the compiling task, determine a target compiling server matching the compiling task in multiple compiling server clusters. For example, the compiling task is matched with the server with the distributed resource scheduling engine in FIG. 2 , so as to allocate the target compiling server for the compiling task. The server with the distributed resource scheduling function is the same as the server with the continuous integration engine.
在一些实施例中,根据编译任务携带的资源标签,获取满足资源标签需求的目标服务器。例如,编译任务携带的资源标签为:qualcomm,则满足资源标签需求的目标服务器为高通服务器。本实施例中,编译任务中可携带资源标签,简化了研发人员对任务的配置,进一步减少了人力成本,而且,根据资源标签表征的软硬件资源选择目标服务器,符合不同软件项目在编译时对软硬件资源的需求,提高编译效率。In some embodiments, according to the resource tag carried by the compiling task, the target server meeting the resource tag requirement is obtained. For example, if the resource tag carried by the compilation task is: qualcomm, then the target server that meets the resource tag requirement is a Qualcomm server. In this embodiment, the resource tag can be carried in the compilation task, which simplifies the configuration of the task by the R&D personnel and further reduces the labor cost. Moreover, the selection of the target server according to the software and hardware resources represented by the resource tag is in line with the requirements of different software projects when compiling. The demand for software and hardware resources improves compilation efficiency.
如图2所示,分布式资源管理引擎包括如下功能。As shown in Figure 2, the distributed resource management engine includes the following functions.
1)控制台配置管理包含:通过配置文件,如yaml、json配置编译服务器资源,例如平台信息,项目信息,CPU,内存,硬盘信息等。1) Console configuration management includes: configure and compile server resources through configuration files, such as yaml and json, such as platform information, project information, CPU, memory, hard disk information, etc.
2)接入:将控制台的任务转化下发给调度器,并且向注册中心注册任务。2) Access: Send the task conversion of the console to the scheduler, and register the task with the registration center.
3)调度器:接收接入下发的调度任务,进行任务拆分下发,在注册中心找执行器,然后把任务下发到执行器执行,同时也注册到注册中心。3) Scheduler: Receives the scheduled tasks issued by the access, splits and distributes the tasks, finds the executor in the registration center, then sends the task to the executor for execution, and registers with the registration center at the same time.
4)执行器:接收调度任务,并且上报状态给注册中心。4) Executor: Receive scheduling tasks and report the status to the registration center.
5)注册中心:机器、任务状态的同步、协调。5) Registration center: synchronization and coordination of machine and task status.
步骤103,将编译任务发送至所述匹配的目标编译服务器,供目标编译服务器根据编译任务从分布式文件存储系统中获取待编译文件进行代码的增量编译。其中,所述多个编译服务器集群为不同平台的服务器集群,所述编译服务器集群共享所述分布式文件存储系统。 Step 103 , sending the compiling task to the matching target compiling server, so that the target compiling server can obtain the file to be compiled from the distributed file storage system according to the compiling task to perform incremental compiling of the code. Wherein, the multiple compiling server clusters are server clusters of different platforms, and the compiling server clusters share the distributed file storage system.
在一些实施例中,目标服务器根据编译任务从分布式存储系统中获取待编译文件,并使用通用化增量编译脚本对代编文件进行增量编译,其中,通用化增量编译脚本采用共享库模式。本实施例使用共享库模式的通用化增量编译脚本,便于各平台使用通用化的增量编译脚本进行增量编译,便于进行代码的维护,降低了维护成本。In some embodiments, the target server obtains the file to be compiled from the distributed storage system according to the compilation task, and uses a generalized incremental compilation script to incrementally compile the compiled file, wherein the generalized incremental compilation script uses a shared library model. This embodiment uses a generalized incremental compilation script in the shared library mode, which is convenient for each platform to perform incremental compilation using the generalized incremental compilation script, facilitates code maintenance, and reduces maintenance costs.
在一些实施例中,待编译文件在目标编译服务器中的容器中进行增量编译,容器的编译环境与所述待编译文件配置的编译环境一致。为了避免同一物理机安装不同的编译环境造成的冲突,如安装高通、MTK、展锐三个编译环境会产生冲突,在传统的编译方法中,往往会在一个纯物理机上安装一个编译环境,例如展锐服务器安装展锐平台,高通服务器安装gao通平台,而这种方式会导致服务器资源利用率低,因此,本实施例调度时通过镜像服务器拉取image,并生成一个或多个容器进行增量编译,使用容器技术一方面不会造成冲突,另一方面,通过容器可以在同一台服务器中启用不同的编译环境,提高资源复用率。In some embodiments, the file to be compiled is incrementally compiled in a container in the target compilation server, and the compilation environment of the container is consistent with the compilation environment configured for the file to be compiled. In order to avoid conflicts caused by installing different compilation environments on the same physical machine, such as installing the three compilation environments of Qualcomm, MTK, and Zhanrui, there will be conflicts. In the traditional compilation method, one compilation environment is often installed on a pure physical machine, for example The Zhanrui server is installed with the Zhanrui platform, and the Qualcomm server is installed with the Gaotong platform. This method will lead to low utilization of server resources. Therefore, when scheduling in this embodiment, the mirror server pulls the image and generates one or more containers for expansion. Quantitative compilation, the use of container technology will not cause conflicts on the one hand, on the other hand, different compilation environments can be enabled in the same server through containers, improving resource reuse.
示例性的参考图2所示,安装不同平台将编译服务器集群划分为高通平台集群,展锐平台集群,调度时通过镜像服务器拉取镜像(image),并生成一个或多个容器进行增量编译。An exemplary reference is shown in Figure 2. Install different platforms to divide the compilation server cluster into Qualcomm platform cluster and Zhanrui platform cluster. When scheduling, the mirror server pulls the image (image) and generates one or more containers for incremental compilation. .
在一些实施例中,分布式文件存储系统中的第一类文件在合并为第二类文件后进行传输;第一类文件为容量小于第一预设值的文件,第二类文件为容量达到第二预设值的文件。本实施例避免了大量小文件的读写操作。本实施例中,设置缓存数据分析小文件进行缓存处理,待达到大文件标准值时再进行合并处理,避免大量小文件的IO读写操作。In some embodiments, the first type of files in the distributed file storage system are transferred after being merged into the second type of files; the first type of files are files whose capacity is smaller than the first preset value, and the second type of files are files whose capacity reaches The file of the second default value. This embodiment avoids reading and writing operations of a large number of small files. In this embodiment, cache data is set to analyze small files for cache processing, and merge processing is performed after reaching the standard value of large files, so as to avoid IO read and write operations of a large number of small files.
在一些实施例中,分布式文件存储系统中的代码基础文件和编译过程文件分离,待编译 文件通过对所述代码基础文件的复制以及增量代码得到。具体地,通过堆叠文件系统将代码基础文件和编译过程文件分离。本实施例使用堆叠文件系统便于保存干净的编译环境,从而便于研发人员基于同一代码基础文件同时进行编译。In some embodiments, the code base file in the distributed file storage system is separated from the compilation process file, and the file to be compiled is obtained by duplicating the code base file and incremental code. Specifically, the code base file and the compilation process file are separated by stacking the file system. In this embodiment, a stacked file system is used to save a clean compilation environment, so that developers can compile simultaneously based on the same code base file.
在一些实施例中,分布式文件存储系统的编译文件在增量编译完成后被删除。在传统的增量编译中,研发人员第一次增量编译后会生成大量的编译过程文件,当再次进行增量编译时还要先手动清理环境才能再次进行增量编译,验证通过后才能合入代码库,费时费力,因此,本实施例将代码基础文件和编译过程文件,在编译完成后,可以自动清理编译过程文件,即进行环境的清理,节约了人力资源,且,通过堆叠文件系统将代码基础文件和编译过程文件分离,避免大量的编译生成文件污染环境,便于多人同时进行增量编译。例如,堆叠式文件可分为三层,基础层A,可存储基础代码文件fileA,变化层B,存储fileB,以及C层,C层可存储文件:fileA和fileB,编译服务器可调用C层的文件进行增量编译,增量编译过程中产生的文件可同时放入B层,在增量编译完成后,可清除B层和C层的文件。In some embodiments, the compiled files of the distributed file storage system are deleted after the incremental compilation is completed. In traditional incremental compilation, developers will generate a large number of compilation process files after the first incremental compilation. When incremental compilation is performed again, the environment must be manually cleaned before incremental compilation can be performed again. Therefore, in this embodiment, the code base file and the compilation process file can be automatically cleaned up after the compilation is completed, that is, the environment is cleaned up, saving human resources, and, by stacking the file system Separate the code base file and the compilation process file to avoid a large number of compiled files from polluting the environment, and it is convenient for multiple people to perform incremental compilation at the same time. For example, stacked files can be divided into three layers, the base layer A can store the basic code file fileA, the change layer B can store fileB, and the C layer can store files: fileA and fileB, and the compilation server can call the C layer The files are incrementally compiled, and the files generated during the incremental compilation process can be put into the B layer at the same time. After the incremental compilation is completed, the files in the B layer and the C layer can be cleared.
示例性的,参照图2所示,分布式文件系统,可以包括以下部分:Exemplarily, as shown in FIG. 2, the distributed file system may include the following parts:
1)元数据服务用来记录编译服务器集群中的元数据,如节点信息、SSD的信息、卷信息等。1) The metadata service is used to record the metadata in the compilation server cluster, such as node information, SSD information, volume information, etc.
2)文件存取接口:负责对外提供文件读写,删除,创建等操作功能。2) File access interface: responsible for providing external file read and write, delete, create and other operation functions.
3)存储节点集群:负责存储基础代码文件,编译过程文件。3) Storage node cluster: responsible for storing basic code files and compiling process files.
4)缓存数据解析:针对手机软件版本会生成大量的小文件,所以设置缓存数据分析小文件进行缓存处理,待达到大文件标准值时再进行合并处理,避免大量小文件的IO读写操作。其中,小文件为第一类文件,大文件为第二类文件,标准值为第二预设值。4) Cache data analysis: A large number of small files will be generated for the mobile phone software version, so the cache data is set to analyze small files for caching processing, and then merge processing after reaching the standard value of large files to avoid IO read and write operations of a large number of small files. Wherein, the small file is the first type of file, the large file is the second type of file, and the standard value is the second preset value.
5)堆叠文件系统:将代码基础文件和编译过程文件分离。通过堆叠文件系统可以避免大量的编译生成文件污染环境,便于多人同时进行增量编译。5) Stacked file system: separate code base files and compilation process files. By stacking the file system, a large number of compiled files can be avoided from polluting the environment, and it is convenient for multiple people to perform incremental compilation at the same time.
以下,以代码管理工具为gerrit为例,说明编译过程。In the following, the compilation process is described by taking the code management tool as gerrit as an example.
手机软件版本增量编译过程为:The incremental compilation process of the mobile phone software version is as follows:
1.在持续集成引擎启动任务设置编译任务相关参数1. Set compilation task related parameters in the continuous integration engine startup task
2.利用分布式资源调度引擎分配编译资源,确定目标编译服务器。2. Use the distributed resource scheduling engine to allocate compilation resources and determine the target compilation server.
3.程序根据编译任务中设置的共享库信息从代码库下载相关通用化增量编译脚本。3. The program downloads relevant generalized incremental compilation scripts from the code library according to the shared library information set in the compilation task.
4.根据研发填写的编译任务中项目信息,平台信息查找相应的存储资源。4. Find the corresponding storage resources according to the project information and platform information in the compilation task filled in by R&D.
(1)每天晚上做全版本构建编译,代码以及编译过程文件根据存储的项目信息和平台信息标签存放到相应的存储集群中。(1) Build and compile the full version every night, and store the code and compilation process files in the corresponding storage cluster according to the stored project information and platform information tags.
(2)每天白天进行增量编译时会根据项目信息和平台信息资源标签到相应的存储集群中去取基础代码。(2) During the incremental compilation every day, the basic code will be retrieved from the corresponding storage cluster according to the project information and platform information resource tags.
5.根据设置的gerrit中的Merge状态的评审单据号(Merged Chang-Id,mergeid),Open状态的评审单据号(Open Chang-Id,openid)更新增量代码,利用了gerrit的cherry-pick功能合入增量代码到对应标签存储集群的基础环境中。其中,gerrit mergeid,openid可以唯一确定增量代码。5. Update the incremental code according to the review document number (Merged Chang-Id, mergeid) of the Merge state in the set gerrit, and the review document number (Open Chang-Id, openid) of the Open state, using the cherry-pick function of gerrit Merge the incremental code into the basic environment of the corresponding label storage cluster. Among them, gerrit mergeid and openid can uniquely determine the incremental code.
6.根据Merge状态的评审单据号(Merged Chang-Id,mergeid),Open状态的评审单据号(Open Chang-Id,openid),本地代码的manifest文件信息,判断增量代码是否与本地代码环境一致,是否与本地有冲突:6. According to the review document number (Merged Chang-Id, mergeid) of the Merge state, the review document number (Open Chang-Id, openid) of the Open state, and the manifest file information of the local code, determine whether the incremental code is consistent with the local code environment , whether there is a conflict with the local:
若环境一致且无冲突,正常编译,编译过程在存储服务器上的堆叠文件系统中进行,作用是不仅能同时支持多个研发同时进行编译,而且还不会破坏基础代码的编译环境,验证完毕后清理堆叠文件系统中的编译代码文件;If the environment is consistent and there are no conflicts, compile normally. The compilation process is carried out in the stacked file system on the storage server. Clean up compiled code files in the stack file system;
若环境一致有冲突,退出编译;If the environment is consistent and there is a conflict, exit the compilation;
若环境不一致,退出编译。If the environment is inconsistent, exit compilation.
在一些实施例中,参照图2所示,监控系统可以对分布式调度机器,编译服务器集群,分布式存储集群进行监控,监控CPU,内存,硬盘,网络等信息。In some embodiments, as shown in FIG. 2 , the monitoring system can monitor distributed scheduling machines, compilation server clusters, and distributed storage clusters, and monitor information such as CPU, memory, hard disk, and network.
相对于传统的在固定编译机人工下载全套代码,合入增量代码,编译完再重复清理本地环境,本实施例提出的终端代码增量编译系统,使用分布式文件系统保证大量手机基础代码和编译过程文件的存储,通过自动调度技术充分合理使用网络中空闲的不同类型的服务器资源,利用通用性强的并且采用共享库模式的增量编译脚本,减少维护成本,而且研发人员只需根据自己的需要选择对应的配置项,无需关心代码存储位置,分布式文件系统中的堆叠文件系统将编译文件和代码基础文件分离,保证干净的编译环境,编译机位置即可实现多平台如高通、MTK、展锐平台的增量编译,节约人力,且能实现合理的资源调度,另外,本实施例将计算和存储分离,分布式文件存储系统用于存储,编译服务器集群和分布式资源调度服务器进行计算,便于对机器的增减维护。Compared with the traditional method of manually downloading a full set of codes on a fixed compiler machine, incorporating incremental codes, and then repeatedly cleaning up the local environment after compilation, the terminal code incremental compilation system proposed in this embodiment uses a distributed file system to ensure that a large number of mobile phone basic codes and The storage of compilation process files fully and rationally uses different types of idle server resources in the network through automatic scheduling technology, and uses highly versatile incremental compilation scripts using shared library mode to reduce maintenance costs, and R&D personnel only need to use their own You need to select the corresponding configuration items, and you don’t need to care about the code storage location. The stacked file system in the distributed file system separates the compiled files from the code base files to ensure a clean compilation environment. The location of the compiler can realize multiple platforms such as Qualcomm and MTK. , Incremental compilation of the Zhanrui platform saves manpower and can realize reasonable resource scheduling. In addition, this embodiment separates computing and storage, and the distributed file storage system is used for storage. The compilation server cluster and distributed resource scheduling server perform Calculation, easy to increase or decrease the maintenance of the machine.
本申请的另一个实施例涉及一种增量编译系统,下面对本实施例的终端增量编译系统的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须,图2是本实施例所述的增量编译系统的示意图。Another embodiment of the present application relates to an incremental compilation system. The implementation details of the terminal incremental compilation system of this embodiment are described in detail below. The following content is only the implementation details provided for the convenience of understanding, and is not necessary for the implementation of this solution. , FIG. 2 is a schematic diagram of the incremental compilation system described in this embodiment.
终端增量编译系统包括:分布式资源调度服务器,编译服务器集群,分布式文件存储系统,分布式资源调度服务器与编译服务器集群中各服务器通信连接,编译服务器集群中的各服务器与分布式文件存储系统通信连接。The terminal incremental compilation system includes: distributed resource scheduling server, compilation server cluster, distributed file storage system, distributed resource scheduling server communicates with each server in the compilation server cluster, and each server in the compilation server cluster and distributed file storage System communication connection.
分布式资源调度服务器可以为用户提供一个可视化的前端配置界面,通过前端配置界面获取编译任务,根据编译任务在多个编译服务器集群中确定与编译任务匹配的目标编译服务器,并将编译任务发送至匹配的目标编译服务器。The distributed resource scheduling server can provide users with a visual front-end configuration interface, obtain compilation tasks through the front-end configuration interface, determine the target compilation server that matches the compilation task in multiple compilation server clusters according to the compilation task, and send the compilation task to Matching target build server.
编译服务器集群中的目标编译服务器用于根据所述编译任务从分布式文件存储系统中获取待编译文件进行代码的增量编译。The target compilation server in the compilation server cluster is used to obtain the file to be compiled from the distributed file storage system according to the compilation task to perform incremental compilation of the code.
编译服务器集群中的目标服务器还用于根据编译任务确定编译环境,启动与该编译环境匹配的容器,在容器中进行增量编译。The target server in the compilation server cluster is also used to determine the compilation environment according to the compilation task, start a container matching the compilation environment, and perform incremental compilation in the container.
分布式文件存储系统用于将待编译文件传输至目标服务器。The distributed file storage system is used to transfer the files to be compiled to the target server.
在一些实施例中,分布式文件存储系统还用于通过堆叠文件系统将代码基础文件和编译文件分离,通过对代码接触文件的复制和增量代码得到待编译文件。In some embodiments, the distributed file storage system is also used to separate the code base file and the compiled file through the stacked file system, and obtain the file to be compiled by copying the code contact file and incremental code.
在一些实施例中,分布式文件存储系统还用于在增量编译完成后,删除编译过程文件。In some embodiments, the distributed file storage system is also used to delete the compilation process files after the incremental compilation is completed.
在一些实施例中,分布式文件存储系统还用于对分布式文件存储系统中的第一类文件进行缓存,缓存的第一类文件合并为第二类文件后进行传输第一类文件为容量小于第一预设值的文件,第二类文件为容量达到第二预设值的文件。In some embodiments, the distributed file storage system is also used to cache the first type of files in the distributed file storage system, and the cached first type of files are merged into the second type of files and then transmitted. The first type of files is the capacity For files smaller than the first preset value, the second type of files are files whose capacity reaches the second preset value.
本实施例的分布式资源调度服务器,编译服务器集群,分布式文件存储系统其余细节与上述方法实施例大致相同,本实施例不再赘述。The remaining details of the distributed resource scheduling server, compilation server cluster, and distributed file storage system in this embodiment are substantially the same as those in the above-mentioned method embodiment, and will not be repeated in this embodiment.
相对于传统的在固定编译机人工下载全套代码,合入增量代码,编译完再重复清理本地环境本实施例提出的终端代码增量编译系统,通过分布式文件系统保证大量手机基础代码和编译过程文件的存储,采用分布式文件系统中的堆叠文件系统将编译文件和代码基础文件分离,保证干净的编译环境,使用分布式资源调度服务器中的自动调度技术充分合理使用网络中空闲的不同类型的服务器资源,利用通用性强的并且采用共享库模式的增量编译脚本,减少维护成本,而且研发人员只需根据自己的需要选择对应的配置项,无需关心代码存储位置、编译机位置即可实现多平台如高通、MTK、展锐平台的增量编译,节约人力,且能实现合理的资源调度,另外,本实施例将计算和存储分离,分布式文件存储系统用于存储,编译服务器集群和分布式资源调度服务器进行计算,便于对机器的增减维护。Compared with the traditional method of manually downloading a full set of codes on a fixed compiler machine, combining them with incremental codes, and then repeatedly cleaning up the local environment after compiling, the terminal code incremental compilation system proposed in this embodiment guarantees a large number of mobile phone basic codes and compilations through a distributed file system. For the storage of process files, the stacked file system in the distributed file system is used to separate the compiled files from the code base files to ensure a clean compilation environment, and the automatic scheduling technology in the distributed resource scheduling server is used to fully and rationally use different types of idle resources in the network Server resources, use the universal and incremental compilation scripts in the shared library mode to reduce maintenance costs, and R&D personnel only need to select the corresponding configuration items according to their own needs, without caring about the code storage location and the location of the compiler. Incremental compilation of multi-platforms such as Qualcomm, MTK, and Zhanrui platforms is realized, which saves manpower and enables reasonable resource scheduling. In addition, this embodiment separates computing and storage, uses distributed file storage systems for storage, and compiles server clusters Computing with the distributed resource scheduling server, which is convenient for the increase and decrease of the machine maintenance.
本申请的另一个实施例涉及一种终端代码增量编译装置,下面对本实施例的调度系统的细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本例的必须,图4是本实施例所述的终端代码增量编译装置的示意图,包括:配置模块401,用于通过前端配置界面,获取编译任务;分配模块402,根据所述编译任务,在多个编译服务器集群中确定与所述编译任务匹配的目标编译服务器;调度模块403,将所述编译任务发送至所述匹配的目标编译服务器,供所述目标编译服务器根据所述编译任务从分布式文件存储系统中获取待编译文件进行代码的增量编译;其中,所述多个编译服务器集群为不同平台的服务器集群,所述编译服务器集群共享所述分布式文件存储系统。Another embodiment of the present application relates to a terminal code incremental compilation device. The details of the scheduling system in this embodiment are described in detail below. The following content is only the implementation details provided for the convenience of understanding, and is not necessary for the implementation of this embodiment. 4 is a schematic diagram of the terminal code incremental compilation device described in this embodiment, including: a configuration module 401, used to obtain compilation tasks through the front-end configuration interface; a distribution module 402, according to the compilation tasks, in multiple compilation server clusters Determine the target compilation server that matches the compilation task; the scheduling module 403 sends the compilation task to the matching target compilation server for the target compilation server to retrieve from the distributed file storage system according to the compilation task Acquire the files to be compiled to perform incremental compilation of the code; wherein, the multiple compilation server clusters are server clusters of different platforms, and the compilation server clusters share the distributed file storage system.
在一些实施例中,分配模块402进一步用于根据编译任务携带的资源标签,获取满足资源标签需求的目标服务器。In some embodiments, the allocating module 402 is further configured to acquire a target server that satisfies the resource label requirement according to the resource label carried by the compiling task.
在一些实施例中,调度模块403中的分布式文件存储系统的第一类文件在合并为第二类文件后进行传输;第一类文件为容量小于第一预设值的文件,第二类文件为容量达到第二预设值的文件。In some embodiments, the files of the first type in the distributed file storage system in the scheduling module 403 are transferred after being merged into files of the second type; the files of the first type are files whose capacity is smaller than the first preset value, and the files of the second type The file is a file whose capacity reaches the second preset value.
在一些实施例中,调度模块403中的分布式文件存储系统包括堆叠文件系统,堆叠文件系统的代码基础文件和编译过程文件分离。In some embodiments, the distributed file storage system in the scheduling module 403 includes a stacked file system, and the code base files and compilation process files of the stacked file system are separated.
在一些实施例中,调度模块403中的分布式文件存储系统的编译过程文件在增量编译完成后被删除。In some embodiments, the compilation process files of the distributed file storage system in the scheduling module 403 are deleted after the incremental compilation is completed.
在一些实施例中,待编译文件在目标编译服务器中的容器中进行增量编译,所述容器的编译环境与所述待编译文件配置的编译环境一致。In some embodiments, the file to be compiled is incrementally compiled in a container in the target compilation server, and the compilation environment of the container is consistent with the compilation environment configured for the file to be compiled.
不难发现,本实施例为与上述方法实施例对应的系统实施例,本实施例可以与上述方法实施例互相配合实施。上述实施例中提到的相关技术细节和技术效果在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在上述实施例中。It is not difficult to find that this embodiment is a system embodiment corresponding to the above method embodiment, and this embodiment can be implemented in cooperation with the above method embodiment. The relevant technical details and technical effects mentioned in the above embodiments are still valid in this embodiment, and will not be repeated here to reduce repetition. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiments.
值得一提的是,本实施例中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本申请的创新部分,本实施例中并没有将与解决本申请所提出的技术问题关系不太密切的单元引入,但这并不表明本实施例中不存在其它的单元。It is worth mentioning that all the modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, or a part of a physical unit, or multiple physical units. Combination of units. In addition, in order to highlight the innovative part of the present application, units that are not closely related to solving the technical problem proposed in the present application are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.
本申请另一个实施例涉及一种电子设备,如图5所示,包括:至少一个处理器501;以及,与所述至少一个处理器501通信连接的存储器502;其中,所述存储器502存储有可被 所述至少一个处理器501执行的指令,所述指令被所述至少一个处理器501执行,以使所述至少一个处理器501能够执行上述各实施例中的终端代码增量编译方法。Another embodiment of the present application relates to an electronic device, as shown in FIG. 5 , including: at least one processor 501; and a memory 502 communicatively connected to the at least one processor 501; wherein, the memory 502 stores Instructions that can be executed by the at least one processor 501, the instructions are executed by the at least one processor 501, so that the at least one processor 501 can execute the terminal code incremental compilation method in the foregoing embodiments.
其中,存储器和处理器采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器和存储器的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器。Wherein, the memory and the processor are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors and various circuits of the memory together. The bus may also connect together various other circuits such as peripherals, voltage regulators, and power management circuits, all of which are well known in the art and therefore will not be further described herein. The bus interface provides an interface between the bus and the transceivers. A transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing means for communicating with various other devices over a transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna, further, the antenna also receives the data and transmits the data to the processor.
处理器负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器可以被用于存储处理器在执行操作时所使用的数据。The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Instead, memory can be used to store data that the processor uses when performing operations.
本申请另一个实施例涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。Another embodiment of the present application relates to a computer-readable storage medium storing a computer program. The above method embodiments are implemented when the computer program is executed by the processor.
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing related hardware through a program, the program is stored in a storage medium, and includes several instructions to make a device ( It may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
本申请的实施例,通过前端配置界面,获取编译任务,根据编译任务,在多个服务器集群中确定与编译任务匹配的目标服务器,从而无需研发人员确定需要登陆的服务器并远程登陆进行编译,研发人员只需进行编译任务的配置,即可实现增量编译,节约人力资源,本申请的实施例的目标服务器会根据编译任务从分布式存储系统中自动获取编译代码进行增量编译,实现服务器的自动调度,使得服务器资源的分配更加合理,多个服务器集群为不同平台的服务器集群,符合手机软件研发多平台编译的特性,便于进行代码的维护,降低了维护成本。In the embodiment of this application, the compilation task is obtained through the front-end configuration interface, and the target server matching the compilation task is determined in multiple server clusters according to the compilation task, so that there is no need for the R&D personnel to determine the server that needs to log in and log in remotely to compile. Personnel only need to configure the compilation task to realize incremental compilation and save human resources. The target server in the embodiment of this application will automatically obtain the compiled code from the distributed storage system according to the compilation task and perform incremental compilation to realize the server's Automatic scheduling makes the allocation of server resources more reasonable. Multiple server clusters are server clusters of different platforms, which conforms to the characteristics of multi-platform compilation of mobile phone software development, facilitates code maintenance and reduces maintenance costs.
本领域的普通技术人员可以理解,上述各实施方式是实现本申请的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本申请的原理和范围。Those of ordinary skill in the art can understand that the above-mentioned embodiments are specific examples for realizing the application, and in practical applications, various changes can be made to it in form and details without departing from the principles and principles of the application. scope.

Claims (10)

  1. 一种终端代码增量编译方法,包括:A terminal code incremental compilation method, comprising:
    通过前端配置界面,获取编译任务;Obtain compilation tasks through the front-end configuration interface;
    根据所述编译任务,在多个编译服务器集群中确定与所述编译任务匹配的目标编译服务器;According to the compiling task, determine a target compiling server matching the compiling task in multiple compiling server clusters;
    将所述编译任务发送至所述匹配的目标编译服务器,供所述目标编译服务器根据所述编译任务从分布式文件存储系统中获取待编译文件进行代码的增量编译;Sending the compiling task to the matching target compiling server for the target compiling server to obtain the file to be compiled from the distributed file storage system according to the compiling task for incremental compiling of the code;
    其中,所述多个编译服务器集群为不同平台的服务器集群,所述编译服务器集群共享所述分布式文件存储系统。Wherein, the multiple compiling server clusters are server clusters of different platforms, and the compiling server clusters share the distributed file storage system.
  2. 根据权利要求1所述的终端代码增量编译方法,其中,所述根据所述编译任务,在多个服务器集群中确定与所述编译任务匹配的目标服务器,包括:The terminal code incremental compilation method according to claim 1, wherein, according to the compilation task, determining a target server matching the compilation task in a plurality of server clusters includes:
    根据编译任务携带的资源标签,获取满足资源标签需求的目标服务器。According to the resource tag carried by the compilation task, obtain the target server that meets the resource tag requirement.
  3. 根据权利要求1所述的终端代码增量编译方法,其中,所述分布式文件存储系统中的第一类文件在合并为第二类文件后进行传输;第一类文件为容量小于第一预设值的文件,第二类文件为容量达到第二预设值的文件。The terminal code incremental compilation method according to claim 1, wherein the files of the first type in the distributed file storage system are transferred after being merged into files of the second type; The second type of file is a file whose capacity reaches the second preset value.
  4. 根据权利要求1至3中任一项所述的终端代码增量编译方法,其中,所述分布式文件存储系统中包括堆叠文件系统,所述堆叠文件系统的代码基础文件和编译过程文件分离。The terminal code incremental compilation method according to any one of claims 1 to 3, wherein the distributed file storage system includes a stacked file system, and the code base file and the compilation process file of the stacked file system are separated.
  5. 根据权利要求4所述的终端代码增量编译方法,其中,所述分布式文件存储系统的编译过程文件在增量编译完成后被删除。The terminal code incremental compilation method according to claim 4, wherein the compilation process files of the distributed file storage system are deleted after the incremental compilation is completed.
  6. 根据权利要求1至3中任一项所述的终端代码增量编译方法,其中,所述待编译文件在目标编译服务器中的容器中进行增量编译,所述容器的编译环境与所述待编译文件配置的编译环境一致。The terminal code incremental compilation method according to any one of claims 1 to 3, wherein the file to be compiled is incrementally compiled in a container in the target compilation server, and the compilation environment of the container is the same as that of the to-be-compiled file. The compilation environment of the compilation file configuration is consistent.
  7. 一种终端代码增量编译系统,其中,所述终端代码增量编译系统包括:分布式资源调度服务器、编译服务器集群、分布式文件存储系统;A terminal code incremental compilation system, wherein the terminal code incremental compilation system includes: a distributed resource scheduling server, a compilation server cluster, and a distributed file storage system;
    所述分布式资源调度服务器用于通过前端配置界面,获取编译任务,根据所述编译任务,在多个编译服务器集群中确定与所述编译任务匹配的目标编译服务器,并将所述编译任务发送至所述匹配的目标编译服务器;The distributed resource scheduling server is used to obtain the compilation task through the front-end configuration interface, determine the target compilation server matching the compilation task in multiple compilation server clusters according to the compilation task, and send the compilation task to to said matching target compilation server;
    所述编译服务器集群中的目标编译服务器用于根据所述编译任务从分布式文件存储系统中获取待编译文件进行代码的增量编译;The target compilation server in the compilation server cluster is used to obtain the file to be compiled from the distributed file storage system according to the compilation task to perform incremental compilation of the code;
    所述分布式文件存储系统用于将所述待编译文件传输至所述目标服务器;其中,所述编译服务器集群共享所述分布式文件存储系统;所述多个编译服务器集群为不同平台的服务器集群。The distributed file storage system is used to transmit the file to be compiled to the target server; wherein, the compilation server cluster shares the distributed file storage system; the multiple compilation server clusters are servers of different platforms cluster.
  8. 一种终端代码增量编译装置,包括:A terminal code incremental compilation device, comprising:
    配置模块,用于通过前端配置界面,获取编译任务;The configuration module is used to obtain compilation tasks through the front-end configuration interface;
    分配模块,根据所述编译任务,在多个编译服务器集群中确定与所述编译任务匹配的目标编译服务器;An allocation module, according to the compilation task, determines a target compilation server that matches the compilation task in multiple compilation server clusters;
    调度模块,将所述编译任务发送至所述匹配的目标编译服务器,供所述目标编译服务器根据所述编译任务从分布式文件存储系统中获取待编译文件进行代码的增量编译;其中,所述多个编译服务器集群为不同平台的服务器集群,所述编译服务器集群共享所述分布式文件存储系统。A dispatching module that sends the compiling task to the matching target compiling server, so that the target compiling server can obtain the file to be compiled from the distributed file storage system according to the compiling task to perform incremental compiling of the code; wherein, The multiple compiling server clusters are server clusters of different platforms, and the compiling server clusters share the distributed file storage system.
  9. 一种服务器,包括:A server comprising:
    至少一个处理器;以及,at least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至6中任一项所述的终端代码增量编译方法。The memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, so that the at least one processor can perform the operation described in any one of claims 1 to 6 The terminal code incremental compilation method described above.
  10. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1至6中任一项所述的终端代码增量编译方法。A computer-readable storage medium storing a computer program, wherein, when the computer program is executed by a processor, the terminal code incremental compilation method according to any one of claims 1 to 6 is realized.
PCT/CN2022/110947 2021-09-30 2022-08-08 Terminal code incremental compilation method, system, apparatus, server, and storage medium WO2023051034A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111162661.0 2021-09-30
CN202111162661.0A CN115878121A (en) 2021-09-30 2021-09-30 Terminal code increment compiling method, system, device, server and storage medium

Publications (1)

Publication Number Publication Date
WO2023051034A1 true WO2023051034A1 (en) 2023-04-06

Family

ID=85756717

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/110947 WO2023051034A1 (en) 2021-09-30 2022-08-08 Terminal code incremental compilation method, system, apparatus, server, and storage medium

Country Status (2)

Country Link
CN (1) CN115878121A (en)
WO (1) WO2023051034A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991381A (en) * 2023-09-26 2023-11-03 统信软件技术有限公司 Application cross compiling method and device, computing equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101582041A (en) * 2009-05-25 2009-11-18 中山大学 Distributed compilation method and system based on web
CN106095523A (en) * 2016-06-03 2016-11-09 北京奇虎科技有限公司 A kind of method and system realizing Android compiling isolation
CN106095522A (en) * 2016-06-03 2016-11-09 北京奇虎科技有限公司 A kind of method realizing distributed compilation and distributed compilation system
US20170123773A1 (en) * 2015-11-04 2017-05-04 International Business Machines Corporation Optimized compilation using an auto-tuned compiler as a service
US20200104106A1 (en) * 2018-09-30 2020-04-02 Shanghai Denglin Technologies Co., Ltd Joint compilation method and system for heterogeneous hardware architecture
CN111796831A (en) * 2020-06-24 2020-10-20 苏州大学 Compiling method and device for multi-chip compatibility
CN112269580A (en) * 2020-11-18 2021-01-26 深圳市欢太科技有限公司 Incremental compilation control method and device, storage medium and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101582041A (en) * 2009-05-25 2009-11-18 中山大学 Distributed compilation method and system based on web
US20170123773A1 (en) * 2015-11-04 2017-05-04 International Business Machines Corporation Optimized compilation using an auto-tuned compiler as a service
CN106095523A (en) * 2016-06-03 2016-11-09 北京奇虎科技有限公司 A kind of method and system realizing Android compiling isolation
CN106095522A (en) * 2016-06-03 2016-11-09 北京奇虎科技有限公司 A kind of method realizing distributed compilation and distributed compilation system
US20200104106A1 (en) * 2018-09-30 2020-04-02 Shanghai Denglin Technologies Co., Ltd Joint compilation method and system for heterogeneous hardware architecture
CN111796831A (en) * 2020-06-24 2020-10-20 苏州大学 Compiling method and device for multi-chip compatibility
CN112269580A (en) * 2020-11-18 2021-01-26 深圳市欢太科技有限公司 Incremental compilation control method and device, storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991381A (en) * 2023-09-26 2023-11-03 统信软件技术有限公司 Application cross compiling method and device, computing equipment and storage medium
CN116991381B (en) * 2023-09-26 2023-12-29 统信软件技术有限公司 Application cross compiling method and device, computing equipment and storage medium

Also Published As

Publication number Publication date
CN115878121A (en) 2023-03-31

Similar Documents

Publication Publication Date Title
US9851989B2 (en) Methods and apparatus to manage virtual machines
RU2429529C2 (en) Dynamic configuration, allocation and deployment of computer systems
US5287453A (en) Fast remote file access facility for distributing file access requests in a closely coupled computer system
US20090006062A1 (en) Progressively implementing declarative models in distributed systems
US7926070B2 (en) Performing requested commands for model-based applications
EP0747832A2 (en) Customer information control system and method in a loosely coupled parallel processing environment
US20060070063A1 (en) Application sets install method for dispersion server
JPH0944342A (en) Computer network system and version number managing method for its operating system
CN115048205B (en) ETL scheduling platform, deployment method thereof and computer-readable storage medium
WO2023051034A1 (en) Terminal code incremental compilation method, system, apparatus, server, and storage medium
CN116244229A (en) Access method and device of hardware controller, storage medium and electronic equipment
JP4500090B2 (en) Information management system and information management method
CN100489858C (en) Method and system for collecting inventory information in data processing system
CN112559138B (en) Resource scheduling system and method
CN102790788B (en) Grid resource management system
CN115357198B (en) Mounting method and device of storage volume, storage medium and electronic equipment
CN115102999B (en) DevOps system, service providing method, storage medium and electronic device
CN114090201A (en) Resource scheduling method, device, equipment and storage medium
CN113672334A (en) Container management method and device
CN112769954A (en) Method and system for automatically storing and routing WEB program
CN107493316B (en) Application operation management method, server and computer readable storage medium
CN108804236B (en) AIDL file sharing method and system
US20110023018A1 (en) Software platform and method of managing application individuals in the software platform
CN113687915B (en) Container running method, device, equipment and storage medium
CN113438206B (en) Distributed event-driven Internet of things runtime system, method, terminal and medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22874430

Country of ref document: EP

Kind code of ref document: A1