From 4de62562a60d7590aca225d6ee3dd307f686f9e1 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Mon, 3 Jun 2024 10:03:58 +0000 Subject: [PATCH] Fuse gh action. --- .github/workflows/tests.yaml | 48 +++++------------------------------- 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6c96f9fa..7c4a8336 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -17,7 +17,7 @@ concurrency: jobs: run_tests: - runs-on: [ubuntu-latest] + runs-on: [ubuntu-latest, intel-pvc-tgi] env: SCCACHE_GHA_ENABLED: "on" @@ -42,15 +42,18 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v1 - name: Clean unused files + if: runner.name != 'intel-pvc-tgi' run: | 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 - name: Install sccache + if: runner.name != 'intel-pvc-tgi' 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 chmod +x /usr/local/bin/sccache - name: configure sccache uses: actions/github-script@v6 + if: runner.name != 'intel-pvc-tgi' with: script: | 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}}-'); - name: cargo registry cache uses: actions/cache@v3 + if: runner.name != 'intel-pvc-tgi' with: key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }} restore-keys: | @@ -84,46 +88,6 @@ jobs: run: | cargo test - name: sccache stats + if: runner.name != 'intel-pvc-tgi' run: | /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