Skip to content

Commit

Permalink
mdbx-ci: fix CI for python bindings (draft).
Browse files Browse the repository at this point in the history
  • Loading branch information
erthink committed Jun 26, 2021
1 parent e378147 commit 2aca84b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
freebsd_instance:
image_family: freebsd-12-1-snap
image_family: freebsd-12-2

task:
install_script: pkg install -y gmake bash git
script: git fetch --tags --force && gmake check
install_script: pkg update && pkg install -y gmake bash git python3 && python3 -m pip install --upgrade setuptools wheel build pytest
script: git fetch --tags --force && gmake check && gmake python-all
14 changes: 7 additions & 7 deletions .github/workflows/MinGW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
./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"
throw "Exec: $ErrorMessage"
} else {
./mdbx_chk -nvv test.db | Tee-Object -file chk.log | Select-Object -last 42
./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 -DMDBX_PYTHON_BINDINGS:BOOL=ON ..
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
Expand All @@ -59,11 +59,11 @@ jobs:
./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"
throw "Exec: $ErrorMessage"
} else {
./mdbx_chk -nvv test.db | Tee-Object -file chk.log | Select-Object -last 42
./mdbx_chk -nvv test.db | Tee-Object -file chk.log | Select-Object -last 42
}
- name: python-test
run: cmake --build . -DMDBX_PYTHON_BINDINGS:bool=true --target python-test
run: cmake --build . --target python-test
- name: python-wheel
run: cmake --build . -DMDBX_PYTHON_BINDINGS:bool=true --target python-wheel
run: cmake --build . --target python-wheel
25 changes: 15 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ environment:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
CMAKE_GENERATOR: Visual Studio 14 2015
TOOLSET: 140
MDBX_PYTHON_BINDINGS: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_GENERATOR: Visual Studio 16 2019
TOOLSET: 142
Expand All @@ -14,6 +15,7 @@ environment:
CMAKE_GENERATOR: Visual Studio 16 2019
TOOLSET: 142
MDBX_BUILD_SHARED_LIBRARY: ON
MDBX_PYTHON_BINDINGS: ON
MDBX_WITHOUT_MSVC_CRT: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_GENERATOR: Visual Studio 16 2019
Expand All @@ -24,10 +26,12 @@ environment:
CMAKE_GENERATOR: Visual Studio 16 2019
TOOLSET: 142
MDBX_BUILD_SHARED_LIBRARY: ON
MDBX_PYTHON_BINDINGS: ON
MDBX_WITHOUT_MSVC_CRT: OFF
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_GENERATOR: Visual Studio 15 2017
TOOLSET: 141
MDBX_PYTHON_BINDINGS: ON

branches:
except:
Expand Down Expand Up @@ -80,18 +84,16 @@ build_script:
if ($env:PLATFORM -eq "x64") {
$generator = "$generator Win64"
}
& cmake -G "$generator" -D CMAKE_CONFIGURATION_TYPES="Debug;Release;RelWithDebInfo" -D MDBX_WITHOUT_MSVC_CRT:BOOL=$env:MDBX_WITHOUT_MSVC_CRT -D MDBX_BUILD_SHARED_LIBRARY:BOOL=$env:MDBX_BUILD_SHARED_LIBRARY -D MDBX_PYTHON_BINDINGS:BOOL=ON ..
& cmake -G "$generator" -D CMAKE_CONFIGURATION_TYPES="Debug;Release;RelWithDebInfo" -D MDBX_WITHOUT_MSVC_CRT:BOOL=$env:MDBX_WITHOUT_MSVC_CRT -D MDBX_BUILD_SHARED_LIBRARY:BOOL=$env:MDBX_BUILD_SHARED_LIBRARY -D MDBX_PYTHON_BINDINGS:BOOL=$env:MDBX_PYTHON_BINDINGS ..
} else {
& cmake -G "$generator" -A $env:PLATFORM -D CMAKE_CONFIGURATION_TYPES="Debug;Release;RelWithDebInfo" -DMDBX_WITHOUT_MSVC_CRT:BOOL=$env:MDBX_WITHOUT_MSVC_CRT -D MDBX_BUILD_SHARED_LIBRARY:BOOL=$env:MDBX_BUILD_SHARED_LIBRARY -D MDBX_PYTHON_BINDINGS:BOOL=ON ..
& cmake -G "$generator" -A $env:PLATFORM -D CMAKE_CONFIGURATION_TYPES="Debug;Release;RelWithDebInfo" -DMDBX_WITHOUT_MSVC_CRT:BOOL=$env:MDBX_WITHOUT_MSVC_CRT -D MDBX_BUILD_SHARED_LIBRARY:BOOL=$env:MDBX_BUILD_SHARED_LIBRARY -D MDBX_PYTHON_BINDINGS:BOOL=$env:MDBX_PYTHON_BINDINGS ..
}
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
Write-Output "*******************************************************************************"
& cmake --build . --config $env:CONFIGURATION
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
if ($LastExitCode -eq 0) {
Write-Output "*******************************************************************************"
& cmake --build . --config $env:CONFIGURATION
if ($env:MDBX_PYTHON_BINDINGS -eq "ON") {
& cmake --build . --config $env:CONFIGURATION --target python-wheel
}
}
Write-Output "*******************************************************************************"
Expand All @@ -104,6 +106,9 @@ test_script:
throw "Exec: $ErrorMessage"
} else {
& ./$env:CONFIGURATION/mdbx_chk.exe -nvv test.db | Tee-Object -file chk.log | Select-Object -last 42
if ($env:MDBX_PYTHON_BINDINGS -eq "ON") {
& cmake --build . --config $env:CONFIGURATION --target python-test
}
}
}
Expand Down

0 comments on commit 2aca84b

Please sign in to comment.