-
Notifications
You must be signed in to change notification settings - Fork 1.3k
113 lines (95 loc) · 3.38 KB
/
providers-list-deps.yml
File metadata and controls
113 lines (95 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Test ogx stack list-deps
run-name: Test ogx stack list-deps
on:
push:
branches:
- main
paths:
- 'src/ogx/cli/stack/list_deps.py'
- 'src/ogx/cli/stack/_list_deps.py'
- 'src/ogx/core/build.*'
- 'src/ogx/core/*.sh'
- '.github/workflows/providers-list-deps.yml'
- 'src/ogx/templates/**'
- 'pyproject.toml'
pull_request:
paths:
- 'src/ogx/cli/stack/list_deps.py'
- 'src/ogx/cli/stack/_list_deps.py'
- 'src/ogx/core/build.*'
- 'src/ogx/core/*.sh'
- '.github/workflows/providers-list-deps.yml'
- 'src/ogx/templates/**'
- 'pyproject.toml'
merge_group:
branches:
- main
- 'release-[0-9]+.[0-9]+.x'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
distros: ${{ steps.set-matrix.outputs.distros }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Generate Distribution List
id: set-matrix
run: |
distros=$(find src/ogx/distributions -mindepth 1 -maxdepth 1 -type d 2>/dev/null | \
awk -F'/' '{print $NF}' | \
grep -v '^__pycache__$' | \
grep -v '^ci-tests$' | \
jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "distros=$distros" >> "$GITHUB_OUTPUT"
list-deps:
needs: generate-matrix
runs-on: ubuntu-latest
strategy:
matrix:
distro: ${{ fromJson(needs.generate-matrix.outputs.distros) }}
image-type: [venv, container]
fail-fast: false # We want to run all jobs even if some fail
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
uses: ./.github/actions/setup-runner
- name: Print dependencies
run: |
uv run ogx stack list-deps ${{ matrix.distro }}
- name: Install Distro using ogx stack list-deps
run: |
# USE_COPY_NOT_MOUNT is set to true since mounting is not supported by docker buildx, we use COPY instead
# OGX_DIR is set to the current directory so we are building from the source
USE_COPY_NOT_MOUNT=true OGX_DIR=. uv run ogx stack list-deps ${{ matrix.distro }} | xargs -L1 uv pip install
- name: Print dependencies in the image
if: matrix.image-type == 'venv'
run: |
uv pip list
show-single-provider:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
uses: ./.github/actions/setup-runner
- name: Show a single provider
run: |
USE_COPY_NOT_MOUNT=true OGX_DIR=. uv run ogx stack list-deps --providers inference=remote::ollama
list-deps-from-config:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
uses: ./.github/actions/setup-runner
- name: list-des from Config
env:
USE_COPY_NOT_MOUNT: "true"
OGX_DIR: "."
run: |
uv run ogx stack list-deps src/ogx/distributions/ci-tests/config.yaml