Skip to content

Commit

Permalink
Misc CI updates and multi-platform support (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Jul 23, 2024
1 parent 9337b86 commit c45aecd
Show file tree
Hide file tree
Showing 28 changed files with 124 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_publish_docker_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
build_and_publish_docker_image:
publish:
strategy:
fail-fast: true
matrix:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
name: Quality Check
name: Quality Checks

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
run_quality_checks:
quality:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@ name: PYPI Release
on:
workflow_dispatch:

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
build_and_publish:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ name: Security Checks
on:
push:

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: read

jobs:
secrets:
runs-on: ubuntu-latest
steps:
- shell: bash
- name: Set up environment variables
shell: bash
run: |
if [ "${{ github.event_name }}" == "push" ]; then
echo "depth=$(($(jq length <<< '${{ toJson(github.event.commits) }}') + 2))" >> $GITHUB_ENV
Expand All @@ -20,10 +25,12 @@ jobs:
echo "depth=$((${{ github.event.pull_request.commits }}+2))" >> $GITHUB_ENV
echo "branch=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
fi
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{env.branch}}
fetch-depth: ${{env.depth}}

- name: Scan for secrets
uses: trufflesecurity/trufflehog@main
4 changes: 2 additions & 2 deletions .github/workflows/test_api_cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_api_misc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_api_rocm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
runs-on: [single-gpu, amd-gpu, mi250, ci]

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Set target devices
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cli_cpu_neural_compressor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cli_cpu_onnxruntime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cli_cpu_openvino.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cli_cpu_py_txi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cli_cpu_pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_cli_cuda_onnxruntime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run tests
uses: addnab/docker-run-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cli_cuda_py_txi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_cli_cuda_pytorch_multi_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run tests
uses: addnab/docker-run-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_cli_cuda_pytorch_single_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run tests
uses: addnab/docker-run-action@v3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CLI CUDA TensorRT-LLM Tests
name: CLI CUDA TensorRT-LLM Single-GPU Tests

on:
workflow_dispatch:
Expand Down Expand Up @@ -29,12 +29,12 @@ env:
IMAGE: huggingface/optimum-nvidia:latest

jobs:
cli_cuda_tensorrt_llm_tests:
cli_cuda_tensorrt_llm_single_gpu_tests:
runs-on: [single-gpu, nvidia-gpu, a10, ci]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run tests
uses: addnab/docker-run-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cli_cuda_torch_ort_multi_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ env:
IMAGE: ghcr.io/huggingface/optimum-benchmark:latest-cuda-ort

jobs:
build_image_and_run_cli_cuda_torch_ort_multi_gpu_tests:
run_cli_cuda_torch_ort_multi_gpu_tests:
runs-on: [multi-gpu, nvidia-gpu, 4-a10, ci]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run tests
uses: addnab/docker-run-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cli_cuda_torch_ort_single_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ env:
IMAGE: ghcr.io/huggingface/optimum-benchmark:latest-cuda-ort

jobs:
build_image_and_run_cli_cuda_torch_ort_single_gpu_tests:
run_cli_cuda_torch_ort_single_gpu_tests:
runs-on: [single-gpu, nvidia-gpu, a10, ci]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run tests
uses: addnab/docker-run-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cli_cuda_vllm_single_gpu.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CLI CUDA vLLM Tests
name: CLI CUDA vLLM Single-GPU Tests

on:
workflow_dispatch:
Expand Down Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run tests
uses: addnab/docker-run-action@v3
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test_cli_misc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,22 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest, "macos-latest", windows-latest]
python: ["3.8", "3.12"]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install packages
- name: Install Linux packages
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y numactl
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_cli_rocm_pytorch_multi_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set target devices
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_cli_rocm_pytorch_single_gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set target devices
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_llm_perf_cuda_pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
IMAGE: ghcr.io/huggingface/optimum-benchmark:latest-cuda

jobs:
build_image_and_run_benchmarks:
run_benchmarks:
strategy:
fail-fast: false
matrix:
Expand All @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run benchmarks
uses: addnab/docker-run-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_llm_perf_leaderboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
Expand Down
Loading

0 comments on commit c45aecd

Please sign in to comment.