Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 00ba51e
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Tue Jul 17 13:11:35 2018 -0400

    Update readme

commit ce6c30b
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Tue Jul 17 13:03:19 2018 -0400

    Add tests to travis

commit 5f4f797
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Tue Jul 17 12:59:28 2018 -0400

    Handle incremental build with full cached deno build in build-cache

commit d2864fa
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Wed Jul 4 11:26:07 2018 -0400

    Ls third party

commit 114e153
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Wed Jun 27 11:43:39 2018 -0400

    fix gn gen command

commit cfc2118
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Wed Jun 27 11:41:30 2018 -0400

    Third party cache dir

commit f311e4b
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Wed Jun 27 11:35:44 2018 -0400

    Echo command

commit 2e1fd17
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Wed Jun 27 11:26:21 2018 -0400

    Use absolute volume path

commit c2263cf
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Wed Jun 27 11:22:05 2018 -0400

    Don’t need to make cache directories

commit 50a2e6a
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Wed Jun 27 11:20:12 2018 -0400

    Attempt better cached travis build

commit fcc8815
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Fri Jun 22 14:14:49 2018 -0400

    Create build cache for deno2, remove deno1

commit 77c4510
Author: maxmcd <max.t.mcdonnell@gmail.com>
Date:   Fri Jun 22 10:06:25 2018 -0400

    Deno2 fixes from /ry/deno/.travis.yml
  • Loading branch information
maxmcd committed Jul 17, 2018
1 parent 21e98d0 commit a112604
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 82 deletions.
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
sudo: required
cache:
ccache: true
directories:
- src/js/node_modules/
- build-path
- ccache_dir
- third_party
services:
- docker
script:
- set -e
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker-compose build deno2
- docker-compose push deno2
- docker-compose build deno
- docker-compose run deno ./out/Default/test_cc
- docker-compose run deno ./out/Default/deno_cc foo bar
- docker-compose run deno ./out/Default/deno_cc_nosnapshot foo bar
- docker-compose run deno ./out/Default/deno meow
- docker-compose run deno ./out/Default/deno_nosnapshot meow
env:
global:
- secure: D9u/uHAJF1d25aD7clBEVDVgvtPH7MyETa4/YbWI9vm0d0Oh64aLPB97BRsdTf0SyuAZBMNhu0tI9E7tialElhKUmgcmFwFMCNLFtwLS9bC1AioiVCnkAL18ZYxjEu6nHkQyZrimyMSby23rquSZduCPEL9Tdl7x8hwahYwJt9ziCDhiqOLgqHDgcjfXaGsDpqWsGzFoQ6hZ47FPBG8a8DV8dpvyqcw1c5/AxuXN1ED+FVq8b8rCFATyFVU4L0PbhY3qWWV2hjKa1N8200Pb6zX+xepdjmiRsuvaGjAn1TblHTN5eIW1MCURdP7pIsvnIM064Okll9DmuGZIA265XDq0Apb7OPm8/lEJIdL2jWpQ8rEexjcuCgOr61PwqQEoLLTbGn+gPNj38WFMDNMDQ8OYtEzcykTRly5rIx6Af4OskLQbv8wmLFJyqeovhroxvZFmRPMpTTTBvw4HOhL4Ow3IiyLTG/+3OGrCSpgI5JxXmrudEEaP6eEx8krnvaw+IM11LX4JXjKuYk3Vum5msAHDdvOjO0CASs4XLAoJ9lRIIXTcda0rsDo0J6Rjeakjf6JzAFPo2tM9EDd+1LRaJD/tQIb8Fb31yWnG0gnsr6fGaUpvYyrNyQ0hHVnq49wlLoLwyUNy+UJpOOXy6+iVOepTST0BpTkHpV3NCWIB2Es=
Expand Down
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FROM maxmcd/deno:_build-cache

# Will not exit cleanly before make populates proto structs
RUN go get -u github.com/ry/deno/... || true
RUN git pull origin master
RUN ./tools/build_third_party.py
RUN gn gen out/Default/ --args='is_debug=false use_allocator="none" cc_wrapper="ccache" use_custom_libcxx=false use_sysroot=false'
RUN ccache -s
RUN ninja -C out/Default/ :all

WORKDIR $GOPATH/src/github.com/ry/deno
RUN make

CMD make
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

Docker images for [ry/deno](https://github.com/ry/deno)

This repo has two images `master` and `slim`. `master` builds deno from scratch and is hopefully a good reference for building deno yourself. `slim` copies the resulting deno executable from `master` if you would like to use it as a standalone executable.
This repo no longer containes images that can run Typescript. There is a `build-cache.Dockerfile` and a `Dockerfile` as references on how to build deno. As soon as deno is at the point where it can execute arbitrary Typescript again this repo will be updated.

### Deno2

There is now a working deno2 build. As far as I can tell as of 2018/06/13 deno2 can't dynamically run code, it simply runs the file `ry/deno/deno2/js/main.ts`. The `deno2` image tag is available to pull for development.
If you're using this as a build reference ensure to check out the build details in deno's [.travis.yml](https://github.com/ry/deno/blob/master/.travis.yml).
55 changes: 22 additions & 33 deletions build-cache.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,47 +1,36 @@
FROM golang:1.10-stretch
FROM phusion/baseimage

RUN apt-get update && apt-get install -y --no-install-recommends \
unzip \
ca-certificates \
# Deps for v8worker2 build
libgtk-3-dev \
pkg-config \
ccache \
xz-utils \
lbzip2 \
libglib2.0 \
curl \
gnupg \
build-essential \
git \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

ENV PATH="/usr/lib/ccache/:$PATH"
RUN mkdir -p /root/.ccache/ && touch /root/.ccache/ccache.conf
ENV CCACHE_SLOPPINESS=time_macros
ENV CCACHE_CPP2=yes

RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get update && apt-get install -y nodejs \
&& npm install -g yarn

RUN wget https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip \
&& unzip protoc-3.1.0-linux-x86_64.zip \
&& mv bin/protoc /usr/local/bin \
&& rm -rf include \
&& rm readme.txt \
&& rm protoc-3.1.0-linux-x86_64.zip
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH=/root/.cargo/bin:$PATH

RUN go get -u github.com/golang/protobuf/protoc-gen-go
RUN go get -u github.com/jteeuwen/go-bindata/...
RUN cd /opt/ && git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH=$PATH:/opt/depot_tools

# v8worker2 build wants a valid git config
RUN git config --global user.email "you@example.com"
RUN git config --global user.name "Your Name"
RUN cd /opt/ && git clone https://github.com/ry/deno.git
WORKDIR /opt/deno
RUN ./tools/build_third_party.py
RUN gn gen out/Default/ --args='is_debug=false use_allocator="none" cc_wrapper="ccache" use_custom_libcxx=false use_sysroot=false'
RUN ccache -s
RUN ninja -C out/Default/ :all

# Pulling submodules manually, errors abound with go get
# See: https://github.com/ry/deno/issues/92
RUN mkdir -p $GOPATH/src/github.com/ry/v8worker2
RUN cd $GOPATH/src/github.com/ry/v8worker2 \
&& git clone https://github.com/ry/v8worker2.git . \
&& rm -rf v8 \
&& git clone --depth 1 https://chromium.googlesource.com/v8/v8.git \
&& rm -rf depot_tools \
&& git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git \
&& git submodule update --init --recursive \
&& python -u ./build.py --use_ccache \
&& rm -rf $GOPATH/src/github.com/ry/v8worker2/v8/build \
&& rm -rf $GOPATH/src/github.com/ry/v8worker2/v8/.git \
&& rm -rf $GOPATH/src/github.com/ry/v8worker2/v8/third_party \
&& rm -rf $GOPATH/src/github.com/ry/v8worker2/v8/test \
&& rm -rf $GOPATH/src/github.com/ry/v8worker2/depot_tools
32 changes: 0 additions & 32 deletions deno2.Dockerfile

This file was deleted.

10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ services:
context: .
dockerfile: ./build-cache.Dockerfile
image: maxmcd/deno:_build-cache
deno2:
deno:
build:
context: .
dockerfile: ./deno2.Dockerfile
dockerfile: ./Dockerfile
image: maxmcd/deno:deno2
deno:
build:
travis:
build:
context: .
dockerfile: ./Dockerfile
image: maxmcd/deno:master
image: maxmcd/deno:deno2
slim:
build:
context: .
Expand Down

0 comments on commit a112604

Please sign in to comment.