Repository navigation
105 lines (97 loc) · 3.48 KB
/
Copy pathpython-install-matrix.yml
File metadata and controls
105 lines (97 loc) · 3.48 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
name: Python install matrix
# `pip install ciris-agent` must install from wheels on every Python we let users
# run. It did not on 3.15 (#1383): the openai<2 pin made pip backtrack instructor
# to 1.12.0, which pinned an old jiter with no cp315 wheel, so pip tried to compile
# it and failed. The rest of CI ran 3.10/3.12 only, where every wheel exists.
#
# Each job installs requirements.txt with --only-binary :all:, so any dependency
# that would have to build from source fails here instead of on a user's machine.
# Then it installs the agent itself and imports the LLM stack.
#
# The weekly run catches upstream releases that change the resolve without a
# change in this repo.
on:
pull_request:
paths:
- 'requirements.txt'
- 'ciris_engine/upgrade.py'
- 'ciris_engine/_upgrade_helper.py'
- 'ciris_engine/cli.py'
- 'setup.py'
- 'pyproject.toml'
- '.github/workflows/python-install-matrix.yml'
push:
branches: [main]
paths:
- 'requirements.txt'
- 'ciris_engine/upgrade.py'
- 'ciris_engine/_upgrade_helper.py'
- 'ciris_engine/cli.py'
- 'setup.py'
- 'pyproject.toml'
- '.github/workflows/python-install-matrix.yml'
schedule:
- cron: '17 6 * * 1'
workflow_dispatch:
permissions:
contents: read
jobs:
install:
name: ${{ matrix.os }} / Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-latest]
# 3.10 is python_requires' floor; 3.13-3.15 are where new wheels lag.
python: ['3.10', '3.13', '3.14', '3.15']
env:
PYTHONUTF8: '1'
PIP_DISABLE_PIP_VERSION_CHECK: '1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Install dependencies from wheels only
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install --only-binary :all: -r requirements.txt
- name: Install the agent
shell: bash
run: python -m pip install --no-deps .
- name: Import the LLM stack
shell: bash
run: |
python - <<'EOF'
import importlib.metadata as md
import instructor
import jiter
import openai
from ciris_engine.logic.services.runtime.llm_service.service import OpenAICompatibleClient
for name in ("ciris-agent", "openai", "instructor", "jiter"):
print(f"{name}=={md.version(name)}")
EOF
- name: The upgrade command names this interpreter
shell: bash
env:
# Only --help runs; no agent starts. Declared so the run-kind gate stays exact.
CIRIS_TRACE_RUN_KIND: qa
run: |
# `ciris-agent upgrade` is the supported upgrade path; its module form is
# what /v1/system/health hands a client (install.upgrade_argv).
python -m ciris_engine.cli upgrade --help
python - <<'EOF'
import os, sys
from ciris_engine.upgrade import upgrade_argv, upgrade_command
argv = upgrade_argv()
assert os.path.samefile(argv[0], sys.executable), (argv, sys.executable)
assert argv[1:] == ["-m", "ciris_engine.cli", "upgrade"], argv
print(upgrade_command())
EOF
- name: Dependency tree is consistent
shell: bash
run: python -m pip check