зеркало из https://github.com/microsoft/CCF.git
49 строки
1.5 KiB
YAML
49 строки
1.5 KiB
YAML
steps:
|
|
- script: |
|
|
set -ex
|
|
cmake -L .. 2>/dev/null | grep CMAKE_INSTALL_PREFIX: | cut -d = -f 2 > /tmp/install_prefix
|
|
cpack -V -G DEB
|
|
INITIAL_PKG=`ls *.deb`
|
|
GITHUB_PKG=${INITIAL_PKG//\~/_}
|
|
if [[ "$INITIAL_PKG" != "$GITHUB_PKG" ]]; then
|
|
mv $INITIAL_PKG $GITHUB_PKG
|
|
fi
|
|
cp $GITHUB_PKG $(Build.ArtifactStagingDirectory)
|
|
echo "##vso[task.setvariable variable=pkgname]$GITHUB_PKG"
|
|
workingDirectory: build
|
|
displayName: "Make .deb package"
|
|
|
|
- script: |
|
|
set -ex
|
|
sudo apt -y install ./$(pkgname)
|
|
workingDirectory: build
|
|
displayName: Install CCF Debian package
|
|
|
|
- script: |
|
|
set -ex
|
|
cat /tmp/install_prefix | xargs -i bash -c "PYTHON_PACKAGE_PATH=../python ./test_install.sh {}"
|
|
workingDirectory: build
|
|
displayName: Test installed CCF
|
|
|
|
- script: |
|
|
set -ex
|
|
cat /tmp/install_prefix | xargs -i bash -c "PYTHON_PACKAGE_PATH=../python ./recovery_benchmark.sh {}"
|
|
workingDirectory: build
|
|
displayName: Recovery benchmark for installed CCF
|
|
|
|
- script: |
|
|
set -ex
|
|
unsafe_build=$(grep unsafe /tmp/install_prefix) || true
|
|
if [[ -n "$unsafe_build" ]]; then
|
|
./tests/test_install_build.sh -DUSE_UNSAFE_VERSION=ON
|
|
else
|
|
./tests/test_install_build.sh
|
|
fi
|
|
displayName: Test building a sample against installed CCF
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
inputs:
|
|
path: $(Build.ArtifactStagingDirectory)/$(pkgname)
|
|
artifact: $(pkgname)
|
|
displayName: "Publish CCF Debian Package"
|