Skip to content

Commit c3d6a89

Browse files
authored
Merge branch 'mono/dev' into generic_llm
2 parents 04d1fe9 + 0e980df commit c3d6a89

File tree

562 files changed

+31780
-3766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

562 files changed

+31780
-3766
lines changed

.github/workflows/0.7.0_mono_prepare_validate_publish.yaml

+12-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ jobs:
5858
strategy:
5959
matrix: ${{ fromJson(needs.set-matrix.outputs.matrix) }}
6060
fail-fast: false
61-
max-parallel: 5
6261
continue-on-error: true
6362
steps:
6463
- name: Checkout code
@@ -178,6 +177,17 @@ jobs:
178177
done
179178
rm -rf patches
180179
180+
- name: Configure SSH for deploy key
181+
run: |
182+
mkdir -p ~/.ssh
183+
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
184+
chmod 600 ~/.ssh/id_rsa
185+
# Add GitHub to known hosts to prevent interactive verification
186+
ssh-keyscan github.com >> ~/.ssh/known_hosts
187+
# Change remote URL to SSH so that git push uses the deploy key
188+
git remote set-url origin [email protected]:${{ github.repository }}.git
189+
190+
181191
- name: Git Commit and Push
182192
run: |
183193
git config user.name "github-actions[bot]"
@@ -186,7 +196,7 @@ jobs:
186196
if ! git diff-index --quiet HEAD; then
187197
git commit -m "chore: apply automatic formatting and lint fixes"
188198
git pull --rebase origin "${{ github.ref }}"
189-
git push origin HEAD:"${{ github.ref }}"
199+
git push origin HEAD:"${{ github.ref }}" --force
190200
else
191201
echo "No changes to commit."
192202
fi

.github/workflows/v0.7.0_mono_prepare_validate.yaml

+12-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
strategy:
5252
matrix: ${{ fromJson(needs.set-matrix.outputs.matrix) }}
5353
fail-fast: false
54+
continue-on-error: true
5455
steps:
5556
- name: Checkout code
5657
uses: actions/checkout@v3
@@ -164,6 +165,16 @@ jobs:
164165
done
165166
rm -rf patches
166167
168+
- name: Configure SSH for deploy key
169+
run: |
170+
mkdir -p ~/.ssh
171+
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
172+
chmod 600 ~/.ssh/id_rsa
173+
# Add GitHub to known hosts to prevent interactive verification
174+
ssh-keyscan github.com >> ~/.ssh/known_hosts
175+
# Change remote URL to SSH so that git push uses the deploy key
176+
git remote set-url origin [email protected]:${{ github.repository }}.git
177+
167178
- name: Git Commit and Push
168179
run: |
169180
git config user.name "github-actions[bot]"
@@ -172,7 +183,7 @@ jobs:
172183
if ! git diff-index --quiet HEAD; then
173184
git commit -m "chore: apply automatic formatting and lint fixes"
174185
git pull --rebase origin "${{ github.ref }}"
175-
git push origin HEAD:"${{ github.ref }}"
186+
git push origin HEAD:"${{ github.ref }}" --force
176187
else
177188
echo "No changes to commit."
178189
fi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
name: 0.7.3 - Single (Prepare, Validate)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
member:
7+
description: "Specify a specific member to run the workflow for (optional)"
8+
required: true
9+
10+
concurrency:
11+
group: dev-branch-prepare-workflow
12+
cancel-in-progress: false
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
# We'll continue on error to ensure we capture all issues and still produce patches/artifacts
18+
continue-on-error: true
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
- name: Setup Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.x'
27+
28+
- name: Install dependencies for testing
29+
run: |
30+
echo "::notice::Installing Python test dependencies..."
31+
pip install uv pytest toml
32+
33+
- name: Bump Version Placeholder
34+
run: |
35+
MEMBER="${{ github.event.inputs.member }}"
36+
if [ -z "$MEMBER" ]; then
37+
echo "::error::No member specified. Please provide a valid member name."
38+
exit 1
39+
fi
40+
41+
echo "::notice::Running bump version process for workspace member: $MEMBER"
42+
PACKAGE_NAME=$(python -c "import toml; print(toml.load('${{ github.workspace }}/pkgs/${{ github.event.inputs.member }}/pyproject.toml')['project']['name'])")
43+
echo "::notice::Package name detected: $PACKAGE_NAME"
44+
45+
uv run --active scripts/bump_pyproject_version.py --bump patch ${{ github.workspace }}/pkgs/${{ github.event.inputs.member }}/pyproject.toml
46+
47+
- name: Ruff format
48+
run: |
49+
cd pkgs
50+
MEMBER="${{ github.event.inputs.member }}"
51+
echo "::notice::Running Ruff format on $MEMBER"
52+
PACKAGE_NAME=$(python -c "import toml; print(toml.load('${{ github.workspace }}/pkgs/${MEMBER}/pyproject.toml')['project']['name'])")
53+
uv run --directory "$MEMBER" --package "$PACKAGE_NAME" --isolated --active ruff format .
54+
55+
- name: Ruff lint check & fix
56+
run: |
57+
cd pkgs
58+
MEMBER="${{ github.event.inputs.member }}"
59+
echo "::notice::Running Ruff lint check & fix on $MEMBER"
60+
PACKAGE_NAME=$(python -c "import toml; print(toml.load('${{ github.workspace }}/pkgs/${MEMBER}/pyproject.toml')['project']['name'])")
61+
uv run --directory "$MEMBER" --package "$PACKAGE_NAME" --isolated --active ruff check . --fix
62+
63+
- name: Run tests for member
64+
run: |
65+
cd pkgs
66+
MEMBER="${{ github.event.inputs.member }}"
67+
echo "::notice::Running tests for workspace member: $MEMBER"
68+
PACKAGE_NAME=$(python -c "import toml; print(toml.load('${{ github.workspace }}/pkgs/${MEMBER}/pyproject.toml')['project']['name'])")
69+
echo "::notice::Package name: $PACKAGE_NAME"
70+
71+
# We run tests; if they fail, let's output an annotation (but we don't stop the workflow).
72+
uv run --directory "$MEMBER" --package "$PACKAGE_NAME" --isolated --active pytest -vvv
73+
74+
- name: Create patch for changes
75+
if: always()
76+
run: |
77+
mkdir -p patches
78+
MEMBER="${{ github.event.inputs.member }}"
79+
SAFE_MEMBER=$(echo "$MEMBER" | tr '/' '-')
80+
echo "::notice::Creating patch file for changed files in $MEMBER..."
81+
git diff HEAD -- pkgs/"$MEMBER" > patches/patch_${SAFE_MEMBER}.patch
82+
83+
if [ ! -s "patches/patch_${SAFE_MEMBER}.patch" ]; then
84+
echo "::warning::No changes detected for $MEMBER, the patch file is empty."
85+
fi
86+
87+
- name: Set safe member variable
88+
if: always()
89+
id: set_safe_member
90+
run: |
91+
echo "SAFE_MEMBER=$(echo '${{ github.event.inputs.member }}' | tr '/' '-')" >> $GITHUB_OUTPUT
92+
echo "::notice::Safe member name set to $SAFE_MEMBER"
93+
94+
- name: Upload patch artifact
95+
if: always()
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: patch-${{ steps.set_safe_member.outputs.SAFE_MEMBER }}
99+
path: patches/patch_${{ steps.set_safe_member.outputs.SAFE_MEMBER }}.patch
100+
if-no-files-found: warn
101+
102+
commit:
103+
name: Commit Changes
104+
needs: test
105+
runs-on: ubuntu-latest
106+
if: always()
107+
steps:
108+
- name: Checkout code
109+
uses: actions/checkout@v3
110+
with:
111+
ref: ${{ github.ref }}
112+
113+
- name: Setup Python
114+
uses: actions/setup-python@v4
115+
with:
116+
python-version: '3.x'
117+
118+
- name: Download patch artifacts
119+
uses: actions/download-artifact@v4
120+
with:
121+
path: patches
122+
123+
- name: List downloaded artifacts
124+
run: |
125+
echo "::notice::Listing patch artifacts..."
126+
ls -R patches
127+
128+
- name: Apply patches
129+
run: |
130+
echo "::notice::Applying downloaded patches..."
131+
find patches -type f -name "*.patch" | while read patch; do
132+
echo "Applying patch $patch"
133+
git apply -p1 "$patch" || echo "::error::Failed to apply patch $patch"
134+
done
135+
rm -rf patches
136+
137+
- name: Configure SSH for deploy key
138+
run: |
139+
echo "::notice::Configuring SSH for deploy key..."
140+
mkdir -p ~/.ssh
141+
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
142+
chmod 600 ~/.ssh/id_rsa
143+
ssh-keyscan github.com >> ~/.ssh/known_hosts
144+
git remote set-url origin [email protected]:${{ github.repository }}.git
145+
146+
- name: Git Commit and Push
147+
run: |
148+
git config user.name "github-actions[bot]"
149+
git config user.email "github-actions[bot]@users.noreply.github.com"
150+
git add .
151+
if ! git diff-index --quiet HEAD; then
152+
echo "::notice::Changes detected; committing and pushing..."
153+
git commit -m "chore: apply automatic formatting and lint fixes"
154+
git pull --rebase origin "${{ github.ref }}"
155+
git push origin HEAD:"${{ github.ref }}" --force
156+
else
157+
echo "::notice::No changes to commit."
158+
fi

0 commit comments

Comments
 (0)