-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into db/vcpkg
- Loading branch information
Showing
2 changed files
with
0 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,128 +0,0 @@ | ||
steps: | ||
- bash: | | ||
set -e pipefail | ||
# Install htslib dependencies | ||
if [[ "$AGENT_OS" == "Linux" ]]; then | ||
sudo apt-get update && sudo apt-get install -y automake autoconf libbz2-dev liblzma-dev | ||
fi | ||
# Install bcftools (only required for running the CLI tests) | ||
version=1.16 | ||
if [[ "$AGENT_OS" == "Linux" ]]; then | ||
pushd /tmp | ||
wget https://github.com/samtools/bcftools/releases/download/${version}/bcftools-${version}.tar.bz2 | ||
tar xfj bcftools-${version}.tar.bz2 | ||
cd bcftools-${version} | ||
./configure --prefix=/usr | ||
make -j2 | ||
sudo make install | ||
popd | ||
else | ||
brew install bcftools automake | ||
fi | ||
# Install some extra dependencies to speed up the core TileDB build | ||
if [[ "$AGENT_OS" == "Linux" ]]; then | ||
sudo apt-get install -y libssl-dev libbz2-dev liblz4-dev libtbb-dev libcurl4-openssl-dev zlib1g-dev | ||
fi | ||
displayName: 'Install dependencies' | ||
- bash: | | ||
# azure bash does not treat intermediate failure as error | ||
# https://github.com/Microsoft/azure-pipelines-yaml/issues/135 | ||
set -e pipefail | ||
# Azure sets "SYSTEM=build" for unknown reasons, which breaks the OpenSSL configure script (in TileDB itself) | ||
# - 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 | ||
# Configure and build TileDB-VCF | ||
mkdir -p $BUILD_REPOSITORY_LOCALPATH/libtiledbvcf/build | ||
cd $BUILD_REPOSITORY_LOCALPATH/libtiledbvcf/build | ||
cmake -DCMAKE_INSTALL_PREFIX=$BUILD_REPOSITORY_LOCALPATH/dist .. | ||
make -j4 all tiledb_vcf_unit | ||
make install | ||
displayName: 'Build and test TileDB-VCF' | ||
- bash: | | ||
set -e pipefail | ||
pushd $BUILD_REPOSITORY_LOCALPATH/apis/java | ||
./gradlew assemble | ||
export LD_LIBRARY_PATH=$BUILD_REPOSITORY_LOCALPATH/apis/java/build/resources/main/lib:$LD_LIBRARY_PATH | ||
displayName: 'Build and test TileDB-VCF Java API' | ||
- bash: | | ||
echo "Testing" | ||
ls | ||
echo "listing JNI" | ||
ls $BUILD_REPOSITORY_LOCALPATH/dist/lib | ||
echo "listing 2" | ||
ls $BUILD_REPOSITORY_LOCALPATH/apis/java/build/install/lib | ||
if [[ ( "$AGENT_OS" == "Linux" ) ]]; then | ||
cp $BUILD_REPOSITORY_LOCALPATH/libtiledbvcf/build/externals/install/lib/*.so* $BUILD_BINARIESDIRECTORY | ||
cp $BUILD_REPOSITORY_LOCALPATH/dist/lib/*.so* $BUILD_BINARIESDIRECTORY | ||
cp $BUILD_REPOSITORY_LOCALPATH/apis/java/build/install/lib/*.so* $BUILD_BINARIESDIRECTORY | ||
fi | ||
if [[ ( "$AGENT_OS" == "Darwin" ) ]]; then | ||
cp $BUILD_REPOSITORY_LOCALPATH/dist/lib/*.dylib $BUILD_BINARIESDIRECTORY | ||
cp $BUILD_REPOSITORY_LOCALPATH/apis/java/build/install/lib/*.dylib $BUILD_BINARIESDIRECTORY | ||
fi | ||
displayName: 'Test' | ||
- script: | | ||
echo $sourceVersion | ||
commitHash=${sourceVersion:0:7} | ||
echo $commitHash | ||
echo "##vso[task.setvariable variable=commitHash]$commitHash" ## Set variable for using in other tasks. | ||
env: { sourceVersion: $(Build.SourceVersion) } | ||
displayName: Git Hash 7-digit | ||
- bash: | | ||
git describe --tags > $BUILD_REPOSITORY_LOCALPATH/version.txt | ||
displayName: 'Capture version' | ||
- task: ArchiveFiles@2 | ||
inputs: | ||
rootFolderOrFile: '$(Build.BinariesDirectory)' | ||
includeRootFolder: false | ||
archiveType: 'tar' # Options: zip, 7z, tar, wim | ||
tarCompression: 'gz' # Optional. Options: gz, bz2, xz, none | ||
archiveFile: $(Build.ArtifactStagingDirectory)/tiledb-vcf-$(Agent.OS)-$(Build.SourceBranchName)-$(commitHash).tar.gz | ||
replaceExistingArchive: true | ||
verbose: true # Optional | ||
condition: succeeded() | ||
|
||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathtoPublish: $(Build.ArtifactStagingDirectory)/tiledb-vcf-$(Agent.OS)-$(Build.SourceBranchName)-$(commitHash).tar.gz | ||
artifactName: libraries | ||
condition: succeeded() | ||
|
||
- 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/libtiledbvcf/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)" | ||