Skip to content

Commit

Permalink
chore: try to use sccache in CI (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax authored Sep 29, 2020
1 parent c5c1fdc commit 3366fc3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"adm-zip": "^0.4.14",
"aws-sdk": "^2.674.0",
"axios": "^0.19.2",
"boxednode": "^1.2.3",
"boxednode": "^1.3.0",
"browserify": "^16.5.0",
"chai": "^4.2.0",
"command-exists": "^1.2.9",
Expand Down
8 changes: 7 additions & 1 deletion packages/build/src/signable-compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ class SignableCompiler {
sourceFile: this.sourceFile,
targetFile: this.targetFile,
nodeVersionRange: this.nodeVersionRange,
namespace: 'mongosh'
namespace: 'mongosh',
env: {
...process.env,
// Custom env vars for sccache:
AWS_ACCESS_KEY_ID: process.env.DEVTOOLS_CI_AWS_KEY,
AWS_SECRET_ACCESS_KEY: process.env.DEVTOOLS_CI_AWS_SECRET
}
});
}
}
Expand Down
7 changes: 5 additions & 2 deletions scripts/docker/ubuntu16.04-build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update
RUN apt-get -y -qq install nodejs g++-6 rpm

ENV CC=gcc-6
ENV CXX=g++-6
# Add sccache
RUN curl -L https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz | tar -C /usr/local/bin -xzvf - --strip=1 sccache-0.2.13-x86_64-unknown-linux-musl/sccache

ENV CC="sccache gcc-6"
ENV CXX="sccache g++-6"

ENTRYPOINT [ "bash" ]

0 comments on commit 3366fc3

Please sign in to comment.