88jobs :
99 rust_and_ts_lint :
1010 runs-on : ubuntu-latest
11+ env :
12+ RUSTC_WRAPPER : sccache
13+ SCCACHE_GHA_ENABLED : " true"
14+ SCCACHE_DIR : /mnt/sccache
15+ SCCACHE_CACHE_SIZE : " 8G"
16+ CARGO_TARGET_DIR : /mnt/target
17+ TMPDIR : /mnt/tmp
18+ TEMP : /mnt/tmp
19+ TMP : /mnt/tmp
1120 steps :
1221 - name : Checkout
1322 uses : actions/checkout@v2
23+ - name : Prepare build directories
24+ run : |
25+ sudo mkdir -p /mnt/target /mnt/sccache /mnt/tmp
26+ sudo chown -R runner:runner /mnt
27+ df -h
1428 - name : libudev-dev
1529 run : |
1630 sudo apt-get update
2741 components : clippy
2842 - name : Install cargo-binstall
2943 uses : cargo-bins/cargo-binstall@v1.9.0
30- - name : set sccache env var
31- run : |
32- echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
33- echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
3444 - name : Run sccache-cache
3545 uses : mozilla-actions/sccache-action@v0.0.9
3646 - name : Install nj-cli
3949 run : corepack enable
4050 - name : Install Build CLI tool
4151 run : cargo install --path=cli/development-cli --locked
42- env :
43- SCCACHE_GHA_ENABLED : " true"
44- RUSTC_WRAPPER : " sccache"
4552 - name : install wasm-pack
4653 run : cargo binstall wasm-pack
4754 - name : JS/TS linting
@@ -56,12 +63,30 @@ jobs:
5663 - name : TypeScript Check - Platform Application
5764 working-directory : application/platform
5865 run : yarn run check
66+ - name : Show sccache stats
67+ run : sccache --show-stats || true
68+ - name : Stop sccache
69+ run : sccache --stop-server || true
5970
6071 integration_and_unit_tests :
6172 runs-on : ubuntu-latest
73+ env :
74+ RUSTC_WRAPPER : sccache
75+ SCCACHE_GHA_ENABLED : " true"
76+ SCCACHE_DIR : /mnt/sccache
77+ SCCACHE_CACHE_SIZE : " 8G"
78+ CARGO_TARGET_DIR : /mnt/target
79+ TMPDIR : /mnt/tmp
80+ TEMP : /mnt/tmp
81+ TMP : /mnt/tmp
6282 steps :
6383 - name : Checkout
6484 uses : actions/checkout@v2
85+ - name : Prepare build directories
86+ run : |
87+ sudo mkdir -p /mnt/target /mnt/sccache /mnt/tmp
88+ sudo chown -R runner:runner /mnt
89+ df -h
6590 - name : libudev-dev
6691 run : |
6792 sudo apt-get update
@@ -77,10 +102,6 @@ jobs:
77102 override : true
78103 - name : Install cargo-binstall
79104 uses : cargo-bins/cargo-binstall@v1.9.0
80- - name : set sccache env var
81- run : |
82- echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
83- echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
84105 - name : Run sccache-cache
85106 uses : mozilla-actions/sccache-action@v0.0.9
86107 - name : Install nj-cli
91112 corepack enable
92113 - name : Install Build CLI tool
93114 run : cargo install --path=cli/development-cli --locked
94- env :
95- SCCACHE_GHA_ENABLED : " true"
96- RUSTC_WRAPPER : " sccache"
97115 - name : install wasm-pack
98116 run : cargo binstall wasm-pack
99117 - name : Execute tests
@@ -102,3 +120,7 @@ jobs:
102120 # Environment variable is needed for snapshot testing in Rust via `insta` crate
103121 CI : true
104122 run : cargo chipmunk test -u immediate
123+ - name : Show sccache stats
124+ run : sccache --show-stats || true
125+ - name : Stop sccache
126+ run : sccache --stop-server || true
0 commit comments