Move buildbot script changes to stable-3.0 branch. stable-3.0
authorRyan C. Gordon <icculus@icculus.org>
Sun, 17 May 2020 00:58:55 -0400
branchstable-3.0
changeset 1688 62804a972e79
parent 1681 1e79b94d7c57
child 1690 165d972bc790
Move buildbot script changes to stable-3.0 branch.
extras/buildbot-checker.sh
extras/buildbot-emscripten.sh
--- a/extras/buildbot-checker.sh	Tue May 12 01:04:09 2020 -0400
+++ b/extras/buildbot-checker.sh	Sun May 17 00:58:55 2020 -0400
@@ -1,53 +1,14 @@
 #!/bin/bash
 
-# This is a script used by some Buildbot buildslaves to push the project
+# This is a script used by some Buildbot workers to push the project
 #  through Clang's static analyzer and prepare the output to be uploaded
 #  back to the buildmaster. You might find it useful too.
 
 # Install Clang (you already have it on Mac OS X, apt-get install clang
-#  on Ubuntu, etc),
-# or download checker at http://clang-analyzer.llvm.org/ and unpack it in
-#  /usr/local ... update CHECKERDIR as appropriate.
+#  on Ubuntu, etc), Make sure "scan-build" is in your $PATH.
 
 FINALDIR="$1"
 
-CHECKERDIR="/usr/local/checker-279"
-if [ ! -d "$CHECKERDIR" ]; then
-    echo "$CHECKERDIR not found. Trying /usr/share/clang ..." 1>&2
-    CHECKERDIR="/usr/share/clang/scan-build"
-fi
-
-if [ ! -d "$CHECKERDIR" ]; then
-    echo "$CHECKERDIR not found. Giving up." 1>&2
-    exit 1
-fi
-
-if [ -z "$MAKE" ]; then
-    OSTYPE=`uname -s`
-    if [ "$OSTYPE" == "Linux" ]; then
-        NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
-        let NCPU=$NCPU+1
-    elif [ "$OSTYPE" = "Darwin" ]; then
-        NCPU=`sysctl -n hw.ncpu`
-    elif [ "$OSTYPE" = "SunOS" ]; then
-        NCPU=`/usr/sbin/psrinfo |wc -l |sed -e 's/^ *//g;s/ *$//g'`
-    else
-        NCPU=1
-    fi
-
-    if [ -z "$NCPU" ]; then
-        NCPU=1
-    elif [ "$NCPU" = "0" ]; then
-        NCPU=1
-    fi
-
-    MAKE="make -j$NCPU"
-fi
-
-echo "\$MAKE is '$MAKE'"
-MAKECMD="$MAKE"
-unset MAKE  # prevent warnings about jobserver mode.
-
 set -x
 set -e
 
@@ -66,13 +27,10 @@
 # The -Wno-liblto is new since our checker-279 upgrade, I think; checker otherwise warns "libLTO.dylib relative to clang installed dir not found"
 
 # You might want to do this for CMake-backed builds instead...
-PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis cmake -Wno-dev -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_EXE_LINKER_FLAGS="-Wno-liblto" ..
-
-# ...or run configure without the scan-build wrapper...
-#CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0 -Wno-deprecated-declarations" LDFLAGS="-Wno-liblto" ../configure --enable-assertions=enabled
+scan-build -o analysis cmake -G Ninja -Wno-dev -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_EXE_LINKER_FLAGS="-Wno-liblto" ..
 
 rm -rf analysis
-PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis $MAKECMD
+scan-build -o analysis cmake --build . --config Debug
 
 if [ `ls -A analysis |wc -l` == 0 ] ; then
     mkdir analysis/zarro
--- a/extras/buildbot-emscripten.sh	Tue May 12 01:04:09 2020 -0400
+++ b/extras/buildbot-emscripten.sh	Sun May 17 00:58:55 2020 -0400
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 if [ -z "$SDKDIR" ]; then
-    SDKDIR="/emsdk_portable"
+    SDKDIR="/emsdk"
 fi
 
 ENVSCRIPT="$SDKDIR/emsdk_env.sh"
@@ -33,7 +33,7 @@
 emcmake cmake -G "Ninja" -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE=MinSizeRel .. || exit $?
 
 echo "Building..."
-emcmake cmake --build . --config MinSizeRel || exit $?
+emmake cmake --build . --config MinSizeRel || exit $?
 
 set -e
 rm -rf "$TARBALL" physfs-emscripten