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'''
 | 
			
		||||
 		python3 -mvenv .venv
 | 
			
		||||
		. .venv/bin/activate
 | 
			
		||||
		pip3 install -r requirements.txt
 | 
			
		||||
    '''
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void build_n_test_project() {
 | 
			
		||||
    sh'''
 | 
			
		||||
		. .venv/bin/activate
 | 
			
		||||
        cmake -S . -B build --preset Release
 | 
			
		||||
        cmake --build build -j12
 | 
			
		||||
        cmake --build build --target test
 | 
			
		||||
@@ -61,7 +55,6 @@ pipeline {
 | 
			
		||||
                    agent {docker { image 'ubuntu-22.04' } }
 | 
			
		||||
                    stages {
 | 
			
		||||
                        stage('Checkout') { steps { checkout_project() }}
 | 
			
		||||
                        stage('Setup') { steps { setup_conan() }}
 | 
			
		||||
                        stage('Build & test') { steps { build_n_test_project() }}
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
@@ -69,7 +62,6 @@ pipeline {
 | 
			
		||||
                    agent {docker { image 'ubuntu-20.04' } }
 | 
			
		||||
                    stages {
 | 
			
		||||
                        stage('Checkout') { steps { checkout_project() }}
 | 
			
		||||
                        stage('Setup') { steps { setup_conan() }}
 | 
			
		||||
                        stage('Build & test') { steps { build_n_test_project() }}
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
@@ -77,7 +69,6 @@ pipeline {
 | 
			
		||||
                    agent {docker { image 'centos7' } }
 | 
			
		||||
                    stages {
 | 
			
		||||
                        stage('Checkout') { steps { checkout_project() }}
 | 
			
		||||
                        stage('Setup') { steps { setup_conan() }}
 | 
			
		||||
                        stage('Build & test') { steps { build_n_test_project() }}
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
@@ -85,7 +76,6 @@ pipeline {
 | 
			
		||||
                    agent {docker { image 'rockylinux8' } }
 | 
			
		||||
                    stages {
 | 
			
		||||
                        stage('Checkout') { steps { checkout_project() }}
 | 
			
		||||
                        stage('Setup') { steps { setup_conan() }}
 | 
			
		||||
                        stage('Build & test') { steps { build_n_test_project() }}
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
@@ -94,7 +84,6 @@ pipeline {
 | 
			
		||||
                    agent {docker { image 'ubuntu-riscv' } }
 | 
			
		||||
                    stages {
 | 
			
		||||
                        stage('Checkout') { steps { checkout_project() }}
 | 
			
		||||
                        stage('Setup') { steps { setup_conan() }}
 | 
			
		||||
                        stage('Build & check format') { steps { 
 | 
			
		||||
						 	sh'''
 | 
			
		||||
						        cmake -S . -B build --preset Release
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +1,2 @@
 | 
			
		||||
conan>=2.0
 | 
			
		||||
cmake
 | 
			
		||||
		Reference in New Issue
	
	Block a user