Skip to content

Build Nouveau on Windows #4678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 48 additions & 2 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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!)
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
7 changes: 6 additions & 1 deletion configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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}.
Expand Down Expand Up @@ -196,6 +200,7 @@ man_dir = $ManDir

with_fauxton = $BuildFauxton
with_docs = $BuildDocs
with_nouveau = $BuildNouveau

user = $CouchDBUser
spidermonkey_version = $SpiderMonkeyVersion
Expand Down
1 change: 1 addition & 0 deletions nouveau/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
1 change: 1 addition & 0 deletions nouveau/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.vscode/
.gradle/
build/
target/