From 1dfd9fa491cb9c1728e2bb082109f1d8a5018e8b Mon Sep 17 00:00:00 2001 From: hewigovens <360470+hewigovens@users.noreply.github.com> Date: Mon, 11 Jan 2021 12:56:33 +0800 Subject: [PATCH] try gitpod (#1227) --- .gitignore | 1 + .gitpod.yml | 14 ++++++++++++++ Dockerfile | 13 +++++++------ README.md | 1 + gitpod.Dockerfile | 42 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 .gitpod.yml create mode 100644 gitpod.Dockerfile diff --git a/.gitignore b/.gitignore index a1d015d1a45..75a13e6cdf7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ xcode/ cmake-build-debug/ .cquery_cache/ .cxx/ +.cache/ # Dependencies node_modules diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 00000000000..837463666b5 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,14 @@ +image: + file: gitpod.Dockerfile + +tasks: + - name: Welcome message + init: echo "Please run ./bootstrap.sh" + +vscode: + extensions: + - llvm-vs-code-extensions.vscode-clangd + - ms-vscode.cmake-tools + - coenraads.bracket-pair-colorizer-2 + - notskm.clang-tidy + - zxh404.vscode-proto3 diff --git a/Dockerfile b/Dockerfile index a188031d29e..d27fb4a4c5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,17 +25,18 @@ RUN apt-get update \ libtool autoconf pkg-config \ ninja-build \ ruby-full \ - clang-9 \ - llvm-9 \ + clang-10 \ + llvm-10 \ libc++-dev libc++abi-dev \ cmake \ - libboost1.70-dev \ + libboost1.74-dev \ + ccache \ && apt-get clean && rm -rf /var/lib/apt/lists/* -ENV CC=/usr/bin/clang-9 -ENV CXX=/usr/bin/clang++-9 +ENV CC=/usr/bin/clang-10 +ENV CXX=/usr/bin/clang++-10 -# ↑ Setup build environment (could be a base image) +# ↑ Setup build environment # ↓ Build and compile wallet core RUN git clone https://github.com/trustwallet/wallet-core.git diff --git a/README.md b/README.md index bdc9d0bf701..a6b7fd6a2e4 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Swift for iOS and Java for Android. ![Docker CI](https://github.com/trustwallet/wallet-core/workflows/Docker%20CI/badge.svg) ![Typescript CI](https://github.com/trustwallet/wallet-core/workflows/Typescript%20CI/badge.svg) +[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/trustwallet/wallet-core) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/82e76f6ea4ba4f0d9029e8846c04c093)](https://www.codacy.com/app/hewigovens/wallet-core?utm_source=github.com&utm_medium=referral&utm_content=TrustWallet/wallet-core&utm_campaign=Badge_Grade) ![Codecov](https://codecov.io/gh/TrustWallet/wallet-core/branch/master/graph/badge.svg) ![GitHub](https://img.shields.io/github/license/TrustWallet/wallet-core.svg) diff --git a/gitpod.Dockerfile b/gitpod.Dockerfile new file mode 100644 index 00000000000..7d030b6c93c --- /dev/null +++ b/gitpod.Dockerfile @@ -0,0 +1,42 @@ +FROM ubuntu:18.04 + +# Install some basics +RUN apt-get update \ + && apt-get install -y \ + wget \ + curl \ + git \ + vim \ + unzip \ + xz-utils \ + software-properties-common \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Add latest cmake/boost +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - \ + && apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' \ + && apt-add-repository -y ppa:mhier/libboost-latest + +# Install required packages for dev +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + libtool autoconf pkg-config \ + ninja-build \ + ruby-full \ + clang-10 \ + llvm-10 \ + libc++-dev libc++abi-dev \ + cmake \ + libboost1.74-dev \ + ccache \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +ENV CC=/usr/bin/clang-10 +ENV CXX=/usr/bin/clang++-10 + +RUN git clone https://github.com/trustwallet/wallet-core.git +WORKDIR /wallet-core + +CMD ["/bin/bash"]