steps: - bash: | echo "'uname -s' is:" echo "uname: " $(uname) echo "uname -m: " $(uname -m) echo "uname -r:" $(uname -r) echo "uname -s: " $(uname -s) echo "uname -v: " $(uname -v) printenv displayName: 'Print env' # Need this for virtualenv and arrow tests if enabled - task: UsePythonVersion@0 inputs: versionSpec: '3.8' - bash: | set -e pipefail python -m pip install --upgrade pip virtualenv if [[ "$TILEDB_ARROW_TESTS" == "ON" ]]; then pip install pyarrow pybind11 numpy fi - bash: | set -e pipefail # Install doxygen *before* running cmake sudo apt-get install doxygen condition: eq(variables['Agent.OS'], 'Linux') displayName: 'Install doxygen (linux only)' - bash: | set -e pipefail open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -allowUntrusted -target / condition: and(eq(variables['Agent.OS'], 'Darwin'), eq(variables['imageName'], 'macOS-10.14')) displayName: 'Install system headers (OSX 10.14 only)' - bash: | set -e pipefail # Install clang-format (v5.0) sudo scripts/install-clangformat.sh src=$BUILD_REPOSITORY_LOCALPATH cd $src $src/scripts/run-clang-format.sh $src clang-format-5.0 0 \ $(find $src/tiledb $src/test/src $src/examples $src/tools \ -name "*.cc" -or -name "*.c" -or -name "*.h") condition: eq(variables['Agent.OS'], 'Linux') displayName: 'Check formatting (linux only)' - bash: | # Azure sets "SYSTEM=build" for unknown reasonas, which breaks the OpenSSL configure script # - openssl configure uses ENV{SYSTEM} if available: # https://github.com/openssl/openssl/blob/6d745d740d37d680ff696486218b650512bbbbc6/config#L56 # - error description: # https://developercommunity.visualstudio.com/content/problem/602584/openssl-build-error-when-using-pipelines.htm unset SYSTEM # azure bash does not treat intermediate failure as error # https://github.com/Microsoft/azure-pipelines-yaml/issues/135 set -e pipefail git config --global user.name 'Azure Pipeline' git config --global user.email 'no-reply@tiledb.io' if [[ "$BACKWARDS_COMPATIBILITY_ARRAYS" == "ON" ]]; then git clone https://github.com/TileDB-Inc/TileDB-Unit-Test-Arrays.git --branch 2.2.0 test/inputs/arrays/read_compatibility_test fi # displayName: 'Clone Unit-Test-Arrays' # - bash: | # Start HDFS server if enabled if [[ "$TILEDB_HDFS" == "ON" ]]; then # - ssh to localhost is required for HDFS launch... # - /home/vsts has permissions g+w and is owned by user 'docker' # for VSTS purposes, so disable ssh strictness sudo sed -i "s/StrictModes\ yes/StrictModes\ no/g" /etc/ssh/sshd_config source scripts/install-hadoop.sh source scripts/run-hadoop.sh fi # Start minio server if S3 is enabled if [[ "$TILEDB_S3" == "ON" ]]; then source scripts/install-minio.sh; source scripts/run-minio.sh; fi # Start Azurite if Azure is enabled if [[ "$TILEDB_AZURE" == "ON" ]]; then source scripts/install-azurite.sh; source scripts/run-azurite.sh; fi # Set up arguments for bootstrap.sh bootstrap_args="--enable=verbose"; # Enable TILEDB_STATIC by default [ "$TILEDB_STATIC" ] || TILEDB_STATIC=ON if [[ "$TILEDB_STATIC" == "ON" ]]; then bootstrap_args="${bootstrap_args} --enable-static-tiledb"; fi if [[ "$TILEDB_HDFS" == "ON" ]]; then bootstrap_args="${bootstrap_args} --enable-hdfs"; fi; if [[ "$TILEDB_S3" == "ON" ]]; then bootstrap_args="${bootstrap_args} --enable-s3"; fi; if [[ "$TILEDB_AZURE" == "ON" ]]; then bootstrap_args="${bootstrap_args} --enable-azure"; fi; if [[ "$TILEDB_GCS" == "ON" ]]; then bootstrap_args="${bootstrap_args} --enable-gcs"; fi; if [[ "$TILEDB_MEMFS" == "ON" ]]; then bootstrap_args="${bootstrap_args} --enable-memfs"; fi; if [[ "$TILEDB_TBB" == "OFF" ]]; then bootstrap_args="${bootstrap_args} --disable-tbb"; fi if [[ "$TILEDB_TOOLS" == "ON" ]]; then bootstrap_args="${bootstrap_args} --enable-tools"; fi if [[ "$TILEDB_DEBUG" == "ON" ]]; then bootstrap_args="${bootstrap_args} --enable-debug"; fi if [[ "$TILEDB_CI_ASAN" == "ON" ]]; then # Add address sanitizer flag if necessary bootstrap_args="${bootstrap_args} --enable-sanitizer=address --enable-debug"; fi if [[ "$TILEDB_CI_TSAN" == "ON" ]]; then # Add thread sanitizer flag if necessary bootstrap_args="${bootstrap_args} --enable-sanitizer=thread --enable-debug"; fi if [[ "$TILEDB_SERIALIZATION" == "ON" ]]; then # Add serialization flag if necessary bootstrap_args="${bootstrap_args} --enable-serialization"; fi if [[ "$TILEDB_FORCE_BUILD_DEPS" == "ON" ]]; then # Add superbuild flag bootstrap_args="${bootstrap_args} --force-build-all-deps"; fi # displayName: 'Install dependencies' mkdir -p $BUILD_REPOSITORY_LOCALPATH/build cd $BUILD_REPOSITORY_LOCALPATH/build # Configure and build TileDB echo "Bootstrapping with '$bootstrap_args'" $BUILD_REPOSITORY_LOCALPATH/bootstrap $bootstrap_args make -j4 make examples -j4 make -C tiledb install #- bash: | cd $BUILD_REPOSITORY_LOCALPATH/build ls -la if [[ ( "$AGENT_OS" == "Linux" && "$TILEDB_S3" == "ON" ) ]]; then # make sure docker is still running... printenv docker ps -a fi make -j4 -C tiledb tiledb_unit if [[ "$TILEDB_CI_ASAN" == "ON" ]]; then export ASAN_OPTIONS=detect_leaks=0 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.4 fi if [[ "$TILEDB_GCS" == "ON" ]]; then # GCS unit tests are temporarily unsupported on CI. Fake success with # this echo. echo "##vso[task.setvariable variable=TILEDB_CI_SUCCESS]1" else make check fi # Kill the running Minio server, OSX only because Linux runs it within # docker. if [[ ( "$AGENT_OS" == "Darwin" && "$TILEDB_S3" == "ON" ) ]]; then kill -9 $MINIO_PID fi # Kill the running Azurite server if [[ "$TILEDB_AZURE" == "ON" ]]; then kill -9 $AZURITE_PID fi # - bash: | if [[ "$TILEDB_GCS" != "ON" ]]; then pushd $BUILD_REPOSITORY_LOCALPATH/examples/cmake_project mkdir build && cd build cmake -DCMAKE_PREFIX_PATH=$BUILD_REPOSITORY_LOCALPATH/dist .. && make ./ExampleExe if [[ "TILEDB_STATIC" == "ON" ]]; then ./ExampleExe_static fi popd # Build and run the PNG ingestion example. if [[ "$AGENT_OS" == "Linux" ]]; then # libpng (example dependency) sudo apt-get install libpng-dev pushd $BUILD_REPOSITORY_LOCALPATH/examples/png_ingestion; mkdir build && cd build; cmake -DCMAKE_PREFIX_PATH=$BUILD_REPOSITORY_LOCALPATH/dist .. && make; ./tiledb_png $BUILD_REPOSITORY_LOCALPATH/doc/source/figures/Scarlet-Macaw-small.png /tmp/pngarray output.png; popd; fi fi # Build the benchmarks (but do not run them). pushd $BUILD_REPOSITORY_LOCALPATH/test/benchmarking && \ mkdir build && cd build && \ cmake -DCMAKE_PREFIX_PATH=$BUILD_REPOSITORY_LOCALPATH/dist ../src && make && \ popd testfile=$(mktemp) mv $testfile $testfile.cc testfile=$testfile.cc cat < $testfile #include #include #include int main(int argc, char **argv) { int major = 0; int minor = 0; int patch = 0; tiledb_version(&major,&minor,&patch); auto version = tiledb::version(); assert(major == std::get<0>(version)); return 0; } EOF export TESTFILE_LDFLAGS="-ltiledb" if [[ "$AGENT_OS" == "Linux" ]]; then export LD_LIBRARY_PATH=$BUILD_REPOSITORY_LOCALPATH/dist/lib:/usr/local/lib:$LD_LIBRARY_PATH else export DYLD_LIBRARY_PATH=$BUILD_REPOSITORY_LOCALPATH/dist/lib:/usr/local/lib:$DYLD_LIBRARY_PATH fi $CXX -std=c++11 -g -O0 -Wall -Werror -I$BUILD_REPOSITORY_LOCALPATH/dist/include -L$BUILD_REPOSITORY_LOCALPATH/dist/lib $testfile -o $testfile.exe $TESTFILE_LDFLAGS && \ $testfile.exe && \ rm -f $testfile $testfile.exe ps -U $(whoami) -o comm= | sort | uniq # displayName: 'Build examples, PNG test, and benchmarks (build-only)' displayName: 'Build and test libtiledb' - bash: | # tiledb_unit is configured to set a job-level variable TILEDB_CI_SUCCESS=1 # following the test run. If this variable is not set, the build should fail. # see https://github.com/TileDB-Inc/TileDB/pull/1400 (5f0623f4d3) if [[ "$TILEDB_CI_SUCCESS" -ne 1 ]]; then exit 1; fi displayName: 'Test status check' - bash: | set -e pipefail # Display log files if the build failed echo "Dumping log files for failed build" echo "----------------------------------" for f in $(find $BUILD_REPOSITORY_LOCALPATH/build -name *.log); do echo "------" echo $f echo "======" cat $f done; condition: failed() # only run this job if the build step failed displayName: "Print log files (failed build only)" - bash: | set -e pipefail python -m pip install --upgrade pip virtualenv # Build the documentation (this does not deploy to RTD). pushd $BUILD_REPOSITORY_LOCALPATH/doc; ./local-build.sh; popd; condition: eq(variables['Agent.OS'], 'Linux') displayName: 'Build docs (no deployment)'