Skip to content

Commit

Permalink
Merge branch 'develop' into fix/full-epoch-test
Browse files Browse the repository at this point in the history
  • Loading branch information
deepthiskumar authored Sep 9, 2020
2 parents 6b3d68f + 8588bde commit dc7c8c4
Show file tree
Hide file tree
Showing 9 changed files with 679 additions and 1,350 deletions.
6 changes: 3 additions & 3 deletions buildkite/scripts/docker-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ scripts/release-docker.sh --service "${CODA_SERVICE}" --version "${CODA_VERSION}

if [[ -n $CODA_BUILD_ROSETTA ]]; then
echo "--- Build/Release coda-rosetta to docker hub"
docker pull gcr.io/o1labs-192920/coda-rosetta-build-deps:develop
docker pull gcr.io/o1labs-192920/coda-rosetta-opam-deps:develop
# Could also cache-from opam-deps but we would need to get that automatically building nightly or at least when src/opam.export changes
# build-deps is updated by manually running scripts/build-rosetta-stages.sh which always builds + pushes each stage
scripts/release-docker.sh --service "coda-rosetta" --version "dev-${CODA_VERSION}"\
--extra-args "--build-arg DUNE_PROFILE=dev --build-arg CODA_BRANCH=${CODA_GIT_BRANCH} --cache-from gcr.io/o1labs-192920/coda-rosetta-build-deps:develop"
--extra-args "--build-arg DUNE_PROFILE=dev --build-arg CODA_BRANCH=${CODA_GIT_BRANCH} --cache-from gcr.io/o1labs-192920/coda-rosetta-opam-deps:develop"
# Also build with the standard DUNE_PROFILE, and use the dev profile as a cache.
# This means it will use the opam-deps stage from the previous step, but make a new builder stage because the DUNE_PROFILE arg changed
scripts/release-docker.sh --service "coda-rosetta" --version "${CODA_VERSION}"\
--extra-args "--build-arg --build-arg CODA_BRANCH=${CODA_GIT_BRANCH} --cache-from codaprotocol/coda-rosetta:dev-${CODA_VERSION}"
--extra-args "--build-arg CODA_BRANCH=${CODA_GIT_BRANCH} --cache-from gcr.io/o1labs-192920/coda-rosetta-opam-deps:develop"
fi
25 changes: 22 additions & 3 deletions dockerfiles/Dockerfile-rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ ARG CODA_DIR=coda
# can also be a tagged release
# TODO: change this to two distinct variables, one for opam/dependency clone
# and a distinct one for the coda codebase in the next stage
ARG CODA_BRANCH=develop
ARG OPAM_BRANCH=develop

# location of external packages
ARG EXTERNAL_PKG_DIR=$CODA_DIR/src/external
Expand All @@ -163,7 +163,7 @@ ENV OPAMREUSEBUILDDIR false

# git will clone into an empty dir, but this also helps us set the workdir in advance
RUN git clone \
-b "${CODA_BRANCH}" \
-b "${OPAM_BRANCH}" \
--depth 1 \
--shallow-submodules \
--recurse-submodules \
Expand Down Expand Up @@ -215,8 +215,28 @@ FROM opam-deps AS builder
# Use --build-arg "DUNE_PROFILE=dev" to build a dev image or for CI
ARG DUNE_PROFILE=testnet_postake_medium_curves

# branch to checkout on first clone (this will be the only availible branch in the container)
# can also be a tagged release
# TODO: change this to two distinct variables, one for opam/dependency clone
# and a distinct one for the coda codebase in the next stage
ARG CODA_BRANCH=develop

# location of repo used for pins and external package commits
ARG CODA_DIR=coda

ENV PATH "$PATH:/usr/lib/go/bin:$HOME/.cargo/bin"

# git will clone into an empty dir, but this also helps us set the workdir in advance
RUN cd $HOME && rm -rf $HOME/${CODA_DIR} \
&& git clone \
-b "${CODA_BRANCH}" \
--depth 1 \
--shallow-submodules \
--recurse-submodules \
https://github.com/CodaProtocol/coda ${HOME}/${CODA_DIR}

WORKDIR $HOME/${CODA_DIR}

# Build libp2p_helper and clear go module caches
# Could maybe also delete go during this step / build it as part of the deps stage?
RUN git pull \
Expand All @@ -230,7 +250,6 @@ RUN git pull \

# Make rosetta-crucial components and the generate_keypair tool
RUN eval $(opam config env) \
&& git pull \
&& dune build --profile=${DUNE_PROFILE} \
src/app/generate_keypair/generate_keypair.exe \
src/app/cli/src/coda.exe \
Expand Down
11 changes: 11 additions & 0 deletions frontend/website/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"presets": ["next/babel"],
"plugins": [
["module-resolver", {
"root": ["./pages"],
"alias": {
"@reason": "./lib/js/src"
}
}]
]
}
6 changes: 3 additions & 3 deletions frontend/website/bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"bsc-stdlib-polyfill",
"bs-fetch"
],
"suffix": ".js",
"reason": {
"react-jsx": 3
},
"package-specs": {
"module": "es6"
"module": "commonjs"
},
"suffix": ".bs.js",
"bsc-flags": [
"-bs-super-errors",
"-open BscStdlibPolyfill"
],
"refmt": 3
}
}
4 changes: 2 additions & 2 deletions frontend/website/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ module.exports = withTM(withBundleAnalyzer(withMDX({

return pages;
},
pageExtensions: ['jsx', 'js', 'mdx'],
pageExtensions: ['jsx', 'js', 'mdx', 'bs.js'],
transpileModules: ['bs-platform', 'bs-css', 'bsc-stdlib-polyfill', 'bs-fetch'],
webpack(config, options) {
config.resolve.alias['@reason'] = path.join(__dirname, 'lib', 'es6', 'src');
config.resolve.alias['@reason'] = path.resolve(__dirname, 'lib', 'es6', 'src');
config.resolve.extensions.push('.bs.js');
return config
},
Expand Down
3 changes: 2 additions & 1 deletion frontend/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"emotion-server": "^10.0.17",
"isomorphic-unfetch": "^3.0.0",
"moment": "^2.26.0",
"next": "latest",
"next": "^9.5.3",
"next-transpile-modules": "2.3.1",
"nextjs-morph-page": "^2.0.3",
"react": "^16.8.6",
Expand All @@ -45,6 +45,7 @@
"@2fd/graphdoc": "^2.4.0",
"@babel/core": "^7.4.3",
"@next/bundle-analyzer": "^9.1.4",
"babel-plugin-module-resolver": "^4.0.0",
"bs-platform": "7.0.0-dev.1",
"concurrently": "^4.1.0",
"rehype-highlight": "^3.1.0"
Expand Down
2 changes: 1 addition & 1 deletion frontend/website/pages/docs/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default Page({title: "FAQ"});

#### Do I need any specific hardware?

Currently, a 4-core processor and 8 GB of RAM are the minimum requirements. In the near future though, GPUs may be required.
Currently, a 4-core processor and 8 GB of RAM are the minimum requirements. In the near future though, GPUs may be required.

#### What about software?

Expand Down
Loading

0 comments on commit dc7c8c4

Please sign in to comment.