From 9996303b33e42d33ffc053e1023b5882d96ecf17 Mon Sep 17 00:00:00 2001 From: ehildenb Date: Wed, 31 Jul 2019 08:36:10 -0500 Subject: [PATCH] Build updates - fix releases (#419) * README: updated dependencies for llvm backend * Makefile: proper target dependency for install * Makefile: add uninstall target * README: openjdk-{8 => 11}-jdk * Makefile: only run erc20 test on test-interactive-firefly * Dockerfile: update openjdk-{8 => 11}-jdk * README: adoptopenjdk{8 => 12} * Dockerfile: use rv bionic image --- Dockerfile | 35 ++++++++++++----------------------- Makefile | 10 +++++++--- README.md | 6 +++--- 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30f5ccbb58..0810e21f32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,14 @@ -FROM ubuntu:bionic - -ENV TZ=America/Chicago -RUN ln --symbolic --no-dereference --force /usr/share/zoneinfo/$TZ /etc/localtime \ - && echo $TZ > /etc/timezone - -RUN apt-get update \ - && apt-get upgrade --yes \ - && apt-get install --yes \ - autoconf bison clang-8 cmake curl flex gcc libboost-test-dev \ - libcrypto++-dev libffi-dev libjemalloc-dev libmpfr-dev libprocps-dev \ - libsecp256k1-dev libssl-dev libtool libyaml-dev lld-8 llvm-8-tools \ - make maven opam openjdk-8-jdk pandoc pkg-config python3 python-pygments \ - python-recommonmark python-sphinx time zlib1g-dev protobuf-compiler \ - libprotobuf-dev - -RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java +FROM runtimeverificationinc/ubuntu:bionic + +RUN apt-get update \ + && apt-get upgrade --yes \ + && apt-get install --yes \ + autoconf bison clang-8 cmake curl flex gcc libboost-test-dev \ + libcrypto++-dev libffi-dev libjemalloc-dev libmpfr-dev libprocps-dev \ + libprotobuf-dev libsecp256k1-dev libssl-dev libtool libyaml-dev lld-8 \ + llvm-8-tools make maven opam openjdk-11-jdk pandoc pkg-config \ + protobuf-compiler python3 python-pygments python-recommonmark \ + python-sphinx time zlib1g-dev ADD deps/k/haskell-backend/src/main/native/haskell-backend/scripts/install-stack.sh /.install-stack/ RUN /.install-stack/install-stack.sh @@ -28,12 +22,7 @@ RUN git clone 'https://github.com/z3prover/z3' --branch=z3-4.6.0 \ && cd ../.. \ && rm -rf z3 -ARG USER_ID=1000 -ARG GROUP_ID=1000 -RUN groupadd --gid $GROUP_ID user \ - && useradd --create-home --uid $USER_ID --shell /bin/sh --gid user user - -USER $USER_ID:$GROUP_ID +USER user:user ADD --chown=user:user deps/k/llvm-backend/src/main/native/llvm-backend/install-rust deps/k/llvm-backend/src/main/native/llvm-backend/rust-checksum /home/user/.install-rust/ RUN cd /home/user/.install-rust \ diff --git a/Makefile b/Makefile index e58af136e1..22df4385f2 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ LUA_PATH:=$(PANDOC_TANGLE_SUBMODULE)/?.lua;; export TANGLER export LUA_PATH -.PHONY: all clean clean-submodules distclean install \ +.PHONY: all clean clean-submodules distclean install uninstall \ deps all-deps llvm-deps haskell-deps repo-deps system-deps k-deps ocaml-deps plugin-deps libsecp256k1 libff \ build build-ocaml build-java build-node build-kore split-tests \ defn java-defn ocaml-defn node-defn haskell-defn llvm-defn \ @@ -331,10 +331,14 @@ $(llvm_kompiled): $(llvm_files) $(libff_out) KEVM_RELEASE_TAG?= -install: $(node_kompiled) +install: $(INSTALL_DIR)/$(notdir $(node_kompiled)) +$(INSTALL_DIR)/$(notdir $(node_kompiled)): $(node_kompiled) mkdir -p $(INSTALL_DIR) cp $(node_kompiled) $(INSTALL_DIR)/ +uninstall: + rm $(INSTALL_DIR)/$(notdir $(node_kompiled)) + release.md: INSTALL.md echo "KEVM Release $(KEVM_RELEASE_TAG)" > $@ echo >> $@ @@ -484,7 +488,7 @@ test-interactive-firefly: && git checkout b8c8308 \ && { npx kevm-ganache-cli --gasLimit 0xfffffffffff --port 8545 --account=0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501200,1000000000000000000000000 --account=0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501201,1000000000000000000000000 --account=0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501202,1000000000000000000000000 --account=0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501203,1000000000000000000000000 --account=0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501204,1000000000000000000000000 --account=0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501205,1000000000000000000000000 --account=0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501206,1000000000000000000000000 --account=0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501207,1000000000000000000000000 --account=0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501208,1000000000000000000000000 --account=0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501209,1000000000000000000000000 & } \ && npm install \ - && npx truffle test + && npx truffle test test/token/ERC20/ERC20.test.js # Media # ----- diff --git a/README.md b/README.md index a6d2f28f0a..47f28804e5 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ On Ubuntu >= 18.04 (for example): ```sh sudo apt install \ autoconf bison flex gcc git libmpfr-dev libsecp256k1-dev \ - libtool libz3-dev make maven opam openjdk-8-jdk pandoc \ + libtool libz3-dev make maven opam openjdk-11-jdk pandoc \ pkg-config z3 zlib1g-dev ``` @@ -79,7 +79,7 @@ On OSX, using [Homebrew](https://brew.sh/), after installing the command line to ```sh brew tap caskroom/cask -brew cask install adoptopenjdk8 +brew cask install adoptopenjdk12 brew install automake libtool gmp mpfr pkg-config pandoc maven opam z3 libffi make libsecp256k1 ``` @@ -138,7 +138,7 @@ export PATH=$HOME/.local/bin:$PATH The LLVM backend has additional dependencies: ```k -sudo apt install cmake clang-8 clang++-8 llvm-8 lld-8 libboost-test-dev libgmp-dev libyaml-cpp-dev libjemalloc-dev curl protobuf-compiler libprotobuf-dev +sudo apt install cmake clang-8 clang++-8 llvm-8 llvm-8-tools lld-8 libboost-test-dev libgmp-dev libprocps-dev libyaml-dev libjemalloc-dev curl protobuf-compiler libprotobuf-dev ``` On Arch, you'll also need `crypto++` package.