Skip to content

CI: add ccache #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ jobs:
# Setup: checkout
- uses: actions/checkout@v2

# Setup: Store matrix name
- run: echo 'MATRIX_NAME=${{ matrix.arch }}-${{ matrix.toolchain }}-${{ matrix.config }}' >> $GITHUB_ENV

# Setup: Github cache
- uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ env.MATRIX_NAME  }}-ccache-${{ github.run_id }}
restore-keys: |
${{ env.MATRIX_NAME  }}-ccache-

# Setup: variables
- if: matrix.arch == 'x86_64'
run: |
Expand Down Expand Up @@ -194,6 +205,15 @@ jobs:
- run: |
curl -o bin/bindgen https://raw.githubusercontent.com/Rust-for-Linux/ci-bin/master/bindgen-0.56.0/bin/bindgen
chmod u+x bin/bindgen

# Setup: ccache
- run: |
sudo apt-get install ccache
echo '/usr/lib/ccache:$PATH' >> $GITHUB_PATH
echo 'CCACHE_COMPRESS=true' >> $GITHUB_ENV

# Setup: Check existing ccache
- run: ccache -s

# Setup: busybox
- run: git clone --depth 1 -b 1_30_1 https://github.com/mirror/busybox
Expand Down Expand Up @@ -376,3 +396,6 @@ jobs:

# Formatting
- run: make rustfmtcheck

# View changes to ccache
- run: ccache -s