extends python package list to provide cmake and simplifies Jenkins
This commit is contained in:
		
							
								
								
									
										13
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							@@ -29,17 +29,11 @@ void checkout_project() {
 | 
				
			|||||||
    ])
 | 
					    ])
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void setup_conan() {
 | 
					void build_n_test_project() {
 | 
				
			||||||
    sh'''
 | 
					    sh'''
 | 
				
			||||||
 		python3 -mvenv .venv
 | 
					 		python3 -mvenv .venv
 | 
				
			||||||
		. .venv/bin/activate
 | 
							. .venv/bin/activate
 | 
				
			||||||
		pip3 install -r requirements.txt
 | 
							pip3 install -r requirements.txt
 | 
				
			||||||
    '''
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void build_n_test_project() {
 | 
					 | 
				
			||||||
    sh'''
 | 
					 | 
				
			||||||
		. .venv/bin/activate
 | 
					 | 
				
			||||||
        cmake -S . -B build --preset Release
 | 
					        cmake -S . -B build --preset Release
 | 
				
			||||||
        cmake --build build -j12
 | 
					        cmake --build build -j12
 | 
				
			||||||
        cmake --build build --target test
 | 
					        cmake --build build --target test
 | 
				
			||||||
@@ -61,7 +55,6 @@ pipeline {
 | 
				
			|||||||
                    agent {docker { image 'ubuntu-22.04' } }
 | 
					                    agent {docker { image 'ubuntu-22.04' } }
 | 
				
			||||||
                    stages {
 | 
					                    stages {
 | 
				
			||||||
                        stage('Checkout') { steps { checkout_project() }}
 | 
					                        stage('Checkout') { steps { checkout_project() }}
 | 
				
			||||||
                        stage('Setup') { steps { setup_conan() }}
 | 
					 | 
				
			||||||
                        stage('Build & test') { steps { build_n_test_project() }}
 | 
					                        stage('Build & test') { steps { build_n_test_project() }}
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
@@ -69,7 +62,6 @@ pipeline {
 | 
				
			|||||||
                    agent {docker { image 'ubuntu-20.04' } }
 | 
					                    agent {docker { image 'ubuntu-20.04' } }
 | 
				
			||||||
                    stages {
 | 
					                    stages {
 | 
				
			||||||
                        stage('Checkout') { steps { checkout_project() }}
 | 
					                        stage('Checkout') { steps { checkout_project() }}
 | 
				
			||||||
                        stage('Setup') { steps { setup_conan() }}
 | 
					 | 
				
			||||||
                        stage('Build & test') { steps { build_n_test_project() }}
 | 
					                        stage('Build & test') { steps { build_n_test_project() }}
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
@@ -77,7 +69,6 @@ pipeline {
 | 
				
			|||||||
                    agent {docker { image 'centos7' } }
 | 
					                    agent {docker { image 'centos7' } }
 | 
				
			||||||
                    stages {
 | 
					                    stages {
 | 
				
			||||||
                        stage('Checkout') { steps { checkout_project() }}
 | 
					                        stage('Checkout') { steps { checkout_project() }}
 | 
				
			||||||
                        stage('Setup') { steps { setup_conan() }}
 | 
					 | 
				
			||||||
                        stage('Build & test') { steps { build_n_test_project() }}
 | 
					                        stage('Build & test') { steps { build_n_test_project() }}
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
@@ -85,7 +76,6 @@ pipeline {
 | 
				
			|||||||
                    agent {docker { image 'rockylinux8' } }
 | 
					                    agent {docker { image 'rockylinux8' } }
 | 
				
			||||||
                    stages {
 | 
					                    stages {
 | 
				
			||||||
                        stage('Checkout') { steps { checkout_project() }}
 | 
					                        stage('Checkout') { steps { checkout_project() }}
 | 
				
			||||||
                        stage('Setup') { steps { setup_conan() }}
 | 
					 | 
				
			||||||
                        stage('Build & test') { steps { build_n_test_project() }}
 | 
					                        stage('Build & test') { steps { build_n_test_project() }}
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
@@ -94,7 +84,6 @@ pipeline {
 | 
				
			|||||||
                    agent {docker { image 'ubuntu-riscv' } }
 | 
					                    agent {docker { image 'ubuntu-riscv' } }
 | 
				
			||||||
                    stages {
 | 
					                    stages {
 | 
				
			||||||
                        stage('Checkout') { steps { checkout_project() }}
 | 
					                        stage('Checkout') { steps { checkout_project() }}
 | 
				
			||||||
                        stage('Setup') { steps { setup_conan() }}
 | 
					 | 
				
			||||||
                        stage('Build & check format') { steps { 
 | 
					                        stage('Build & check format') { steps { 
 | 
				
			||||||
						 	sh'''
 | 
											 	sh'''
 | 
				
			||||||
						        cmake -S . -B build --preset Release
 | 
											        cmake -S . -B build --preset Release
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1 +1,2 @@
 | 
				
			|||||||
conan>=2.0
 | 
					conan>=2.0
 | 
				
			||||||
 | 
					cmake
 | 
				
			||||||
		Reference in New Issue
	
	Block a user