changeset 855:49c810f9f92d

build: add builds.sr.ht build manifests & script These build libjeffpc 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 Mon, 05 Sep 2022 09:38:03 -0400
parents 322f83565c8c
children c4e75447a4df
files .builds/debian.yml .builds/do-build.sh .builds/fbsd.yml
diffstat 3 files changed, 170 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.builds/debian.yml	Mon Sep 05 09:38:03 2022 -0400
@@ -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: debian/stable
+packages:
+  - clang-11
+  - clang-13
+  - gcc-9
+  - g++-9
+  - gcc-10
+  - g++-10
+  - cmake
+  - bison
+  - flex
+  - mandoc
+  - glibc-doc
+  - manpages
+  - manpages-dev
+tasks:
+  - build-clang11: |
+      ./libjeffpc*/.builds/do-build.sh clang11 clang-11 clang++-11
+  - test-clang11: |
+      cd build-clang11 && make test
+  - build-clang13: |
+      ./libjeffpc*/.builds/do-build.sh clang13 clang-13 clang++-13
+  - test-clang13: |
+      cd build-clang13 && make test
+  - build-gcc9: |
+      ./libjeffpc*/.builds/do-build.sh gcc9 gcc-9 gcc++-9
+  - test-gcc9: |
+      cd build-gcc9 && make test
+  - build-gcc10: |
+      ./libjeffpc*/.builds/do-build.sh gcc10 gcc-10 gcc++-10
+  - test-gcc10: |
+      cd build-gcc10 && make test
+triggers:
+  - action: email
+    condition: always
+    to: jeffpc@josefsipek.net
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.builds/do-build.sh	Mon Sep 05 09:38:03 2022 -0400
@@ -0,0 +1,41 @@
+#!/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 ../libjeffpc* \
+  -DCMAKE_C_COMPILER=$cc \
+  -DCMAKE_CXX_COMPILER=$cxx
+make
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.builds/fbsd.yml	Mon Sep 05 09:38:03 2022 -0400
@@ -0,0 +1,71 @@
+#
+# 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
+  - llvm11
+  - llvm12
+  - llvm13
+  - llvm14
+  - gcc10
+  - gcc12
+  - cmake
+  - bison
+  - flex
+tasks:
+  - build-cc: |
+      ./libjeffpc*/.builds/do-build.sh cc cc c++
+  - test-cc: |
+      cd build-cc && make test
+  - build-clang10: |
+      ./libjeffpc*/.builds/do-build.sh clang10 clang10 clang++10
+  - test-clang10: |
+      cd build-clang10 && make test
+  - build-clang11: |
+      ./libjeffpc*/.builds/do-build.sh clang11 clang11 clang++11
+  - test-clang11: |
+      cd build-clang11 && make test
+  - build-clang12: |
+      ./libjeffpc*/.builds/do-build.sh clang12 clang12 clang++12
+  - test-clang12: |
+      cd build-clang12 && make test
+  - build-clang13: |
+      ./libjeffpc*/.builds/do-build.sh clang13 clang13 clang++13
+  - test-clang13: |
+      cd build-clang13 && make test
+  - build-clang14: |
+      ./libjeffpc*/.builds/do-build.sh clang14 clang14 clang++14
+  - test-clang14: |
+      cd build-clang14 && make test
+  - build-gcc10: |
+      ./libjeffpc*/.builds/do-build.sh gcc10 gcc10 g++10
+  - test-gcc10: |
+      cd build-gcc10 && make test
+  - build-gcc12: |
+      ./libjeffpc*/.builds/do-build.sh gcc12 gcc12 g++12
+  - test-gcc12: |
+      cd build-gcc12 && make test
+triggers:
+  - action: email
+    condition: always
+    to: jeffpc@josefsipek.net