Skip to content

Commit c337964

Browse files
committed
Resolve cache issue causing workflows to fail
1 parent b68327b commit c337964

File tree

2 files changed

+68
-28
lines changed

2 files changed

+68
-28
lines changed

.github/workflows/lint_master.yml

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,23 @@ on:
88
jobs:
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
@@ -27,10 +41,6 @@ jobs:
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
@@ -39,9 +49,6 @@ jobs:
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
@@ -91,9 +112,6 @@ jobs:
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

.github/workflows/pullrequest_check.yml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,23 @@ jobs:
1414
ts_and_rust_lint:
1515
if: github.event.pull_request.draft == false && github.event.pull_request.base.ref == 'master'
1616
runs-on: ubuntu-latest
17+
env:
18+
RUSTC_WRAPPER: sccache
19+
SCCACHE_GHA_ENABLED: "true"
20+
SCCACHE_DIR: /mnt/sccache
21+
SCCACHE_CACHE_SIZE: "8G"
22+
CARGO_TARGET_DIR: /mnt/target
23+
TMPDIR: /mnt/tmp
24+
TEMP: /mnt/tmp
25+
TMP: /mnt/tmp
1726
steps:
1827
- name: Checkout
1928
uses: actions/checkout@v2
29+
- name: Prepare build directories
30+
run: |
31+
sudo mkdir -p /mnt/target /mnt/sccache /mnt/tmp
32+
sudo chown -R runner:runner /mnt
33+
df -h
2034
- name: libudev-dev
2135
run: |
2236
sudo apt-get update
@@ -33,10 +47,6 @@ jobs:
3347
components: clippy
3448
- name: Install cargo-binstall
3549
uses: cargo-bins/cargo-binstall@v1.9.0
36-
- name: set sccache env var
37-
run: |
38-
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
39-
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
4050
- name: Run sccache-cache
4151
uses: mozilla-actions/sccache-action@v0.0.9
4252
- name: Install nj-cli
@@ -45,9 +55,6 @@ jobs:
4555
run: corepack enable
4656
- name: Install Build CLI tool
4757
run: cargo install --path=cli/development-cli --locked
48-
env:
49-
SCCACHE_GHA_ENABLED: "true"
50-
RUSTC_WRAPPER: "sccache"
5158
- name: install wasm-pack
5259
run: cargo binstall wasm-pack
5360
- name: JS/TS linting
@@ -66,9 +73,23 @@ jobs:
6673
integration_and_unit_tests:
6774
if: github.event.pull_request.draft == false && github.event.pull_request.base.ref == 'master'
6875
runs-on: ubuntu-latest
76+
env:
77+
RUSTC_WRAPPER: sccache
78+
SCCACHE_GHA_ENABLED: "true"
79+
SCCACHE_DIR: /mnt/sccache
80+
SCCACHE_CACHE_SIZE: "8G"
81+
CARGO_TARGET_DIR: /mnt/target
82+
TMPDIR: /mnt/tmp
83+
TEMP: /mnt/tmp
84+
TMP: /mnt/tmp
6985
steps:
7086
- name: Checkout
7187
uses: actions/checkout@v2
88+
- name: Prepare build directories
89+
run: |
90+
sudo mkdir -p /mnt/target /mnt/sccache /mnt/tmp
91+
sudo chown -R runner:runner /mnt
92+
df -h
7293
- name: libudev-dev
7394
run: |
7495
sudo apt-get update
@@ -84,10 +105,6 @@ jobs:
84105
override: true
85106
- name: Install cargo-binstall
86107
uses: cargo-bins/cargo-binstall@v1.9.0
87-
- name: set sccache env var
88-
run: |
89-
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
90-
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
91108
- name: Run sccache-cache
92109
uses: mozilla-actions/sccache-action@v0.0.9
93110
- name: Install nj-cli
@@ -98,9 +115,6 @@ jobs:
98115
corepack enable
99116
- name: Install Build CLI tool
100117
run: cargo install --path=cli/development-cli --locked
101-
env:
102-
SCCACHE_GHA_ENABLED: "true"
103-
RUSTC_WRAPPER: "sccache"
104118
- name: install wasm-pack
105119
run: cargo binstall wasm-pack
106120
- name: Execute tests
@@ -114,3 +128,7 @@ jobs:
114128
timeout-minutes: 30
115129
run: python3 integration_tests/run_all.py
116130
working-directory: ./cli/development-cli
131+
- name: Show sccache stats
132+
run: sccache --show-stats || true
133+
- name: Stop sccache
134+
run: sccache --stop-server || true

0 commit comments

Comments
 (0)