build: remove remaining travisci related files
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
5ecfcdfbb8
commit
e7defc355e
19
ci/format.sh
19
ci/format.sh
|
@ -1,19 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Only uncomment the below for debugging
|
||||
#set -euxo pipefail
|
||||
|
||||
pushd $PWD/..
|
||||
GO_FILES_EXCLUDING_VENDOR=$(find . -type f -name '*.go' -not -path "./vendor/*")
|
||||
FMT_RESULTS=$(gofmt -l $GO_FILES_EXCLUDING_VENDOR)
|
||||
FMT_RESULTS_COUNT=$(echo $FMT_RESULTS | wc -l) # returns one empty line when everything passes
|
||||
if [ "$FMT_RESULTS_COUNT" -gt 1 ]; then
|
||||
# some files have formatting errors
|
||||
echo "--- gofmt found errors found in the following files:"
|
||||
echo $FMT_RESULTS
|
||||
exit 1
|
||||
else
|
||||
# no files have formatting errors
|
||||
exit 0
|
||||
fi
|
||||
popd
|
58
ci/test.sh
58
ci/test.sh
|
@ -1,58 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Only uncomment the below for debugging
|
||||
#set -euxo pipefail
|
||||
|
||||
LOCAL_GO_VERSION=$(go version | awk -F' ' '{print $3}' | tr -d '[:space:]')
|
||||
GO_VERSION="${TRAVIS_GO_VERSION:=$LOCAL_GO_VERSION}"
|
||||
TIP_VERSION_IDENTIFIER="tip"
|
||||
echo $GO_VERSION
|
||||
|
||||
# Hold the package names that contain failures
|
||||
FAIL_PACKAGES=()
|
||||
|
||||
# OpenCV components to link in CGO compile
|
||||
OPENCV_LDFLAGS="-lopencv_core -lopencv_face -lopencv_videoio -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_objdetect -lopencv_features2d -lopencv_video -lopencv_dnn -lopencv_xfeatures2d"
|
||||
|
||||
# Use $HOME on Travis
|
||||
# Use /usr/local on local
|
||||
if [[ $TRAVIS == "true" ]]; then
|
||||
export CGO_CPPFLAGS="-I${HOME}/usr/include"
|
||||
export CGO_LDFLAGS="-L${HOME}/usr/lib $OPENCV_LDFLAGS"
|
||||
else
|
||||
export CGO_CPPFLAGS="-I/usr/local/include"
|
||||
export CGO_LDFLAGS="-L/usr/local/lib $OPENCV_LDFLAGS"
|
||||
fi
|
||||
|
||||
|
||||
pushd $PWD/..
|
||||
# Set up coverage report file
|
||||
COVERAGE_REPORT_LOCATION="./profile.cov"
|
||||
echo "" > $COVERAGE_REPORT_LOCATION
|
||||
|
||||
# Exclude vendor etc.
|
||||
EXCLUDING_VENDOR=$(go list ./... | grep -Ev 'vendor|common|client|cli|examples|robeaux')
|
||||
|
||||
# Iterate over all non-vendor packages and run tests with coverage
|
||||
for package in $EXCLUDING_VENDOR; do \
|
||||
if [ $GO_VERSION == $TIP_VERSION_IDENTIFIER ]; then
|
||||
# `go test` runs a vet subset as of this Change https://go-review.googlesource.com/c/go/+/74356
|
||||
result=$(go test -vet=off -covermode=count -coverprofile=tmp.cov $package)
|
||||
else
|
||||
result=$(go test -covermode=count -coverprofile=tmp.cov $package)
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
FAIL_PACKAGES+=($package);
|
||||
fi;
|
||||
echo "$result"
|
||||
if [ -f tmp.cov ]; then
|
||||
cat tmp.cov >> profile.cov;
|
||||
rm tmp.cov;
|
||||
fi;
|
||||
done
|
||||
|
||||
# exit 1 if there have been any test failures
|
||||
if [ ${#FAIL_PACKAGES[@]} -ne 0 ]; then
|
||||
exit 1
|
||||
fi;
|
||||
popd
|
|
@ -1,60 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux -o pipefail
|
||||
|
||||
OPENCV_VERSION=${OPENCV_VERSION:-4.1.2}
|
||||
|
||||
#GRAPHICAL=ON
|
||||
GRAPHICAL=${GRAPHICAL:-OFF}
|
||||
|
||||
# OpenCV looks for libjpeg in /usr/lib/libjpeg.so, for some reason. However,
|
||||
# it does not seem to be there in 14.04. Create a link
|
||||
|
||||
mkdir -p $HOME/usr/lib
|
||||
|
||||
if [[ ! -f "$HOME/usr/lib/libjpeg.so" ]]; then
|
||||
ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so $HOME/usr/lib/libjpeg.so
|
||||
fi
|
||||
|
||||
# Same for libpng.so
|
||||
|
||||
if [[ ! -f "$HOME/usr/lib/libpng.so" ]]; then
|
||||
ln -s /usr/lib/x86_64-linux-gnu/libpng.so $HOME/usr/lib/libpng.so
|
||||
fi
|
||||
|
||||
# Build OpenCV
|
||||
if [[ ! -e "$HOME/usr/installed-${OPENCV_VERSION}" ]]; then
|
||||
TMP=$(mktemp -d)
|
||||
if [[ ! -d "opencv-${OPENCV_VERSION}/build" ]]; then
|
||||
curl -sL https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip > ${TMP}/opencv.zip
|
||||
unzip -q ${TMP}/opencv.zip
|
||||
mkdir opencv-${OPENCV_VERSION}/build
|
||||
rm ${TMP}/opencv.zip
|
||||
fi
|
||||
|
||||
if [[ ! -d "opencv_contrib-${OPENCV_VERSION}/modules" ]]; then
|
||||
curl -sL https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip > ${TMP}/opencv-contrib.zip
|
||||
unzip -q ${TMP}/opencv-contrib.zip
|
||||
rm ${TMP}/opencv-contrib.zip
|
||||
fi
|
||||
rmdir ${TMP}
|
||||
|
||||
cd opencv-${OPENCV_VERSION}/build
|
||||
cmake -D WITH_IPP=${GRAPHICAL} \
|
||||
-D WITH_OPENGL=${GRAPHICAL} \
|
||||
-D WITH_QT=${GRAPHICAL} \
|
||||
-D BUILD_EXAMPLES=OFF \
|
||||
-D BUILD_TESTS=OFF \
|
||||
-D BUILD_PERF_TESTS=OFF \
|
||||
-D BUILD_opencv_java=OFF \
|
||||
-D BUILD_opencv_python=OFF \
|
||||
-D BUILD_opencv_python2=OFF \
|
||||
-D BUILD_opencv_python3=OFF \
|
||||
-D OPENCV_GENERATE_PKGCONFIG=ON \
|
||||
-D CMAKE_INSTALL_PREFIX=$HOME/usr \
|
||||
-D OPENCV_ENABLE_NONFREE=ON \
|
||||
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-${OPENCV_VERSION}/modules ..
|
||||
make -j8
|
||||
make install && touch $HOME/usr/installed-${OPENCV_VERSION}
|
||||
cd ../..
|
||||
touch $HOME/fresh-cache
|
||||
fi
|
Loading…
Reference in New Issue