forked from microsoft/CCF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_deb.yml
75 lines (67 loc) · 2.63 KB
/
install_deb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
parameters:
target: ""
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
- ${{ if not(eq(parameters.target, 'SNPCC')) }}:
- 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
- ${{ if eq(parameters.target, 'SGX') }}:
- 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 -DCOMPILE_TARGET=sgx
else
./tests/test_install_build.sh -DCOMPILE_TARGET=sgx
fi
displayName: Test building a sample against installed CCF (SGX)
- ${{ if eq(parameters.target, 'Virtual') }}:
- 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 -DCOMPILE_TARGET=virtual
else
./tests/test_install_build.sh -DCOMPILE_TARGET=virtual
fi
displayName: Test building a sample against installed CCF (virtual)
- ${{ if eq(parameters.target, 'SNPCC') }}:
- 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 -DCOMPILE_TARGET=snp
else
./tests/test_install_build.sh -DCOMPILE_TARGET=snp
fi
displayName: Test building a sample against installed CCF (SNP)
- task: PublishPipelineArtifact@1
inputs:
path: $(Build.ArtifactStagingDirectory)/$(pkgname)
artifact: $(pkgname)
displayName: "Publish CCF Debian Package"