mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-10 03:44:54 +00:00
feat(ci): add sccache
This commit is contained in:
parent
2d39f199ae
commit
a375ab2976
25
.github/workflows/tests.yaml
vendored
25
.github/workflows/tests.yaml
vendored
@ -3,6 +3,7 @@ name: Server Tests
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
|
- ".github/workflows/tests.yaml"
|
||||||
- "server/**"
|
- "server/**"
|
||||||
- "proto/**"
|
- "proto/**"
|
||||||
- "router/**"
|
- "router/**"
|
||||||
@ -11,6 +12,12 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
run_tests:
|
run_tests:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
env:
|
||||||
|
SCCACHE_GHA_ENABLED: "on"
|
||||||
|
RUSTC_WRAPPER: /usr/local/bin/sccache
|
||||||
|
SCCACHE: 0.3.3
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
@ -25,12 +32,17 @@ jobs:
|
|||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
- name: Install Protoc
|
- name: Install Protoc
|
||||||
uses: arduino/setup-protoc@v1
|
uses: arduino/setup-protoc@v1
|
||||||
- name: Loading cache.
|
- name: Install sccache
|
||||||
uses: actions/cache@v2
|
run: |
|
||||||
id: model_cache
|
curl -fsSL https://github.com/mozilla/sccache/releases/download/v$SCCACHE/sccache-v$SCCACHE-x86_64-unknown-linux-musl.tar.gz
|
||||||
|
tar -xzv --strip-components=1 -C /usr/local/bin sccache-v$SCCACHE-x86_64-unknown-linux-musl/sccache
|
||||||
|
chmod +x /usr/local/bin/sccache
|
||||||
|
- name: Configure sccache
|
||||||
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/huggingface/
|
script: |
|
||||||
key: models
|
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||||
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
- name: Install
|
- name: Install
|
||||||
run: |
|
run: |
|
||||||
make install
|
make install
|
||||||
@ -41,3 +53,6 @@ jobs:
|
|||||||
- name: Run Rust tests
|
- name: Run Rust tests
|
||||||
run: |
|
run: |
|
||||||
cargo test
|
cargo test
|
||||||
|
- name: sccache stats
|
||||||
|
run: |
|
||||||
|
/usr/local/bin/sccache --show-stats
|
||||||
|
Loading…
Reference in New Issue
Block a user