{
	"schema": "sai-1",

	"platforms": {
		"rocky9/aarch64-a72a55-rk3588/gcc": {
                        "build": [
                                "mkdir -p build destdir; cd build; CCACHE_DISABLE=1 LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib cmake .. ${cmake}",
                                "cd build && make -j$SAI_PARALLEL && rm -rf ../destdir && make -j$SAI_PARALLEL DESTDIR=../destdir install",
				"cd build && LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib ctest -j$SAI_PARALLEL --output-on-failure --repeat until-pass:3",
                                "cd build && SAI_CPACK=\"-G RPM\" ${cpack}"
                        ]
		},
		"netbsd-OSX-bigsur/x86_64-intel-i3/llvm": {
                        "build": [
				"mkdir -p build destdir; cd build; CCACHE_DISABLE=1 LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib MACOSX_DEPLOYMENT_TARGET=15.7 cmake .. -DCMAKE_MAKE_PROGRAM=/usr/bin/make ${cmake}",
                                "cd build && make -j$SAI_PARALLEL && rm -rf ../destdir && make -j$SAI_PARALLEL DESTDIR=../destdir install",
				"cd build ; export LD_LIBRARY_PATH=\"$HOME/jobs/$SAI_VN/src/build/lib\" ; ctest -j$SAI_PARALLEL --output-on-failure --repeat until-pass:3",
                                "cd build && SAI_CPACK=\"-G ZIP\" ${cpack}"
			]
		},
		"netbsd-OSX-tahoe/aarch64-apple-m1/llvm": {
                        "build": [
				"mkdir -p build destdir; cd build; CCACHE_DISABLE=1 LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib MACOSX_DEPLOYMENT_TARGET=26 cmake .. -DCMAKE_MAKE_PROGRAM=/usr/bin/make ${cmake}",
                                "cd build && make -j$SAI_PARALLEL && rm -rf ../destdir && make -j$SAI_PARALLEL DESTDIR=../destdir install",
				"cd build ; export LD_LIBRARY_PATH=\"$HOME/jobs/$SAI_VN/src/build/lib\" ; ctest -j$SAI_PARALLEL --output-on-failure --repeat until-pass:3",
                                "cd build && SAI_CPACK=\"-G ZIP\" ${cpack}"
			]
		},
		"ubuntu-noble/riscv64/gcc": {
                        "build": [
				"mkdir -p build destdir; cd build; CCACHE_DISABLE=1 LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib cmake .. ${cmake}",
                                "cd build && make -j$SAI_PARALLEL && rm -rf ../destdir && make -j$SAI_PARALLEL DESTDIR=../destdir install",
				"cd build && LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib ctest -j$SAI_PARALLEL --output-on-failure --repeat until-pass:3",
                                "cd build && SAI_CPACK=\"-G DEB\" ${cpack}"
			]
		},
		"rocky9/x86_64-amd/gcc": {
                        "build": [
				"mkdir -p build destdir; cd build; CCACHE_DISABLE=1 LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib cmake .. ${cmake}",
                                "cd build && make -j$SAI_PARALLEL && rm -rf ../destdir && make -j$SAI_PARALLEL DESTDIR=../destdir install",
				"cd build && LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib ctest -j$SAI_PARALLEL --output-on-failure --repeat until-pass:3",
                                "cd build && SAI_CPACK=\"-G RPM\" ${cpack}"
			]
		},
		"linux-ubuntu-2404/aarch64-a72-bcm2711-rpi4/gcc": {
                        "build": [
				"mkdir -p build destdir; cd build; CCACHE_DISABLE=1 LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib cmake .. ${cmake}",
                                "cd build && make -j$SAI_PARALLEL && rm -rf ../destdir && make -j$SAI_PARALLEL DESTDIR=../destdir install",
				"cd build && LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib ctest -j$SAI_PARALLEL --output-on-failure --repeat until-pass:3",
                                "cd build && SAI_CPACK=\"-G DEB\" ${cpack}"
			]
		},
                "netbsd/aarch64BE-bcm2837-a53/gcc": {
                        "default": false,
                        "build": [
				"mkdir -p build destdir; cd build; CCACHE_DISABLE=1 LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib cmake .. ${cmake}",
                                "cd build && make -j$SAI_PARALLEL && rm -rf ../destdir && make -j$SAI_PARALLEL DESTDIR=../destdir install",
				"cd build && LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib /usr/pkg/bin/ctest -j$SAI_PARALLEL --output-on-failure --repeat until-pass:3"
			]
                },
		"freebsd/aarch64/llvm": {
                        "default": false,
                        "build": [
				"mkdir -p build destdir; cd build; CCACHE_DISABLE=1 LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib cmake .. ${cmake}",
                                "cd build && make -j$SAI_PARALLEL && rm -rf ../destdir && make -j$SAI_PARALLEL DESTDIR=../destdir install",
				"cd build && LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib /usr/local/bin/ctest -j$SAI_PARALLEL --output-on-failure --repeat until-pass:3"
			]
		},
		"w11/x86_64-amd/msvc": {
			"default": false,
			"build": [
				"\"C:\\Program Files\\CMake\\bin\\cmake.exe\" -S . -B build -DOPENSSL_ROOT_DIR=\"C:\\Users\\andy\\vcpkg\\packages\\openssl_x64-windows\" -DLWS_EXT_PTHREAD_INCLUDE_DIR=\"C:\\Program Files (x86)\\pthreads\\include\" -DLWS_EXT_PTHREAD_LIBRARIES=\"C:\\Program Files (x86)\\pthreads\\lib\\x64\\libpthreadGC2.a\" ${cmake}",
				"\"C:\\Program Files\\CMake\\bin\\cmake.exe\" --build build --config DEBUG --parallel %SAI_PARALLEL%",
				"\"C:\\Program Files\\CMake\\bin\\ctest.exe\" --test-dir build -C DEBUG -j%SAI_PARALLEL% --output-on-failure --repeat until-pass:3"
			]
		},
		"freertos-espidf/xl6-esp32/gcc": {
                        "default": false,
                        "build": [
				"rm -rf ebuild ; mkdir ebuild; cd ebuild;cp -rp ../minimal-examples/embedded/esp32/${cpack} . ;  cd ${cpack} ; rm -f libwebsockets ; ln -sf ../.. libwebsockets",
				"cd ebuild/${cpack} ; . /opt/esp/esp-idf/export.sh ; rm -rf build ; idf.py set-target esp32 && cp partitions.csv sdkconfig.h build && cp -rp sdkconfig.old sdkconfig && cp sdkconfig build && idf.py ${cmake} build size size-components size-files",
				". /opt/esp/esp-idf/export.sh && pwd && cd ebuild/${cpack}/build && /usr/local/bin/sai-device ${cpack} ESPPORT=0 ctest --output-on-failure"
			]
		},
		"coverity/x86_64/gcc": {
			"default": false,
                        "build": [
				"mkdir -p build destdir; cd build; CCACHE_DISABLE=1 LD_LIBRARY_PATH=../destdir/usr/local/share/libwebsockets-test-server/plugins:../destdir/usr/local/lib cmake .. ${cmake}",
                                "cd build && export PATH=\"/opt/cov-analysis-linux64-2024.12.1/bin:$PATH\" && cov-build --dir cov-int make -j$SAI_PARALLEL",
                                "cd build && SAI_CPACK=\"-G RPM\" ${cpack}"
			]
		}
	},

	"configurations": {
		"default": {
			"cmake":	"",
			"platforms":	"w11/x86_64-amd/msvc,netbsd/aarch64BE-bcm2837-a53/gcc,freebsd/aarch64/llvm"
		},
		"default-noudp": {
			"cmake":	"-DLWS_WITH_UDP=0"
		},
		"fault-injection": {
			"cmake":	"-DLWS_WITH_SYS_FAULT_INJECTION=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_CBOR=1"
		},
		"esp32-heltec": {
                        "cmake":        "-DLWS_IPV6=0",
                        "cpack":        "esp-heltec-wb32",
                        "platforms":    "none, freertos-espidf/xl6-esp32/gcc"
                },
		"default-examples-awslc": {
			"cmake":	"-DLWS_WITH_AWSLC=1 -DLWS_OPENSSL_INCLUDE_DIRS=\"/usr/aws-lc/include\" -DLWS_OPENSSL_LIBRARIES=\"/usr/aws-lc/lib64/libssl.so;/usr/aws-lc/lib64/libcrypto.so\" -DLWS_WITH_MINIMAL_EXAMPLES=1",
			"platforms":	"none, rocky9/aarch64-a72a55-rk3588/gcc"
		},
		"default-examples-boringssl": {
			"cmake":	"-DLWS_WITH_BORINGSSL=1 -DLWS_OPENSSL_INCLUDE_DIRS=\"/usr/boringssl/include\" -DLWS_OPENSSL_LIBRARIES=\"/usr/boringssl/lib64/libssl.so;/usr/boringssl/lib64/libcrypto.so\" -DLWS_WITH_MINIMAL_EXAMPLES=1",
			"platforms":	"none, rocky9/aarch64-a72a55-rk3588/gcc"
		},
		"default-examples-libressl": {
			"cmake":	"-DLWS_OPENSSL_LIBRARIES='/usr/libressl/lib64/libtls.so;/usr/libressl/lib64/libssl.so;/usr/libressl/lib64/libcrypto.so' -DLWS_OPENSSL_INCLUDE_DIRS=/usr/libressl/include -DLWS_WITH_MINIMAL_EXAMPLES=1",
			"platforms":	"none, rocky9/aarch64-a72a55-rk3588/gcc"
		},
		"default-wolfssl": {
			"cmake":	"-DLWS_WITH_WOLFSSL=1 -DLWS_WOLFSSL_INCLUDE_DIRS=/usr/local/include -DLWS_WOLFSSL_LIBRARIES=/usr/local/lib/libwolfssl.so -DLWS_WITH_MINIMAL_EXAMPLES=0",
			"platforms":	"none, rocky9/aarch64-a72a55-rk3588/gcc"
		},
		"default-examples": {
			"cmake":	"-DLWS_WITH_MINIMAL_EXAMPLES=0",
			"platforms":	"netbsd/aarch64BE-bcm2837-a53/gcc,freebsd/aarch64/llvm"
		},
		"default-examples-tls-sess": {
			"cmake":	"-DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_TLS_SESSIONS=1"
		},
		"h1only-examples": {
			"cmake":	"-DLWS_WITH_HTTP2=0 -DLWS_WITH_MINIMAL_EXAMPLES=1"
		},
		"h1only-notls": {
			"cmake":	"-DLWS_WITH_HTTP2=0 -DLWS_WITH_SSL=OFF"
		},
		"unix-domain": {
			"cmake":	"-DUNIX_SOCK=1"
		},
		"plugins": {
			"cmake":	"-DLWS_WITH_PLUGINS=1"
		},
		# WARN_DEPRECATED disabled for openssl v3 case on windows
		"lws_system": {
			"cmake":	"-DLWS_SUPPRESS_DEPRECATED_API_WARNINGS=1 -DLWS_WITH_ACME=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DCMAKE_BUILD_TYPE=RELEASE -DLWS_WITH_GENCRYPTO=1 -DLWS_WITH_JOSE=1 -DLWS_WITH_SYS_ASYNC_DNS=1 -DLWS_WITH_SYS_NTPCLIENT=1"
		},
		"secure-streams": {
			"cmake":	"-DLWS_WITH_SECURE_STREAMS=1 -DLWS_WITH_MINIMAL_EXAMPLES=1",
			"platforms":	"w11/x86_64-amd/msvc,netbsd/aarch64BE-bcm2837-a53/gcc"
		},
		"secure-streams-proxy": {
			"cmake":	"-DLWS_WITH_SECURE_STREAMS=1 -DLWS_WITH_SECURE_STREAMS_PROXY_API=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 "
		},
		"secure-streams-proxy-metrics": {
			"cmake":	"-DLWS_WITH_SECURE_STREAMS=1 -DLWS_WITH_SECURE_STREAMS_PROXY_API=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_SYS_METRICS=1"
		},
		"distro_recommended": { # minimal examples also needed for ctest
			"cmake":	"-DLWS_WITH_DISTRO_RECOMMENDED=1 -DLWS_WITH_MINIMAL_EXAMPLES=1",
			"cpack":	"&& cpack $SAI_CPACK",
			"artifacts":	"build/*.rpm, build/*.deb, build/*.zip"
		},
		"lwsws": {
			"cmake":	"-DLWS_WITH_LWSWS=ON -DLWS_WITHOUT_EXTENSIONS=0 -DLWS_WITH_HTTP2=1 -DLWS_WITH_ACME=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DCMAKE_BUILD_TYPE=DEBUG -DLWS_WITH_GENCRYPTO=1 -DLWS_WITH_JOSE=1 -DLWS_WITH_SYS_ASYNC_DNS=1 -DLWS_WITH_SYS_NTPCLIENT=1"
		},
		"lwsws-nometrics": {
			"cmake":	"-DLWS_WITH_LWSWS=ON -DLWS_WITHOUT_EXTENSIONS=0 -DLWS_WITH_HTTP2=1 -DLWS_WITH_ACME=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DCMAKE_BUILD_TYPE=DEBUG -DLWS_WITH_GENCRYPTO=1 -DLWS_WITH_JOSE=1 -DLWS_WITH_SYS_ASYNC_DNS=1 -DLWS_WITH_SYS_NTPCLIENT=1 -DLWS_WITH_SYS_METRICS=0"
		},
		"lwsws2": {
			"cmake":	"-DLWS_WITH_LWSWS=ON -DLWS_WITHOUT_EXTENSIONS=0 -DLWS_WITH_HTTP2=1 -DLWS_WITH_ACME=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DCMAKE_BUILD_TYPE=DEBUG -DLWS_WITH_LWS_DSH=1 -DLWS_WITH_CACHE_NSCOOKIEJAR=0"
		},
		"justmbedtls": {
			"cmake": "-DLWS_WITH_MBEDTLS=1 -DLWS_WITHOUT_TESTAPPS=1"
		},
		"mbedtls": {
			"cmake":	"-DLWS_WITH_MBEDTLS=1 -DLWS_WITH_HTTP2=1 -DLWS_WITH_LWSWS=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_JOSE=1 -DCMAKE_BUILD_TYPE=DEBUG"
		},
		"mbedtls-metrics": {
			"cmake":	"-DLWS_WITH_MBEDTLS=1 -DLWS_WITH_HTTP2=1 -DLWS_WITH_LWSWS=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_JOSE=1 -DCMAKE_BUILD_TYPE=DEBUG -DLWS_WITH_SYS_METRICS=1"
		},
		"noserver": {
			"cmake":	"-DLWS_WITHOUT_SERVER=ON -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_SECURE_STREAMS=1"
		},
		"noclient": {
			"cmake":	"-DLWS_WITHOUT_CLIENT=ON -DLWS_WITH_MINIMAL_EXAMPLES=1"
		},
		"ext": {
			"cmake":	"-DLWS_WITHOUT_EXTENSIONS=0 -DLWS_WITH_MINIMAL_EXAMPLES=1"
		},
		"nonetwork": {
			"cmake":	"-DLWS_WITH_NETWORK=0"
		},
		"libev": {
			"cmake":	"-DLWS_WITH_LIBEV=ON -DLWS_WITH_PLUGINS=1"
		},
		"libevent": {
			"cmake":	"-DLWS_WITH_LIBEVENT=ON -DLWS_WITH_PLUGINS=1"
		},
		"libglib": {
			"cmake":	"-DLWS_WITH_GLIB=ON -DLWS_WITH_PLUGINS=1"
		},
		"sdevent": {
			"cmake":	"-DLWS_WITH_SDEVENT=ON -DLWS_WITH_PLUGINS=1",
			"platforms":    "not netbsd-OSX-bigsur/x86_64-intel-i3/llvm, not netbsd-OSX-tahoe/aarch64-apple-m1/llvm"
		},
		"uncommon_headers": {
			"cmake":	"-DLWS_WITH_HTTP_BASIC_AUTH=0 -DLWS_WITH_HTTP_UNCOMMON_HEADERS=0 -DLWS_HTTP_HEADERS_ALL=0"
		},
		"ipv6":	{
			"cmake":	"-DLWS_IPV6=ON"
		},
		"nonetlink":	{
			"cmake":	"-DLWS_WITH_NETLINK=0"
		},
		"nossl": {
			"cmake":	"-DLWS_WITH_SSL=OFF"
		},
		"daemon": {
			"cmake":	"-DLWS_WITHOUT_DAEMONIZE=OFF"
		},
		"cgi": {
			"cmake":	"-DLWS_WITH_CGI=ON"
		},
		"nologs": {
			"cmake":	"-DLWS_WITH_NO_LOGS=ON",
			"platforms":	"w11/x86_64-amd/msvc"
		},
		"cookiejar": {
			"cmake":	"-DLWS_WITH_CACHE_NSCOOKIEJAR=ON"
		},
		"jittrust": {
			"cmake":	"-DLWS_WITH_TLS_JIT_TRUST=1"
		},
		"smp": {
			"cmake":	"-DLWS_MAX_SMP=32 -DLWS_WITH_MINIMAL_EXAMPLES=1"
		},
		"nows": {
			"cmake":	"-DLWS_ROLE_WS=0"
		},
		"threadpool": {
			"cmake":	"-DLWS_WITH_THREADPOOL=1 -DLWS_WITH_MINIMAL_EXAMPLES=1"
		},

		# only applies to the coverity builder, and on pushes to "coverity" branch

		"coverity": {
			"cmake":	"-DLWS_WITHOUT_EXTENSIONS=0 -DLWS_WITH_CGI=1 -DLWS_IPV6=1 -DLWS_WITH_HTTP_PROXY=1 -DLWS_WITH_RANGES=1 -DLWS_WITH_THREADPOOL=1 -DLWS_WITH_CBOR=1 -DLWS_WITH_JOSE=1 -DLWS_WITH_COSE=1 -DLWS_WITH_SYS_DHCP_CLIENT=1 -DLWS_WITH_FTS=1 -DLWS_WITH_STRUCT_SQLITE3=1 -DLWS_ROLE_DBUS=1 -DLWS_WITH_SYS_ASYNC_DNS=1 -DLWS_WITH_SYS_FAULT_INJECTION=1 -DLWS_WITH_TLS_JIT_TRUST=1 -DLWS_ROLE_MQTT=1 -DLWS_ROLE_RAW_PROXY=1 -DLWS_WITH_EVENT_LIBS=1 -DLWS_WITH_LIBUV=1 -DLWS_WITH_STRUCT_JSON=1 -DLWS_WITH_LWS_DSH=1 -DLWS_WITH_SECURE_STREAMS_PROXY_API=1",
			"platforms":	"none, coverity/x86_64/gcc",
			"cpack":	"export STAMP=`git log -1 --pretty=format:%h` && rm -f libwebsockets.tgz && tar czvf libwebsockets.tgz cov-int && script -q -c \"cat /etc/coverity/secrets.sh | lws-minimal-http-client-post-form https://scan.coverity.com:443/builds?project=warmcat%2Flibwebsockets --form file=@libwebsockets.tgz --form version=${STAMP} --form 'description=lws qa'\" /dev/null",
			"branches":	"coverity"
		}
	}
}

