Skip to content

Commit 3366fc3

Browse files
authored
chore: try to use sccache in CI (#345)
1 parent c5c1fdc commit 3366fc3

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"adm-zip": "^0.4.14",
7676
"aws-sdk": "^2.674.0",
7777
"axios": "^0.19.2",
78-
"boxednode": "^1.2.3",
78+
"boxednode": "^1.3.0",
7979
"browserify": "^16.5.0",
8080
"chai": "^4.2.0",
8181
"command-exists": "^1.2.9",

packages/build/src/signable-compiler.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ class SignableCompiler {
3232
sourceFile: this.sourceFile,
3333
targetFile: this.targetFile,
3434
nodeVersionRange: this.nodeVersionRange,
35-
namespace: 'mongosh'
35+
namespace: 'mongosh',
36+
env: {
37+
...process.env,
38+
// Custom env vars for sccache:
39+
AWS_ACCESS_KEY_ID: process.env.DEVTOOLS_CI_AWS_KEY,
40+
AWS_SECRET_ACCESS_KEY: process.env.DEVTOOLS_CI_AWS_SECRET
41+
}
3642
});
3743
}
3844
}

scripts/docker/ubuntu16.04-build.Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ RUN add-apt-repository ppa:ubuntu-toolchain-r/test
1414
RUN apt-get update
1515
RUN apt-get -y -qq install nodejs g++-6 rpm
1616

17-
ENV CC=gcc-6
18-
ENV CXX=g++-6
17+
# Add sccache
18+
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
19+
20+
ENV CC="sccache gcc-6"
21+
ENV CXX="sccache g++-6"
1922

2023
ENTRYPOINT [ "bash" ]

0 commit comments

Comments
 (0)