mirror of
				https://github.com/isar/libmdbx.git
				synced 2025-11-01 03:48:57 +08:00 
			
		
		
		
	mdbx-ci: build both dll and static library by MinGW for testing.
Related to https://github.com/erthink/libmdbx/issues/196
This commit is contained in:
		
							
								
								
									
										58
									
								
								.github/workflows/MinGW.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										58
									
								
								.github/workflows/MinGW.yml
									
									
									
									
										vendored
									
									
								
							| @@ -3,8 +3,8 @@ name: MinGW | ||||
| on: | ||||
|   pull_request: | ||||
|   push: | ||||
|     branches-ignore: | ||||
|     - coverity_scan | ||||
|     branches: | ||||
|     - mingw | ||||
|     paths-ignore: | ||||
|     - '.circleci/**' | ||||
|     - '.github/actions/spelling/**' | ||||
| @@ -23,25 +23,43 @@ on: | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       matrix: | ||||
|         os: [windows-latest] | ||||
|     runs-on: [windows-latest] | ||||
|     steps: | ||||
|     - uses: actions/checkout@v2 | ||||
|     - name: fetch tags | ||||
|       run: git fetch --unshallow --tags --prune --force | ||||
|     - name: configure | ||||
|       run: cmake  -G "MinGW Makefiles" . | ||||
|     - name: build | ||||
|       run: cmake --build . | ||||
| #    - name: test | ||||
| #      shell: pwsh | ||||
| #      run: | | ||||
| #        & mdbx_test.exe --progress --console=no --pathname=test.db --dont-cleanup-after basic > test.log | ||||
| #        Get-Content test.log | Select-Object -last 42 | ||||
| #        if ($LastExitCode -ne 0) { | ||||
| #            throw "Exec: $ErrorMessage" | ||||
| #        } else { | ||||
| #            & mdbx_chk.exe -nvv test.db | Tee-Object -file chk.log | Select-Object -last 42 | ||||
| #        } | ||||
|     - name: update mingw64 | ||||
|       # wanna version >= 10.2 | ||||
|       run: choco upgrade mingw -y --no-progress | ||||
|     - name: configure-dll | ||||
|       run: mkdir build-dll && cd build-dll && cmake  -G "MinGW Makefiles" -DMDBX_BUILD_SHARED_LIBRARY:BOOL=ON -DMDBX_INSTALL_STATIC:BOOL=OFF .. | ||||
|     - name: build-dll | ||||
|       run: cd build-dll && cmake --build . | ||||
|     - name: test-dll | ||||
|       shell: pwsh | ||||
|       run: | | ||||
|         cd build-dll | ||||
|         ls | ||||
|         ./mdbx_test --progress --console=no --pathname=test.db --dont-cleanup-after basic > test.log | ||||
|         Get-Content test.log | Select-Object -last 42 | ||||
|         if ($LastExitCode -ne 0) { | ||||
|             throw "Exec: $ErrorMessage" | ||||
|         } else { | ||||
|             ./mdbx_chk -nvv test.db | Tee-Object -file chk.log | Select-Object -last 42 | ||||
|         } | ||||
|     - name: configure-static | ||||
|       run: mkdir build-static && cd build-static && cmake  -G "MinGW Makefiles" -DMDBX_BUILD_SHARED_LIBRARY:BOOL=OFF -DMDBX_INSTALL_STATIC:BOOL=ON .. | ||||
|     - name: build-static | ||||
|       run: cd build-static && cmake --build . | ||||
|     - name: test-static | ||||
|       shell: pwsh | ||||
|       run: | | ||||
|         cd build-static | ||||
|         ls | ||||
|         ./mdbx_test --progress --console=no --pathname=test.db --dont-cleanup-after basic > test.log | ||||
|         Get-Content test.log | Select-Object -last 42 | ||||
|         if ($LastExitCode -ne 0) { | ||||
|             throw "Exec: $ErrorMessage" | ||||
|         } else { | ||||
|             ./mdbx_chk -nvv test.db | Tee-Object -file chk.log | Select-Object -last 42 | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user