|
| 1 | +# Azure RTOS ThreadX CI/CD system |
| 2 | + |
| 3 | +**The old Azure RTOS ThreadX CI/CD script and README are preserved with the .old extension** |
| 4 | + |
| 5 | +This directory contains a collection of files to execute test for continuos integration and continuous delivery of Azure RTOS ThreadX. |
| 6 | + |
| 7 | +This directory contains documentation, scripts and auxiliary files (expected test results, etc). |
| 8 | + |
| 9 | +The Azure RTOS ThreadX CI/CD system can be used in various scenarios: |
| 10 | +* Setting up the environment for a toolchain |
| 11 | +* Cleaning up the local repository |
| 12 | +* Building locally or on the pipeline |
| 13 | +* Smoke testing examples (on the native IDE) |
| 14 | +* Testing an example on a generic architecture simulator (like ARM FVP) |
| 15 | +* Running the certification test suite on a port |
| 16 | +* Testing locally during development |
| 17 | +* Testing automatically on the DevOps pipeline |
| 18 | +* Testing ports |
| 19 | +* Testing examples |
| 20 | +* Testing one or more ports |
| 21 | +* Verifying the ports build |
| 22 | +* Verifying that examples one or more ports during development |
| 23 | + |
| 24 | +There are several operations that can be performed by the CI/CD system: |
| 25 | +* CheckCompliance: perform compliance checks (only debug configurations, valid comments, ...) |
| 26 | +* StartCLI: start a CLI environment. |
| 27 | +* RealClean: remove all generated files. |
| 28 | +* Clean: remove all build generated files. |
| 29 | +* Build: compile examples using using the toolchain IDE, project, workspace, etc. |
| 30 | +* Test: smoke test examples with the toolchain simulator. |
| 31 | +* PlatformTest: test examples using the platform simulator, like the ARM FVP platform. |
| 32 | +* CertificationTest: test examples using the certification test suite. |
| 33 | +* HardwareTest: test examples using attached hardware. |
| 34 | + |
| 35 | +## azrtos_cicd.ps1 |
| 36 | +This is the main entry point for Azure RTOS ThreadX CI/CD operations. |
| 37 | +To get detailed usage information use the PowerShell Get-Help command passing this script as a parameter. |
| 38 | +This file outputs a summary to the screen and detailed log file with all output to files located in the default log directory or a directory specified in the script command line. |
| 39 | + |
| 40 | +## azrtos_cicd.csv |
| 41 | +This is the default database of ports, examples and corresponding data and scripts. The database is a CSV file that can be modified or updated by the user. Other databases can be specified on the command line when calling the script. |
| 42 | + |
| 43 | +## -StartCLI |
| 44 | +This option will open a CLI with the environment appropriately set for it. It will have the command aliases "realclean", "clean", "build" and "test" set to the corresponding scripts. Useful for developing and debugging. |
| 45 | + |
| 46 | +## Examples: |
| 47 | + |
| 48 | +These examples assume the PowerShell script is called from the Windows Command Interpreter. For calling the script from the PowerShell prompt, remove the leading `pwsh -Command`. |
| 49 | + |
| 50 | +`pwsh -Command Get-Help .\azrtos_cicd.ps1` |
| 51 | +Show the help embedded in the script. |
| 52 | + |
| 53 | +`pwsh -Command .\azrtos_cicd.ps1 -clean` |
| 54 | +This cleans all examples in the default database. |
| 55 | + |
| 56 | +`pwsh -Command .\azrtos_cicd.ps1 -build` |
| 57 | +This builds all examples in the default database. |
| 58 | + |
| 59 | +`pwsh -Command .\azrtos_cicd.ps1 -test` |
| 60 | +This runs the bassic tests on all examples in the default database. |
| 61 | + |
| 62 | +`pwsh -Command .\azrtos_cicd.ps1 -clean -build -test` |
| 63 | +This first cleans, then builds and finally runs tests on all examples in the default database. |
| 64 | + |
| 65 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchName 'Modules' -build` |
| 66 | +This builds all ThreadX Modules examples. |
| 67 | + |
| 68 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchName 'Modules','IAR' -build` |
| 69 | +This builds all examples in the default database that have names matching the string 'Modules' and 'IAR'. |
| 70 | + |
| 71 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchName 'Cortex M4','ARM compiler v6' -StartCli` |
| 72 | +This opens a CLI with set environment for all examples in the default database that have names matching the 'Cortex M4' and 'ARM compiler v6'. |
| 73 | + |
| 74 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','ARM compiler v6','Cortex M' -clean` |
| 75 | +This cleans all examples matching all the keywords; these are ThreadX (not ThreadX modules) Cortex M (0/3/4/7/23/33/...) for ARM compiler v6. |
| 76 | + |
| 77 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','ARM compiler v6','Cortex M' -build` |
| 78 | +Like the example above, but it builds the matching examples. |
| 79 | + |
| 80 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','Cortex M7' -StartCLI` |
| 81 | +Start CLI environments for all ThreadX for Cortex M7 examples (IAR, ARM compiler v5, ARM compiler v6, GHS, ...). |
| 82 | +From these you can use the commands 'realclean','clean','build','test' to call these operations and see the output on the console. |
| 83 | + |
| 84 | +Here is a list of commonly used commands that you can directly cut/paste into your command line: |
| 85 | +`pwsh -Command Get-Help .\azrtos_cicd.ps1` |
| 86 | +`pwsh -Command .\azrtos_cicd.ps1 -clean` |
| 87 | +`pwsh -Command .\azrtos_cicd.ps1 -build` |
| 88 | +`pwsh -Command .\azrtos_cicd.ps1 -test` |
| 89 | +`pwsh -Command .\azrtos_cicd.ps1 -clean -build -test` |
| 90 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','ARM compiler v6','Cortex M' -clean` |
| 91 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','IAR','Cortex M' -clean` |
| 92 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','GCC','Cortex M' -clean` |
| 93 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','ARM compiler v6','Cortex M' -build` |
| 94 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','IAR','Cortex M' -build` |
| 95 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','GCC','Cortex M' -build` |
| 96 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TXM','ARM compiler v6','Cortex M' -clean` |
| 97 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TXM','IAR','Cortex M' -clean` |
| 98 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TXM','GCC','Cortex M' -clean` |
| 99 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TXM','ARM compiler v6','Cortex M' -build` |
| 100 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TXM','IAR','Cortex M' -build` |
| 101 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TXM','GCC','Cortex M' -build` |
| 102 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','ARM compiler v6','SMP' -clean` |
| 103 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','IAR','SMP' -clean` |
| 104 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','GCC','SMP' -clean` |
| 105 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','ARM compiler v6','SMP' -build` |
| 106 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','IAR','SMP' -build` |
| 107 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','GCC','SMP' -build` |
| 108 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','ARM compiler v6','ARMv8-A' -build` |
| 109 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','GCC','ARMv8-A' -build` |
| 110 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','ARM compiler v6','Cortex-A35' -clean` |
| 111 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','GCC','Cortex-A35' -clean` |
| 112 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','ARM compiler v6','Cortex-A35' -build` |
| 113 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','GCC','Cortex-A35' -build` |
| 114 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','ARM compiler v6','Cortex-A35' -test` |
| 115 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'TX ','GCC','Cortex-A35' -test` |
| 116 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'ARM compiler v6','Cortex-A35' -clean -build -test` |
| 117 | +`pwsh -Command .\azrtos_cicd.ps1 -MatchKeywords 'GCC','Cortex-A35' -clean -build -test` |
| 118 | + |
| 119 | +For more examples look at the help embedded in the script. |
0 commit comments