changeset 883:c61456afbba3

build: add builds.sr.ht build manifests & script These build hlog with a variety of gcc and clang versions on FreeBSD and Debian. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Sun, 18 Dec 2022 10:35:16 -0500
parents f9ea425467d3
children 6552b75f3cc3
files .builds/debian.yml .builds/do-build.sh .builds/fbsd.yml
diffstat 3 files changed, 162 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.builds/debian.yml	Sun Dec 18 10:35:16 2022 -0500
@@ -0,0 +1,54 @@
+#
+# Copyright (c) 2022 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+image: debian/stable
+packages:
+  - clang-11
+  - clang-13
+  - gcc-9
+  - g++-9
+  - gcc-10
+  - g++-10
+  - cmake
+  - bison
+  - flex
+sources:
+  - hg+https://hg.sr.ht/~jeffpc/libjeffpc
+tasks:
+  - build-libjeffpc: |
+      mkdir proto
+      cd libjeffpc
+      cmake . -DCMAKE_INSTALL_PREFIX=$PWD/../proto
+      make
+      make install
+  - build-clang11: |
+      ./nomad*/.builds/do-build.sh clang11 clang-11 clang++-11
+  - build-clang13: |
+      ./nomad*/.builds/do-build.sh clang13 clang-13 clang++-13
+  - build-gcc9: |
+      ./nomad*/.builds/do-build.sh gcc9 gcc-9 g++-9
+  - build-gcc10: |
+      ./nomad*/.builds/do-build.sh gcc10 gcc-10 g++-10
+triggers:
+  - action: email
+    condition: always
+    to: jeffpc@josefsipek.net
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.builds/do-build.sh	Sun Dec 18 10:35:16 2022 -0500
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# Copyright (c) 2022 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+if [ $# -ne 3 ] ; then
+	echo "Usage: $0 <name> <cc> <c++>" >&2
+	exit 1
+fi
+
+name="$1"
+cc="`which "$2"`"
+cxx="`which "$3"`"
+
+set -e
+set -x
+
+mkdir build-${name}
+cd build-${name}
+cmake ../nomad* \
+  -DWITH_JEFFPC=../proto \
+  -DCMAKE_C_COMPILER=$cc \
+  -DCMAKE_CXX_COMPILER=$cxx
+
+# FIXME: gross hack to make out-of-tree builds succeed
+#
+# rpcgen creates rpc_fs_xdr.c which has a "rpc_fs.h" include.  We have a
+# symlink in the source tree to make it all work, but this doesn't work with
+# out-of-tree builds.  So, we make a similar link here.
+ln -s ~/nomad*/src/common/include/nomad/rpc_fs.h src/common/rpc_fs.h
+
+make
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.builds/fbsd.yml	Sun Dec 18 10:35:16 2022 -0500
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 2022 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+image: freebsd/latest
+packages:
+  - llvm10
+  - llvm13
+  - llvm14
+  - gcc10
+  - gcc12
+  - cmake
+  - bison
+  - flex
+  - fusefs-libs
+sources:
+  - hg+https://hg.sr.ht/~jeffpc/libjeffpc
+tasks:
+  - build-libjeffpc: |
+      mkdir proto
+      cd libjeffpc
+      cmake . -DCMAKE_INSTALL_PREFIX=$PWD/../proto
+      make
+      make install
+  - build-cc: |
+      ./nomad*/.builds/do-build.sh cc cc c++
+  - build-clang10: |
+      ./nomad*/.builds/do-build.sh clang10 clang10 clang++10
+  - build-clang13: |
+      ./nomad*/.builds/do-build.sh clang13 clang13 clang++13
+  - build-clang14: |
+      ./nomad*/.builds/do-build.sh clang14 clang14 clang++14
+  - build-gcc10: |
+      ./nomad*/.builds/do-build.sh gcc10 gcc10 g++10
+  - build-gcc12: |
+      ./nomad*/.builds/do-build.sh gcc12 gcc12 g++12
+triggers:
+  - action: email
+    condition: always
+    to: jeffpc@josefsipek.net