Unverified Commit 2e59f2e9 authored by svetaro's avatar svetaro

Merge branch 'feature/SKALE-1850-remove-extra-dependencies-from-SGX' of...

Merge branch 'feature/SKALE-1850-remove-extra-dependencies-from-SGX' of https://github.com/skalenetwork/sgxwallet into feature/SKALE-1850-remove-extra-dependencies-from-SGX
parents 68a8c765 3b8ec598
name: C/C++ CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install packages
run: >
sudo apt-get update && sudo apt-get install -yq --no-install-recommends python-yaml vim telnet git yasm python-yaml
ca-certificates build-essential ocaml ocamlbuild automake autoconf libtool wget python
libssl-dev libssl-dev libcurl4-openssl-dev protobuf-compiler git libprotobuf-dev alien
cmake debhelper uuid-dev libxml2-dev libprotobuf10 cmake flex bison libprocps-dev ccache
autoconf texinfo libssl-dev libboost-all-dev libjsonrpccpp-dev libjsonrpccpp-tools
- name: install sgx
run: >
git clone -b sgx_2.5 --depth 1 https://github.com/intel/linux-sgx &&
cd linux-sgx &&
patch -p1 -i ../docker/install-psw.patch && ./download_prebuilt.sh 2> /dev/null
&& make -s -j$(nproc) sdk_install_pkg psw_install_pkg
&& sudo ./linux/installer/bin/sgx_linux_x64_sdk_2.5.100.49891.bin --prefix=/opt/intel
&& sudo ./linux/installer/bin/sgx_linux_x64_psw_2.5.100.49891.bin &&
cd .. && rm -rf linux-sgx/
- name: update git
run: git submodule update --init --recursive
- name: build deps
run: cd scripts; ./build.py
- name: build sgx
run: autoreconf -vif && automake && ./configure && make
...@@ -31,7 +31,7 @@ To build and run **sgxd**, you'll need **Intel SGX** capable hardware. Most Inte ...@@ -31,7 +31,7 @@ To build and run **sgxd**, you'll need **Intel SGX** capable hardware. Most Inte
To enable SGX using a software utility: To enable SGX using a software utility:
- Build `sgx-enable` utility by typing `cd sgx-software-enable; make` - Build `sgx-enable` utility by typing `cd sgx-software-enable; make`
- Run `./sgx-enable`. Verify that it says that **SGX** is successfully enabled - Run `./sgx_enable`. Verify that it says that **SGX** is successfully enabled
## Install SGX driver ## Install SGX driver
...@@ -64,7 +64,7 @@ cd scripts; ./build.py; cd .. ...@@ -64,7 +64,7 @@ cd scripts; ./build.py; cd ..
## Configure and build ## Configure and build
Co to the project's top directory, then run Go to the project's top directory, then run
``` ```
libtoolize --force libtoolize --force
......
...@@ -2,11 +2,8 @@ FROM ubuntu:bionic ...@@ -2,11 +2,8 @@ FROM ubuntu:bionic
WORKDIR /usr/src/sdk WORKDIR /usr/src/sdk
RUN apt update RUN apt-get update && apt-get install -yq --no-install-recommends python-yaml vim telnet git ca-certificates build-essential ocaml ocamlbuild automake autoconf libtool wget python libssl-dev libssl-dev libcurl4-openssl-dev protobuf-compiler git libprotobuf-dev alien cmake debhelper uuid-dev libxml2-dev
RUN apt install -y libprotobuf10 cmake flex bison ccache autoconf texinfo libgcrypt20-dev libgnutls28-dev RUN apt install -y libprotobuf10 yasm cmake flex bison libprocps-dev ccache autoconf texinfo libssl-dev libboost-all-dev libjsonrpccpp-dev libjsonrpccpp-tools
RUN apt install -yq --no-install-recommends vim telnet git ca-certificates build-essential ocaml ocamlbuild automake autoconf libtool wget python python-setuptools python-pip protobuf-compiler git yasm libprotobuf-dev alien cmake debhelper uuid-dev libxml2-dev libssl-dev libcurl4-openssl-dev
### RUN apt install -yq yaml libprocps-dev libboost-all-dev libjsonrpccpp-dev libjsonrpccpp-tools
RUN pip install pyyaml
COPY install-psw.patch ./ COPY install-psw.patch ./
...@@ -23,18 +20,17 @@ RUN git clone -b sgx_2.5 --depth 1 https://github.com/intel/linux-sgx && \ ...@@ -23,18 +20,17 @@ RUN git clone -b sgx_2.5 --depth 1 https://github.com/intel/linux-sgx && \
# For debug purposes # For debug purposes
# COPY jhi.conf /etc/jhi/jhi.conf # COPY jhi.conf /etc/jhi/jhi.conf
RUN git clone --recurse-submodules https://76b7983ebf14269178b99eff5b2be4b4b56fe7a5:@github.com/skalenetwork/sgxwallet.git ###RUN git clone --recurse-submodules https://76b7983ebf14269178b99eff5b2be4b4b56fe7a5:@github.com/skalenetwork/sgxwallet.git
#RUN git clone --recurse-submodules https://github.com/skalenetwork/sgxwallet.git RUN git clone --recurse-submodules --single-branch --branch feature/SKALE-1850-remove-extra-dependencies-from-SGX https://76b7983ebf14269178b99eff5b2be4b4b56fe7a5:@github.com/skalenetwork/sgxwallet.git
WORKDIR sgxwallet WORKDIR sgxwallet
#RUN git checkout feature/SKALE-1850-remove-extra-dependencies-from-SGX #RUN cd sgx-software-enable && make && ./sgx_enable
#RUN git submodule update --init --recursive
RUN cd scripts; ./build.py RUN cd scripts; ./build.py
### RUN autoreconf -vif ### RUN autoreconf -vif
### RUN automake ### RUN automake
RUN autoreconf -vif RUN autoreconf -vif
RUN libtoolize --force RUN libtoolize --force
RUN aclocal RUN aclocal
RUN autoheader RUN autoheader || true
RUN automake --force-missing --add-missing RUN automake --force-missing --add-missing
RUN autoconf RUN autoconf
RUN ./configure RUN ./configure
......
#!/bin/bash #!/bin/bash
sudo service docker start #sudo service docker start
sudo docker build -t sgxcontainer . #sudo docker build -t sgxcontainer .
sudo docker build --no-cache -t sgxcontainer .
...@@ -69,7 +69,6 @@ BLS_DIR = topDir + "/libBLS" ...@@ -69,7 +69,6 @@ BLS_DIR = topDir + "/libBLS"
BLS_BUILD_DIR = BLS_DIR + "/build" BLS_BUILD_DIR = BLS_DIR + "/build"
JSON_LIBS_DIR = topDir + "/jsonrpc" JSON_LIBS_DIR = topDir + "/jsonrpc"
#subprocess.call(["git", "submodule", "update", "--init"]) #subprocess.call(["git", "submodule", "update", "--init"])
subprocess.call(["rm", "-f", "install-sh"]) subprocess.call(["rm", "-f", "install-sh"])
...@@ -122,8 +121,8 @@ os.chdir(SSL_SOURCE_DIR) ...@@ -122,8 +121,8 @@ os.chdir(SSL_SOURCE_DIR)
assert subprocess.call(["wget", "https://www.openssl.org/source/openssl-1.1.1b.tar.gz"]) == 0 assert subprocess.call(["wget", "https://www.openssl.org/source/openssl-1.1.1b.tar.gz"]) == 0
print "===>>> Making SSL project" print "===>>> Making SSL project"
os.chdir(SSL_MAKE_DIR) os.chdir(SSL_MAKE_DIR)
assert subprocess.call(["make", "SGX_SDK=" + SGX_SDK_DIR_SSL, "all", "test"]) == 0 #assert subprocess.call(["make", "SGX_SDK=" + SGX_SDK_DIR_SSL, "all", "test"]) == 0
#assert subprocess.call(["make", "SGX_SDK=" + SGX_SDK_DIR_SSL, "all" ]) == 0 assert subprocess.call(["make", "SGX_SDK=" + SGX_SDK_DIR_SSL, "all" ]) == 0
os.chdir(topDir) os.chdir(topDir)
print("Build successfull.") print("Build successfull.")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment