mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-29 12:30:17 +00:00
Fuse gh action.
This commit is contained in:
parent
3b082fe5f3
commit
4de62562a6
48
.github/workflows/tests.yaml
vendored
48
.github/workflows/tests.yaml
vendored
@ -17,7 +17,7 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run_tests:
|
run_tests:
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: [ubuntu-latest, intel-pvc-tgi]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SCCACHE_GHA_ENABLED: "on"
|
SCCACHE_GHA_ENABLED: "on"
|
||||||
@ -42,15 +42,18 @@ jobs:
|
|||||||
- name: Install Protoc
|
- name: Install Protoc
|
||||||
uses: arduino/setup-protoc@v1
|
uses: arduino/setup-protoc@v1
|
||||||
- name: Clean unused files
|
- name: Clean unused files
|
||||||
|
if: runner.name != 'intel-pvc-tgi'
|
||||||
run: |
|
run: |
|
||||||
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
|
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
|
||||||
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
|
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
|
||||||
- name: Install sccache
|
- name: Install sccache
|
||||||
|
if: runner.name != 'intel-pvc-tgi'
|
||||||
run: |
|
run: |
|
||||||
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
|
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
|
chmod +x /usr/local/bin/sccache
|
||||||
- name: configure sccache
|
- name: configure sccache
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
|
if: runner.name != 'intel-pvc-tgi'
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||||
@ -59,6 +62,7 @@ jobs:
|
|||||||
core.exportVariable('SCCACHE_GHA_CACHE_FROM', 'sccache-${{runner.os}}-main,sccache-${{runner.os}}-');
|
core.exportVariable('SCCACHE_GHA_CACHE_FROM', 'sccache-${{runner.os}}-main,sccache-${{runner.os}}-');
|
||||||
- name: cargo registry cache
|
- name: cargo registry cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
if: runner.name != 'intel-pvc-tgi'
|
||||||
with:
|
with:
|
||||||
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }}
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
@ -84,46 +88,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cargo test
|
cargo test
|
||||||
- name: sccache stats
|
- name: sccache stats
|
||||||
|
if: runner.name != 'intel-pvc-tgi'
|
||||||
run: |
|
run: |
|
||||||
/usr/local/bin/sccache --show-stats
|
/usr/local/bin/sccache --show-stats
|
||||||
|
|
||||||
run_tests_intel_xpu:
|
|
||||||
runs-on:
|
|
||||||
group: intel-pvc-tgi
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: 3.9
|
|
||||||
- name: Install Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
# Released on: 02 May, 2024
|
|
||||||
# https://releases.rs/docs/1.78.0/
|
|
||||||
toolchain: 1.78.0
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Install Protoc
|
|
||||||
uses: arduino/setup-protoc@v1
|
|
||||||
- name: Clean unused files
|
|
||||||
run: |
|
|
||||||
rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
|
|
||||||
rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
|
|
||||||
- name: Install
|
|
||||||
run: |
|
|
||||||
make install
|
|
||||||
- name: Run server tests
|
|
||||||
run: |
|
|
||||||
pip install pytest
|
|
||||||
export HUGGING_FACE_HUB_TOKEN=${{ secrets.HUGGING_FACE_HUB_TOKEN }}
|
|
||||||
pytest -s -vv server/tests
|
|
||||||
- name: Pre-commit checks
|
|
||||||
run: |
|
|
||||||
pip install pre-commit
|
|
||||||
pre-commit install
|
|
||||||
pre-commit run --all-files
|
|
||||||
- name: Run Rust tests
|
|
||||||
run: |
|
|
||||||
cargo test
|
|
||||||
|
Loading…
Reference in New Issue
Block a user