You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2023/07/24 20:07:49 UTC
[couchdb] branch main updated: Build Nouveau on Windows (#4678)
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/main by this push:
new 1c9dbdb14 Build Nouveau on Windows (#4678)
1c9dbdb14 is described below
commit 1c9dbdb14bf6520abb715fb9d248783b15873245
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Mon Jul 24 22:07:44 2023 +0200
Build Nouveau on Windows (#4678)
---
Makefile.win | 50 ++++++++++++++++++++++++++++++++++++++++++++++++--
configure.ps1 | 7 ++++++-
nouveau/.gitattributes | 1 +
nouveau/.gitignore | 1 +
4 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/Makefile.win b/Makefile.win
index 2118508dc..4c8cb6f04 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -98,7 +98,7 @@ TEST_OPTS=-c startup_jitter=0 -c default_security=admin_local
.PHONY: all
# target: all - Build everything
-all: couch fauxton docs
+all: couch fauxton docs nouveau
.PHONY: help
@@ -140,9 +140,11 @@ fauxton: share\www
.PHONY: check
# target: check - Test everything
check: all
+ @$(MAKE) exunit
@$(MAKE) eunit
@$(MAKE) mango-test
@$(MAKE) elixir-suite
+ @$(MAKE) nouveau-test
ifdef apps
subdirs = $(apps)
@@ -270,6 +272,10 @@ elixir-source-checks: elixir-init
# target: build-report - Generate a build report
build-report:
@$(PYTHON) build-aux/show-test-results.py --suites=10 --tests=10 > test-results.log
+ cat .\dev\logs\node1.log || true
+ cat .\dev\logs\nouveau.log || true
+ cat .\tmp\couch.log || true
+ cat test-results.log || true
.PHONY: check-qs
# target: check-qs - Run query server tests (ruby and rspec required!)
@@ -383,6 +389,12 @@ else
endif
endif
+ifeq ($(with_nouveau), 1)
+ -@mkdir -p rel\couchdb\nouveau
+ @cp nouveau\build\libs\server-*-dist.jar rel\couchdb\nouveau
+ @cp nouveau\nouveau.yaml rel\couchdb\nouveau
+endif
+
@echo ... done
@echo .
@echo You can now copy the rel\couchdb directory anywhere on your system.
@@ -423,7 +435,9 @@ clean:
-@rmdir /s/q src\mango\.venv
-@del /f/q src\couch\priv\couch_js\config.h
-@del /f/q dev\boot_node.beam dev\pbkdf2.pyc log\crash.log
-
+ifeq ($(with_nouveau), 1)
+ @cd nouveau && .\gradlew clean
+endif
.PHONY: distclean
# target: distclean - Remove build and release artifacts
@@ -489,3 +503,35 @@ derived:
@echo "ON_TAG: $(ON_TAG)"
@echo "REL_TAG: $(REL_TAG)"
@echo "SUB_VSN: $(SUB_VSN)"
+
+
+################################################################################
+# Nouveau
+################################################################################
+
+.PHONY: nouveau
+# target: nouveau - Build nouveau
+nouveau:
+ifeq ($(with_nouveau), 1)
+ @cd nouveau && .\gradlew build -x test
+endif
+
+.PHONY: nouveau-test
+# target: nouveau-test - Run nouveau tests
+nouveau-test: nouveau-test-gradle nouveau-test-elixir
+
+.PHONY: nouveau-test-gradle
+nouveau-test-gradle: couch nouveau
+ifeq ($(with_nouveau), 1)
+ @cd nouveau && .\gradlew test
+endif
+
+.PHONY: nouveau-test-elixir
+nouveau-test-elixir: export MIX_ENV=integration
+nouveau-test-elixir: elixir-init devclean
+nouveau-test-elixir: couch nouveau
+ifeq ($(with_nouveau), 1)
+ @dev\run -n 1 -q -a adm:pass --with-nouveau \
+ --locald-config test/elixir/test/config/test-config.ini \
+ --no-eval 'mix test --trace --include test/elixir/test/config/nouveau.elixir'
+endif
diff --git a/configure.ps1 b/configure.ps1
index 576430e4e..ec0b650db 100644
--- a/configure.ps1
+++ b/configure.ps1
@@ -7,6 +7,7 @@
-DisableFauxton request build process skip building Fauxton (default false)
-DisableDocs request build process skip building documentation (default false)
+ -EnableNouveau enable the new experiemtal search module (default false)
-SkipDeps do not update Erlang dependencies (default false)
-CouchDBUser USER set the username to run as (defaults to current user)
-SpiderMonkeyVersion VSN select the version of SpiderMonkey to use (default 91)
@@ -43,6 +44,7 @@ Param(
[switch]$Test = $false,
[switch]$DisableFauxton = $false, # do not build Fauxton
[switch]$DisableDocs = $false, # do not build any documentation or manpages
+ [switch]$EnableNouveau = $false, # dont use new search module by default
[switch]$SkipDeps = $false, # do not update erlang dependencies
[switch]$DisableProper = $false, # a compilation pragma. proper is a kind of automated test suite
[switch]$EnableErlangMD5 = $false, # don't use Erlang for md5 hash operations by default
@@ -127,6 +129,7 @@ $InstallDir="$LibDir\couchdb"
$LogFile="$LogDir\couch.log"
$BuildFauxton = [int](-not $DisableFauxton)
$BuildDocs = [int](-not $DisableDocs)
+$BuildNouveau = $(If ($EnableNouveau) {1} else {0})
$Hostname = [System.Net.Dns]::GetHostEntry([string]"localhost").HostName
$WithProper = (-not $DisableProper).ToString().ToLower()
$ErlangMD5 = ($EnableErlangMD5).ToString().ToLower()
@@ -151,11 +154,12 @@ $CouchDBConfig = @"
{prefix, "."}.
{data_dir, "./data"}.
{view_index_dir, "./data"}.
+{state_dir, "./data"}.
{log_file, ""}.
{fauxton_root, "./share/www"}.
{user, "$CouchDBUser"}.
{spidermonkey_version, "$SpiderMonkeyVersion"}.
-{node_name, "-name couchdb@localhost"}.
+{node_name, "-name couchdb@127.0.0.1"}.
{cluster_port, 5984}.
{backend_port, 5986}.
{prometheus_port, 17986}.
@@ -196,6 +200,7 @@ man_dir = $ManDir
with_fauxton = $BuildFauxton
with_docs = $BuildDocs
+with_nouveau = $BuildNouveau
user = $CouchDBUser
spidermonkey_version = $SpiderMonkeyVersion
diff --git a/nouveau/.gitattributes b/nouveau/.gitattributes
new file mode 100644
index 000000000..fcadb2cf9
--- /dev/null
+++ b/nouveau/.gitattributes
@@ -0,0 +1 @@
+* text eol=lf
diff --git a/nouveau/.gitignore b/nouveau/.gitignore
index a402faa89..4e61cb625 100644
--- a/nouveau/.gitignore
+++ b/nouveau/.gitignore
@@ -5,3 +5,4 @@
.vscode/
.gradle/
build/
+target/