mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	[3.9] Fail the CI if an optional module fails to compile (GH-27466). (GH-27482)
(cherry picked from commit 7cad0bee80)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
			
			
This commit is contained in:
		
							parent
							
								
									168879e366
								
							
						
					
					
						commit
						3a806b1f05
					
				
					 3 changed files with 7 additions and 0 deletions
				
			
		
							
								
								
									
										3
									
								
								.github/workflows/build.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/build.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -133,6 +133,8 @@ jobs: | ||||||
|     runs-on: macos-latest |     runs-on: macos-latest | ||||||
|     needs: check_source |     needs: check_source | ||||||
|     if: needs.check_source.outputs.run_tests == 'true' |     if: needs.check_source.outputs.run_tests == 'true' | ||||||
|  |     env: | ||||||
|  |       PYTHONSTRICTEXTENSIONBUILD: 1 | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v2 |     - uses: actions/checkout@v2 | ||||||
|     - name: Configure CPython |     - name: Configure CPython | ||||||
|  | @ -151,6 +153,7 @@ jobs: | ||||||
|     if: needs.check_source.outputs.run_tests == 'true' |     if: needs.check_source.outputs.run_tests == 'true' | ||||||
|     env: |     env: | ||||||
|       OPENSSL_VER: 1.1.1k |       OPENSSL_VER: 1.1.1k | ||||||
|  |       PYTHONSTRICTEXTENSIONBUILD: 1 | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v2 |     - uses: actions/checkout@v2 | ||||||
|     - name: Install Dependencies |     - name: Install Dependencies | ||||||
|  |  | ||||||
|  | @ -18,6 +18,7 @@ env: | ||||||
|     # Set rpath with env var instead of -Wl,-rpath linker flag |     # Set rpath with env var instead of -Wl,-rpath linker flag | ||||||
|     # OpenSSL ignores LDFLAGS when linking bin/openssl |     # OpenSSL ignores LDFLAGS when linking bin/openssl | ||||||
|     - LD_RUN_PATH="${OPENSSL_DIR}/lib" |     - LD_RUN_PATH="${OPENSSL_DIR}/lib" | ||||||
|  |     - PYTHONSTRICTEXTENSIONBUILD=1 | ||||||
| 
 | 
 | ||||||
| branches: | branches: | ||||||
|   only: |   only: | ||||||
|  |  | ||||||
							
								
								
									
										3
									
								
								setup.py
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								setup.py
									
										
									
									
									
								
							|  | @ -540,6 +540,9 @@ def print_three_column(lst): | ||||||
|                   "APIs, https://github.com/libressl-portable/portable/issues/381") |                   "APIs, https://github.com/libressl-portable/portable/issues/381") | ||||||
|             print() |             print() | ||||||
| 
 | 
 | ||||||
|  |         if os.environ.get("PYTHONSTRICTEXTENSIONBUILD") and (self.failed or self.failed_on_import): | ||||||
|  |             raise RuntimeError("Failed to build some stdlib modules") | ||||||
|  | 
 | ||||||
|     def build_extension(self, ext): |     def build_extension(self, ext): | ||||||
| 
 | 
 | ||||||
|         if ext.name == '_ctypes': |         if ext.name == '_ctypes': | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Pablo Galindo Salgado
						Pablo Galindo Salgado