File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 6262 # Setup: checkout
6363 - uses : actions/checkout@v2
6464
65+ # Setup: Store matrix name
66+ - run : echo 'MATRIX_NAME=${{ matrix.arch }}-${{ matrix.toolchain }}-${{ matrix.config }}' >> $GITHUB_ENV
67+
68+ # Setup: Github cache
69+ - uses : actions/cache@v2
70+ with :
71+ path : ~/.ccache
72+ key : ${{ env.MATRIX_NAME }}-ccache-${{ github.run_id }}
73+ restore-keys : |
74+ ${{ env.MATRIX_NAME }}-ccache-
75+
6576 # Setup: variables
6677 - if : matrix.arch == 'x86_64'
6778 run : |
@@ -194,6 +205,15 @@ jobs:
194205 - run : |
195206 curl -o bin/bindgen https://raw.githubusercontent.com/Rust-for-Linux/ci-bin/master/bindgen-0.56.0/bin/bindgen
196207 chmod u+x bin/bindgen
208+
209+ # Setup: ccache
210+ - run : |
211+ sudo apt-get install ccache
212+ echo '/usr/lib/ccache:$PATH' >> $GITHUB_PATH
213+ echo 'CCACHE_COMPRESS=true' >> $GITHUB_ENV
214+
215+ # Setup: Check existing ccache
216+ - run : ccache -s
197217
198218 # Setup: busybox
199219 - run : git clone --depth 1 -b 1_30_1 https://github.com/mirror/busybox
@@ -376,3 +396,6 @@ jobs:
376396
377397 # Formatting
378398 - run : make rustfmtcheck
399+
400+ # View changes to ccache
401+ - run : ccache -s
You can’t perform that action at this time.
0 commit comments