Skip to content

Commit

Permalink
Configure Github Actions (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
avsej authored Mar 16, 2024
1 parent c706c62 commit e199b7f
Show file tree
Hide file tree
Showing 18 changed files with 1,214 additions and 2,122 deletions.
507 changes: 507 additions & 0 deletions .github/workflows/tests.yml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
*.core
*.dep
*.dep
*.ini
*.lo
*.loT
*.o
Expand Down Expand Up @@ -55,3 +54,6 @@ cmake-build*/
composer.lock
php_test_results_*.txt
results.xml
/src/cmake/pecl_package.cmake
/src/deps/cache
/package.xml
19 changes: 19 additions & 0 deletions 90-couchbase.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
extension=couchbase

;; Number of persistent connections (-1 means "no limit")
; couchbase.max_persistent=-1

;; Lifetime for persistent connection (-1 means "no limit")
; couchbase.persistent_timeout=-1

;; Logging level. Accepted values: fatal, error, warning, info, debug, trace
; couchbase.log_level=info

;; Whether to use php_error() for logging
; couchbase.log_php_log_err=true

;; Send logs to standard error stream
; couchbase.log_stderr=false

;; Write logs to given file (does not override couchbase.log_use_php_error)
; couchbase.log_path=
23 changes: 19 additions & 4 deletions Makefile.frag
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
$(phplibdir)/libcouchbase_php_wrapper.${SHLIB_SUFFIX_NAME}:
$(CMAKE) --build $(COUCHBASE_CMAKE_BUILD_DIRECTORY) --verbose
$(COUCHBASE_CMAKE_BUILD_DIRECTORY)/CMakeCache.txt: $(COUCHBASE_CMAKE_SOURCE_DIRECTORY)/CMakeLists.txt
$(CMAKE) \
-S $(COUCHBASE_CMAKE_SOURCE_DIRECTORY) \
-B $(COUCHBASE_CMAKE_BUILD_DIRECTORY) \
-DCMAKE_BUILD_TYPE=$(if $(COUCHBASE_CMAKE_BUILD_TYPE),$(COUCHBASE_CMAKE_BUILD_TYPE),RelWithDebInfo) \
-DCMAKE_C_COMPILER="$(CC)" \
-DCMAKE_CXX_COMPILER="$(CXX)" \
-DCMAKE_C_FLAGS="$(COMMON_FLAGS)" \
-DCMAKE_CXX_FLAGS="$(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)" \
-DCOUCHBASE_PHP_INCLUDES="$(INCLUDES)" \
-DCOUCHBASE_PHP_LIBDIR="$(phplibdir)"

.PHONY: build-wrapper
build-wrapper: $(phplibdir)/libcouchbase.${SHLIB_SUFFIX_NAME}
$(COUCHBASE_CMAKE_BUILD_DIRECTORY)/couchbase.$(SHLIB_DL_SUFFIX_NAME): $(COUCHBASE_CMAKE_BUILD_DIRECTORY)/CMakeCache.txt
$(CMAKE) \
--build $(COUCHBASE_CMAKE_BUILD_DIRECTORY) \
--verbose

cmake-build: $(COUCHBASE_CMAKE_BUILD_DIRECTORY)/couchbase.$(SHLIB_DL_SUFFIX_NAME)

.PHONY: cmake-build
7 changes: 1 addition & 6 deletions bin/build → bin/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ def run(*args)
end

PROJECT_ROOT = File.realpath(File.join(__dir__, '..'))
unless File.file?(File.join(PROJECT_ROOT, "src/deps/couchbase-cxx-client/third_party/asio/asio/include/asio.hpp"))
Dir.chdir(PROJECT_ROOT) do
run("git submodule update --init --recursive")
end
end

DEFAULT_PHP_PREFIX =
case RbConfig::CONFIG["target_os"]
Expand Down Expand Up @@ -93,7 +88,7 @@ def run(*args)
run("make V=1")
end

COUCHBASE_EXT = "#{PROJECT_ROOT}/modules/couchbase.#{RbConfig::CONFIG["DLEXT"]}"
COUCHBASE_EXT = "#{PROJECT_ROOT}/modules/couchbase.#{RbConfig::CONFIG["SOEXT"]}"
unless File.exist?(COUCHBASE_EXT)
alt_filename = "#{PROJECT_ROOT}/modules/couchbase.so"
if File.exist?(alt_filename)
Expand Down
File renamed without changes.
46 changes: 0 additions & 46 deletions bin/package

This file was deleted.

Loading

0 comments on commit e199b7f

Please # to comment.