Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
53f29c1
Initial cpack setup
achamayou Jul 27, 2020
a35ed0f
Merge branch 'master' into cpack
achamayou Jul 28, 2020
d89de55
Merge branch 'master' into cpack
achamayou Jul 28, 2020
714282e
Merge branch 'master' into cpack
achamayou Jul 28, 2020
154d6ea
Build in CI
achamayou Jul 28, 2020
2defd3a
Merge branch 'cpack' of github.com:achamayou/CCF into cpack
achamayou Jul 28, 2020
8c78615
.
achamayou Jul 29, 2020
135e669
.
achamayou Jul 29, 2020
eff3b94
Merge branch 'master' into cpack
achamayou Jul 29, 2020
253baec
.
achamayou Jul 29, 2020
cb2f139
Merge branch 'master' into cpack
achamayou Jul 29, 2020
bbf43b5
.
achamayou Jul 29, 2020
2cbedf1
Merge branch 'cpack' of github.com:achamayou/CCF into cpack
achamayou Jul 29, 2020
fd1975c
Merge branch 'master' into cpack
achamayou Jul 29, 2020
2320811
Merge branch 'master' into cpack
achamayou Jul 30, 2020
fa2dab4
Test install
achamayou Jul 30, 2020
0abbd99
Merge branch 'cpack' of github.com:achamayou/CCF into cpack
achamayou Jul 30, 2020
9141cc6
.
achamayou Jul 30, 2020
44f8522
.
achamayou Jul 30, 2020
20dc912
.
achamayou Jul 30, 2020
adaf7a2
.
achamayou Jul 30, 2020
618b963
.
achamayou Jul 30, 2020
89fd76b
.
achamayou Jul 30, 2020
8253922
.
achamayou Jul 30, 2020
66df44d
.
achamayou Jul 30, 2020
910d65c
.
achamayou Jul 30, 2020
f7a393c
Update to .deb
achamayou Jul 30, 2020
d1a3a0c
.
achamayou Jul 30, 2020
f305330
Run deps are captured by .deb
achamayou Jul 30, 2020
38eb028
.
achamayou Jul 30, 2020
33f6e1c
.
achamayou Jul 30, 2020
9142bbc
Merge branch 'master' into cpack
achamayou Jul 31, 2020
4941274
.
achamayou Jul 31, 2020
ea37381
Merge branch 'cpack' of github.com:achamayou/CCF into cpack
achamayou Jul 31, 2020
1bd1741
.
achamayou Jul 31, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .azure-pipelines-templates/install.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
steps:
- script: |
sudo chmod a+w /opt
ninja install
cmake -L .. 2>/dev/null | grep CMAKE_INSTALL_PREFIX: | cut -d = -f 2 > /tmp/install_prefix
cpack -V -G DEB
PKG=`ls *.deb`
cp $PKG $(Build.ArtifactStagingDirectory)
echo "##vso[task.setvariable variable=pkgname]$PKG"
workingDirectory: build
displayName: 'Install'
displayName: 'Make .deb package'

- script: |
sudo apt -y install ./$(pkgname)
cat /tmp/install_prefix | xargs ./test_install.sh
workingDirectory: build
displayName: Test installed CCF

- script: |
INSTALL_PREFIX=`cat /tmp/install_prefix`
tar czf $(Build.ArtifactStagingDirectory)/ccf.tar.gz ${INSTALL_PREFIX##/opt/}
displayName: Create release tarball
workingDirectory: /opt

- task: PublishPipelineArtifact@1
inputs:
path: $(Build.ArtifactStagingDirectory)/ccf.tar.gz
artifact: ccf.tar.gz
path: $(Build.ArtifactStagingDirectory)/$(pkgname)
artifact: $(pkgname)
displayName: 'Publish CCF Install'
4 changes: 2 additions & 2 deletions .azure-pipelines-templates/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- task: DownloadPipelineArtifact@2
inputs:
source: current
patterns: '**/ccf*.tar.gz'
patterns: '**/ccf*.deb'
path: $(Build.ArtifactStagingDirectory)

- task: GitHubRelease@0
Expand All @@ -21,7 +21,7 @@ jobs:
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'auto'
assets: $(Build.ArtifactStagingDirectory)/**/ccf.tar.gz
assets: $(Build.ArtifactStagingDirectory)/**/ccf*.deb
assetUploadMode: 'delete'
isDraft: true
isPreRelease: true
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set(ENV{BETTER_EXCEPTIONS} 1)
message(STATUS "CCF version=${CCF_VERSION}")
message(STATUS "CCF release version=${CCF_RELEASE_VERSION}")

include(${CCF_DIR}/cmake/cpack_settings.cmake)

# Set the default install prefix for CCF. Users may override this value with the
# cmake command. For example:
#
Expand Down
18 changes: 18 additions & 0 deletions cmake/cpack_settings.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.

include(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_NAME "ccf")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Confidential Consortium Framework")
set(CPACK_PACKAGE_CONTACT "https://github.com/Microsoft/CCF")
set(CPACK_RESOURCE_FILE_LICENSE "${CCF_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION ${CCF_RELEASE_VERSION})
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

# CPack variables for Debian packages
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"open-enclave (>=0.10.0), libuv1 (>= 1.18.0), libc++1-8, libc++abi1-8, libcurl4"
)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)

include(CPack)
5 changes: 1 addition & 4 deletions getting_started/setup_vm/app-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
- import_role:
name: llvm_repo
tasks_from: install.yml
- import_role:
name: ccf_run
tasks_from: install.yml
- import_role:
name: ccf_build
tasks_from: install.yml
- import_role:
name: ccf_install
tasks_from: install.yml
tasks_from: deb_install.yml
5 changes: 1 addition & 4 deletions getting_started/setup_vm/app-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
- import_role:
name: llvm_repo
tasks_from: install.yml
- import_role:
name: ccf_run
tasks_from: install.yml
- import_role:
name: ccf_install
tasks_from: install.yml
tasks_from: deb_install.yml
23 changes: 23 additions & 0 deletions getting_started/setup_vm/roles/ccf_install/tasks/deb_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- name: Include vars
include_vars: common.yml

- name: Install CCF
apt:
deb: "{{ ccf_deb_url }}"
become: yes

- name: Copy cchost
copy:
src: "/opt/ccf-{{ ccf_ver }}/bin/cchost"
dest: "/usr/bin/cchost"
remote_src: true
mode: a=rx
become: true
when: run_only|bool

- name: Remove release
apt:
deb: ccf
state: absent
become: true
when: run_only|bool
1 change: 1 addition & 0 deletions getting_started/setup_vm/roles/ccf_install/vars/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ccf_tarball: "ccf.tar.gz"
ccf_suffix: "{{ 'latest/download' if ccf_ver == 'latest' else 'download/ccf-' + ccf_ver }}"
ccf_url: "https://github.com/microsoft/CCF/releases/{{ ccf_suffix }}/{{ ccf_tarball }}"
ccf_prefix: "/opt/openenclave"
ccf_deb_url: "https://github.com/microsoft/CCF/releases/{{ ccf_suffix }}/ccf_{{ ccf_ver }}_amd64.deb"
1 change: 0 additions & 1 deletion tests/test_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ cd nested/run
python3.7 -m venv env
source env/bin/activate
python -m pip install -U -r "$INSTALL_PREFIX"/bin/requirements.txt
pip freeze > "$INSTALL_PREFIX"/bin/requirements.txt

# Start ephemeral network in the background
network_info_file="network_info.txt"
Expand Down