An automated continuous integration system
By designing an automated continuous integration system, the integration efficiency problem caused by inconsistent historical information of submodule versions is solved, and automated integration and efficient and reliable continuous integration are achieved.
Patent Information
- Application Number
- CN202410648358.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-05-23
AI Technical Summary
In the version management scenario, the version history information of the submodule is inconsistent, which makes it difficult to specify the specific template version number or select the latest version number for integration during continuous integration. It is poor in efficiency and requires a lot of manual inspection.
Design an automated continuous integration system, by obtaining the version history information of the submodule at a preset time point, comparing the version number of the public library, determining the version number to be tested, and conducting simulation tests. If it passes, update the version history information of the main module.
It realizes automated integration, improves the efficiency and reliability of continuous integration, avoids compatibility problems caused by newer versions of the public library of the module, and reduces the need for manual inspections.
Smart Images

Figure CN118550894B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of version management, and particularly to an automated continuous integration system. Background Art
[0002] In the scenario of version management, the version history information of the main module needs to integrate the version history information of each sub-module. Since the development, verification, and management of each sub-module are independent, the version history information of each sub-module is not consistent. As a result, it is difficult to specify the specific template version number of a certain sub-module or select the latest module version number of the sub-module for integration during the integration process. Instead, it is necessary to integrate the version history information of the sub-module that meets the prior conditions into the version history information of the main module according to the association relationship between the common library version number of the sub-module and the common library version number of the main module.
[0003] Currently, the above work still needs to be manually inspected to achieve continuous integration. However, the method of manual inspection consumes a large amount of human resources, and the efficiency of continuous integration is poor. Therefore, how to improve the efficiency of continuous integration has become an urgent problem to be solved. Summary of the Invention
[0004] In view of the above technical problems, the technical solution adopted by the present invention is as follows:
[0005] An automated continuous integration system, the system includes: a main module A and its corresponding first version history information TA, a sub-module set B = {b 1 , b 2 , …, b m , …, b M}, and a database. Among them, the database includes a first version number set CA = {ca 1 , ca 2 , …, ca m , …, ca M} contained in TA and a second version number set DA = {da 1 , da 2 , …, da n , …, da N} contained in TA. b m is the m-th sub-module, m is an integer within the range of [1, M], M is the number of sub-modules in B, ca m is the first version number of the m-th sub-module integrated in A, da n is the second version number of the n-th common library corresponding to A, n is an integer within the range of [1, N], N is the number of common libraries. When the computer program is executed by the processor, the following steps are implemented:
[0006] S101, obtain b at a preset time pointm The second version history information Tb m , Tb m includes b m The third version number cb m and b m The fourth version number db corresponding to the nth common library mn .
[0007] S102. Compare cb m and ca m to obtain the first comparison result p m .
[0008] S103. Compare db mn and da n to obtain the second comparison result q n m .
[0009] S104. If the first comparison result p m is cb m ≥ ca m and for each value of n, the second comparison result q n m is all db mn ≤ da n , then use cb m as the version number e to be tested m .
[0010] S105. Perform a simulation test on b m corresponding to e m .
[0011] S106. If the simulation test passes, use e m to update ca in TA m .
[0012] Compared with the prior art, the present invention has obvious beneficial effects. By means of the above technical solutions, an automated continuous integration system provided by the present invention can achieve considerable technological progress and practicality, and has wide industrial utilization value. It has at least the following beneficial effects:
[0013] The present invention provides an automated continuous integration system, and the system includes: a main module A and its corresponding first version history information TA, a set of sub-modules B = {b 1 , b 2 , …, b m , …, b M}, and a database. Among them, the database includes a first version number set CA = {ca 1 , ca 2, …, ca m , …, ca M}, and the set of second version numbers DA included in TA = {da 1 , da 2 , …, da n , …, da N}, b m is the m-th sub-module, m is an integer within the range of [1, M], M is the number of sub-modules in B, ca m is the first version number of the m-th sub-module integrated in A, da n is the second version number of A corresponding to the n-th common library, n is an integer within the range of [1, N], N is the number of common libraries. When the computer program is executed by a processor, the following steps are implemented: obtaining the second version history information Tb m of b m , Tb m includes the third version number cb m of b m and the fourth version number db m corresponding to the n-th common library of b mn , comparing cb m with ca m to obtain the first comparison result p m , comparing db mn with da n to obtain the second comparison result q n m . If the first comparison result p m is cb m ≥ca m and for each value of n, the second comparison result q n m is all db mn ≤da n , then take cb m as the version number e m to be tested, perform a simulation test on b m corresponding to e m . If the simulation test passes, then use e m to update ca m in TA.
[0014] It can be seen that the version history information of the sub-module is obtained at a preset time point. According to the comparison result of the public library version numbers of the sub-modules under each public library and the public library version number of the main module, the version number of the sub-module to be tested is determined. After passing the test, the version number of the sub-module is integrated into the version history information of the main module, so as to achieve automatic integration. Moreover, continuous integration can be achieved by adjusting the preset time point. In addition, during the comparison process, the version number of the sub-module is integrated into the version history information of the main module only when the public library version numbers of the sub-modules under all public libraries are not greater than the public library version number of the main module, so as to avoid compatibility problems caused by the relatively new public library version of the sub-module, thereby improving the efficiency and reliability of continuous integration. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other accompanying drawings based on these drawings without creative efforts.
[0016] Figure 1 It is a schematic flowchart of a computer program executed by a processor in an automated continuous integration system provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, rather than all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0018] This embodiment provides an automated continuous integration system, and the system includes: a main module A and its corresponding first version history information TA, a sub-module set B = {b 1 , b 2 , …, b m , …, b M} and a database. Among them, the database includes a first version number set CA = {ca 1 , ca 2 , …, ca m , …, ca M} and a second version number set DA = {da 1 , da 2 , …, da n , …, da N} included in TA, b mis the m-th sub-module, where m is an integer within the range of [1, M], and M is the number of sub-modules in B, ca m is the first version number of the m-th sub-module integrated in A, da n is the second version number of the n-th common library corresponding to A, where n is an integer within the range of [1, N], and N is the number of common libraries. Refer to Figure 1 , which is a schematic flowchart of the process when the computer program in an automated continuous integration system provided by an embodiment of the present invention is executed by a processor. When the computer program is executed by the processor, the following steps are implemented:
[0019] S101, obtain the second version history information Tb of b m at a preset time point. Tb m includes the third version number cb of b m and the fourth version number db of the n-th common library corresponding to b m ; m and b m ; mn
[0020] S102, compare cb m and ca m to obtain the first comparison result p m ;
[0021] S103, compare db mn and da n to obtain the second comparison result q n m ;
[0022] S104, if the first comparison result p m is cb m ≥ca m and for each value of n, the second comparison result q n m is db mn ≤da n , then use cb m as the version number e to be tested m ;
[0023] S105, perform a simulation test on b corresponding to e m ; m
[0024] S106, if the simulation test passes, then update ca in TA with e m ; m
[0025] Among them, the main module A may refer to the top-level design module. The main module A is composed of a set of sub-modules B. The first version history information TA may include the module version numbers of each integrated sub-module, that is, the first version number, and the common library version numbers of the main module A corresponding to N common libraries respectively, that is, the second version number.
[0026] The preset time point may refer to the preset time point for version integration. The implementer can set multiple preset time points to achieve continuous integration. In this embodiment, in order to adapt to the time planning of manual development of each sub-module, the preset time point can be set to 2:00 am every day. The implementer can adjust the preset time point according to the actual situation, so that the computer program corresponding to this embodiment can be automatically executed by the processor and does not conflict with the manual development process of the sub-module.
[0027] The second version history information of the sub-module may include the module version number of the sub-module, that is, the third version number, and the common library version numbers of the sub-module corresponding to each common library respectively, that is, the fourth version number.
[0028] Specifically, in this embodiment, the version number of the newer version is greater than that of the older version. The integration of the third version number needs to meet two prior conditions. The first prior condition is that the first comparison result p m is cb m ≥ca m , indicating that the module version number of the sub-module is newer than the integrated module version number in its first version history information. Otherwise, it indicates that the module version number of the sub-module is older than the integrated module version number in its first version history information. On the basis of using the method of this embodiment for automatic continuous update, usually the module version number of the sub-module should be newer or the same as the integrated module version number in its first version history information. If the module version number of the sub-module is older than the integrated module version number in its first version history information, it indicates that there is a situation of manual integration, that is, the module version number of the sub-module is manually updated to the first version history information. Usually, the manual integration operation is generated to solve practical problems. Therefore, this embodiment defaults that the method of manual integration has the highest priority, that is, when the first comparison result p m is cb m <ca m at this time, cb m is not integrated, so that the automatic continuous integration system provided by this embodiment can allow manual integration operations.
[0029] The second prior condition is that for each value of n, the second comparison result q n m is all db mn ≤da nThat is, for any public library, the public library version number of the sub-module corresponding to the public library is less than or equal to the public library version number of the main module corresponding to the public library, thereby ensuring that the public library version used by the sub-module is not higher than the public library version used by the main module, avoiding compatibility issues caused by the newer public library version of the sub-module and improving the reliability of continuous integration.
[0030] After the above two prior conditions are met, cb m As the version number to be tested m Perform simulation verification and use e after verification m Update ca in TA m , thereby further ensuring the reliability of sub-module template version number integration.
[0031] In a specific embodiment, cb m For the b m The latest version number that has passed the test.
[0032] Among them, cb m For the b m The latest module version number that has passed self-testing in the submodule, or the lastgood version, is used instead of the latest module version number of the submodule, thereby improving the reliability of automated continuous integration.
[0033] In a specific embodiment, cb m and {db m1 , db m2 ,…,db mn ,…,db mN}There is a corresponding relationship.
[0034] The module version number of the submodule corresponds to the version number of each public library of the submodule.
[0035] In a specific implementation, the simulation test includes a smoke test and a feasibility test.
[0036] In a specific embodiment, when b m When the nth public library is not included, db mn Set as the first preset symbol, accordingly, when db mn When the first preset symbol is mn ≤da n .
[0037] In this embodiment, the first preset symbol may be set to “NaN”, and the implementer may adjust the setting of the first preset symbol according to actual conditions.
[0038] In a specific embodiment, when db mn >n When, the db mn is concatenated with the second preset symbol to obtain the first concatenation result r mn , and all the first concatenation results form a first information table, which is used to be sent to the maintenance personnel of the main module A to remind them to update each public library in A.
[0039] In this embodiment, the second preset symbol can be set to "*", when concatenating db mn with the second preset symbol, the second preset symbol is in the front and db mn is in the back for concatenation, then r mn is expressed as *db mn , in this embodiment, each second version number corresponding to the main module is also added to the first information table. Refer to Table 1, which is a schematic diagram of the first information table provided in this embodiment. Among them,
[0040] "*db 11 " represents db 11 >da 1 ,"*db mN " represents db mN >da N ,"*db Mn " represents db Mn >da n , those without the second preset symbol indicate that the public library version number of the corresponding sub-module is less than or equal to the public library version number of the main module. This first information table is used to be sent to the maintenance personnel of the main module A to remind them to update each public library in A. The maintenance personnel of the main module A can view the public library version numbers with the second preset symbol to determine the public library version numbers with lagging versions, and then determine whether to update in the follow-up. It should be noted that since the first information table is for the maintenance personnel of the main module A, all the first concatenation results form the first information table. In order to ensure the integrity of the information, the implementer can also add the public library version numbers of each sub-module where all the public library version numbers are not concatenated with the second preset symbol to the first information table.
[0041] Table 1
[0042]
[0043] In a specific implementation manner, when db mn ≤da n , the db mn is concatenated with the third preset symbol to obtain the second concatenation result s mn , and all the second concatenation results form a second information table, which is used to be sent to the maintenance personnel of each sub-module to remind them to update each public library in each sub-module.
[0044] In this embodiment, the third preset symbol can be set to ">", and when splicing db mn with the third preset symbol, the third preset symbol is placed in the front and db mn is placed in the back for splicing, then r mn is expressed as >db mn , in this embodiment, each second version number corresponding to the main module is also added to the second information table. Refer to Table 2, which is a schematic diagram of the second information table provided in this embodiment. Among them,
[0045] ">db 1n " means db 1n ≤da n , ">db mn " means db mn ≤da n , ">db MN " means db MN >da N , the second information table is used to be sent to the maintenance personnel of each sub-module to remind them to update each common library in each sub-module. The maintenance personnel of sub-module b m can view the common library version numbers carrying the third preset symbol to determine the common library version numbers with outdated versions, and then determine whether to update in the follow-up. It should be noted that since the second information table is for the maintenance personnel of each sub-module, the second information table is formed by all the second splicing results. In order to ensure the integrity of the information, the implementer can also add the common library version numbers of each sub-module where all the common library version numbers are not spliced with the third preset symbol to the second information table.
[0046] Table 2
[0047]
[0048] In a specific implementation manner, if cb m is determined to be e m and the simulation verification passes, a first reference sequence is formed by cb m , ca m and the fourth preset symbol. Otherwise, a second reference sequence is formed by cb m , ca m and the fifth preset symbol. The third information table is formed by all the first reference sequences and all the second reference sequences. The third information table is used to be sent to the maintenance personnel of the main module A and each sub-module to provide integration information.
[0049] In this embodiment, the fourth preset symbol can be set to "update", and the fifth preset symbol can be set to "-". Refer to Table 3, which is a schematic diagram of the third information table provided in this embodiment.
[0050] Table III
[0051]
[0052] In this embodiment, the version history information of the sub-module is obtained at a preset time point. According to the comparison result of the common library version numbers of the sub-modules under each common library and the common library version number of the main module, the version number of the sub-module to be tested is determined. After passing the test, the version number of the sub-module is integrated into the version history information of the main module, so as to achieve automated integration. Moreover, continuous integration can be achieved by adjusting the preset time point. In addition, during the comparison process, only when the common library version numbers of the sub-modules under all public libraries are not greater than the common library version number of the main module, the version number of the sub-module is integrated into the version history information of the main module, so as to avoid compatibility problems caused by the relatively new common library version of the sub-module, thereby improving the efficiency and reliability of continuous integration.
[0053] Although some specific embodiments of the present invention have been described in detail by way of examples, those skilled in the art should understand that the above examples are only for illustration and not for limiting the scope of the present invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. An automated continuous integration system, characterized in that: The system includes: a main module A and its corresponding first version history information TA, a submodule set B={b1, b2, ..., b m , …, b M } and a database, wherein the database includes a first version number set CA={ca1, ca2, ..., ca m ,…,ca M } and the second version number set DA={da1, da2, ..., da n ,…,da N }, b m is the mth submodule, m is an integer in the range [1, M], M is the number of submodules in B, ca m is the first version number of the mth submodule integrated in A, da n is the second version number of A corresponding to the nth public library, n is an integer in the range of [1, N], and N is the number of public libraries. When the computer program is executed by the processor, the following steps are implemented: S101, obtain b at a preset time point m The second version of the historical information Tb m , Tb m Including b m The third version number cb m and b m Corresponding to the fourth version number db of the nth public library mn ; S102, cb m and ca m Compare and get the first comparison result p m ; S103, db mn and da n Compare and get the second comparison result q n m ; S104: If the first comparison result p m For cb m ≥ca m And for each value of n, the second comparison result q n m Both are db mn ≤da n , then cb m As the version number to be tested m ; S105, for e m The corresponding b m Conduct simulation tests; S106, if the simulation test passes, use e m Update ca in TA m .
2. The automated continuous integration system according to claim 1, characterized in that: cb m For the b m The latest version number that has passed the test.
3. The automated continuous integration system according to claim 1, characterized in that: cb m and {db m1 , db m2 ,…,db mn ,…,db mN }There is a corresponding relationship.
4. The automated continuous integration system according to claim 1, characterized in that: The simulation test includes a smoke test and a feasibility test.
5. The automated continuous integration system according to claim 1, characterized in that: When b m When the nth public library is not included, db mn Set as the first preset symbol, accordingly, when db mn When the first preset symbol is mn ≤da n .
6. The automated continuous integration system according to claim 1, characterized in that: When db mn > n When db mn and the second preset symbol to obtain the first splicing result r mn , a first information table is formed by all the first splicing results, and the first information table is used to send to the maintenance personnel of the main module A to remind them to update each public library in A.
7. The automated continuous integration system according to claim 1, characterized in that: When db mn ≤da n When db mn Splice with the third preset symbol to obtain the second splicing result s mn A second information table is formed by all the second splicing results, and the second information table is used to send to the maintenance personnel of each submodule to remind them to update each public library in each submodule.
8. The automated continuous integration system according to claim 1, characterized in that: If cb m Determined as e m And the simulation verification is passed by cb m ,ca m and the fourth preset symbol form the first reference sequence, otherwise, cb m ,ca m And the fifth preset symbol form a second reference sequence, and all the first reference sequences and all the second reference sequences form a third information table, which is used to be sent to the maintenance personnel of the main module A and each submodule to provide integrated information.
Citation Information
Patent Citations
Database maintenance method and device, storage medium and electronic equipment
CN116048953A
Digital integrated circuit verification system for accelerating convergence of verification coverage rate
CN117993336A