Skip to content

Commit

Permalink
Merge pull request #408 from skalenetwork/revert-407-revert-406-404-a…
Browse files Browse the repository at this point in the history
…dd-support-of-ubuntu-2204

Revert "Revert "404 add support of ubuntu 2204""
  • Loading branch information
DmytroNazarenko authored Mar 21, 2023
2 parents 15fb1e9 + e7d6a00 commit 7573cd5
Show file tree
Hide file tree
Showing 29 changed files with 18,031 additions and 17,931 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
source: '.'
exclude: './CMakeFiles ./cmake ./deps ./build ./cppzmq ./gmp-build ./intel-sgx-ssl ./jsonrpc ./leveldb ./libBLS ./libzmq ./linux-sgx-driver ./rapidjson ./sgx-gmp ./sgx-sdk-build ./sgx-software-enable ./tgmp-build ./third_party/* ./newer_lcov'
extensions: 'h,hpp,hxx,cpp,cxx,cc,ipp'
clangFormatVersion: 10
clangFormatVersion: 14
2 changes: 1 addition & 1 deletion .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerimagebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- build_base*
jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
env:
ACTIONS_ALLOW_UNSECURE_COMMMANDS: true
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerimageintelsubmission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerimagerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- stable
jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dockerimagesim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Build and publish container for testing
run: python3 scripts/docker_build.py DockerfileSimulation sgxwallet_sim ${GITHUB_SHA}
- name: test
run: python3 scripts/docker_test.py DockerfileSimulation sgxwallet_sim
run: python3 scripts/docker_test.py DockerfileSimulation sgxwallet_sim ${GITHUB_SHA}
- name: build and deploy docker image
if: |
contains(github.ref, 'develop') || contains(github.ref, 'beta') ||
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ add_executable(sgxwallet
BLSCrypto.h
BLSPrivateKeyShareSGX.cpp
BLSPrivateKeyShareSGX.h
catch.hpp
third_party/catch.hpp
cert_util.cpp
common.h
create_enclave.c
Expand Down
26 changes: 11 additions & 15 deletions DockerfileBase
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

RUN apt-get update && apt-get install software-properties-common -y && \
add-apt-repository ppa:ubuntu-toolchain-r/test && \
Expand All @@ -18,23 +18,18 @@ RUN apt-get update && apt-get install software-properties-common -y && \
ocaml \
ocamlbuild \
protobuf-compiler \
python \
python-is-python3 \
wget \
libcurl4 \
libprotobuf10 \
libssl1.1 \
make \
module-init-tools \
unzip \
gcc-9 g++-9
perl \
pkgconf

RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9 && \
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 9 && \
update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-9 9 && \
update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-9 9
# RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb && \
# dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb

RUN git clone -b sgx_2.13 --depth 1 https://github.com/intel/linux-sgx
RUN git clone -b sgx_2.19 --depth 1 https://github.com/intel/linux-sgx

RUN cd linux-sgx && make preparation

Expand All @@ -59,11 +54,12 @@ WORKDIR /usr/src/sdk

RUN apt update && \
apt install -yq apt-utils && \
apt install -yq --no-install-recommends python-yaml vim \
telnet git ca-certificates perl \
apt install -yq --no-install-recommends vim telnet git ca-certificates perl \
reprepro libboost-all-dev alien uuid-dev libxml2-dev ccache \
yasm flex bison libprocps-dev ccache texinfo \
libjsonrpccpp-dev curl libjsonrpccpp-tools && \
graphviz doxygen libgnutls28-dev libgcrypt20-dev \
libboost-dev libboost-system-dev libboost-thread-dev lsb-release libsystemd0 && \
# glibc-tools
ln -s /usr/bin/ccache /usr/local/bin/clang && \
ln -s /usr/bin/ccache /usr/local/bin/clang++ && \
ln -s /usr/bin/ccache /usr/local/bin/gcc && \
Expand Down
9 changes: 4 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ AM_CFLAGS = -DUSER_SPACE -O2 -rdynamic -Wl,--no-as-needed -lSegFault -DSGXWALLET
AM_CXXFLAGS = ${AM_CPPFLAGS} -rdynamic -Wl,--no-as-needed -lSegFault -DSGXWALLET_VERSION="$(WALLET_VERSION)"


AM_CPPFLAGS += -DSGXWALLET_VERSION="$(WALLET_VERSION)" -Wall -DSKALE_SGX=1 -DBINARY_OUTPUT=1 -Ileveldb/include -IlibBLS/bls\
-IlibBLS/libff -IlibBLS -fno-builtin-memset $(GMP_CPPFLAGS) -I. \
AM_CPPFLAGS += -DSGXWALLET_VERSION="$(WALLET_VERSION)" -Wall -DSKALE_SGX=1 -DBINARY_OUTPUT=1 -Ileveldb/include -IlibBLS/bls \
-IlibBLS/libff -IlibBLS -fno-builtin-memset $(GMP_CPPFLAGS) -I. \
-I./libBLS/deps/deps_inst/x86_or_x64/include -I./libzmq/include -I./cppzmq -I./third_party/zguide \
-I./rapidjson/include/rapidjson

Expand All @@ -71,9 +71,9 @@ bin_PROGRAMS = sgxwallet testw sgx_util


COMMON_SRC = SGXException.cpp ExitHandler.cpp zmq_src/ZMQClient.cpp zmq_src/RspMessage.cpp zmq_src/ReqMessage.cpp \
zmq_src/ZMQMessage.cpp zmq_src/ZMQServer.cpp zmq_src/Agent.cpp zmq_src/WorkerThreadPool.cpp ExitRequestedException.cpp \
zmq_src/ZMQMessage.cpp zmq_src/ZMQServer.cpp zmq_src/Agent.cpp zmq_src/WorkerThreadPool.cpp ExitRequestedException.cpp \
InvalidStateException.cpp Exception.cpp InvalidArgumentException.cpp Log.cpp TECrypto.cpp \
SGXWalletServer.cpp SGXRegistrationServer.cpp CSRManagerServer.cpp BLSCrypto.cpp CryptoTools.cpp \
SGXWalletServer.cpp SGXRegistrationServer.cpp CSRManagerServer.cpp BLSCrypto.cpp CryptoTools.cpp \
DKGCrypto.cpp ServerInit.cpp BLSPrivateKeyShareSGX.cpp LevelDB.cpp ServerDataChecker.cpp SEKManager.cpp \
third_party/intel/sgx_stub.c third_party/intel/sgx_detect_linux.c third_party/intel/create_enclave.c \
third_party/intel/oc_alloc.c ECDSAImpl.c TestUtils.cpp sgxwallet.c SGXInfoServer.cpp ECDSACrypto.cpp
Expand Down Expand Up @@ -128,4 +128,3 @@ sgx_util_LDADD=-LlibBLS/deps/deps_inst/x86_or_x64/lib -Lleveldb/build -LlibBLS/b
-l:libbls.a -l:libleveldb.a \
-l:libff.a -lgmp -ljsonrpccpp-stub -ljsonrpccpp-server -ljsonrpccpp-client -ljsonrpccpp-common \
-ljsoncpp -lmicrohttpd -lgnutls -lgcrypt -lidn2 -lcurl -lssl -lcrypto -lz -lpthread -ldl

2 changes: 1 addition & 1 deletion TestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
#include "SGXRegistrationServer.h"
#include "SGXWalletServer.h"
#include "TestUtils.h"
#include "catch.hpp"
#include "common.h"
#include "sgxwallet.h"
#include "stubclient.h"
#include "testw.h"
#include "third_party/catch.hpp"
#include <thread>

using namespace jsonrpc;
Expand Down
Loading

0 comments on commit 7573cd5

Please sign in to comment.