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:
Leonid Yuriev 2021-05-11 17:18:38 +03:00
parent ebab75642e
commit 1d9f495c46

View File

@ -3,8 +3,8 @@ name: MinGW
on: on:
pull_request: pull_request:
push: push:
branches-ignore: branches:
- coverity_scan - mingw
paths-ignore: paths-ignore:
- '.circleci/**' - '.circleci/**'
- '.github/actions/spelling/**' - '.github/actions/spelling/**'
@ -23,25 +23,43 @@ on:
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: [windows-latest]
strategy:
matrix:
os: [windows-latest]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: fetch tags - name: fetch tags
run: git fetch --unshallow --tags --prune --force run: git fetch --unshallow --tags --prune --force
- name: configure - name: update mingw64
run: cmake -G "MinGW Makefiles" . # wanna version >= 10.2
- name: build run: choco upgrade mingw -y --no-progress
run: cmake --build . - name: configure-dll
# - name: test run: mkdir build-dll && cd build-dll && cmake -G "MinGW Makefiles" -DMDBX_BUILD_SHARED_LIBRARY:BOOL=ON -DMDBX_INSTALL_STATIC:BOOL=OFF ..
# shell: pwsh - name: build-dll
# run: | run: cd build-dll && cmake --build .
# & mdbx_test.exe --progress --console=no --pathname=test.db --dont-cleanup-after basic > test.log - name: test-dll
# Get-Content test.log | Select-Object -last 42 shell: pwsh
# if ($LastExitCode -ne 0) { run: |
# throw "Exec: $ErrorMessage" cd build-dll
# } else { ls
# & mdbx_chk.exe -nvv test.db | Tee-Object -file chk.log | Select-Object -last 42 ./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
}