From 1d9f495c461b39a9abf08e21670a033ea4edd4e6 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Tue, 11 May 2021 17:18:38 +0300 Subject: [PATCH] mdbx-ci: build both dll and static library by MinGW for testing. Related to https://github.com/erthink/libmdbx/issues/196 --- .github/workflows/MinGW.yml | 58 ++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/.github/workflows/MinGW.yml b/.github/workflows/MinGW.yml index 523421e0..f5a20c14 100644 --- a/.github/workflows/MinGW.yml +++ b/.github/workflows/MinGW.yml @@ -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 + }