Skip to content

Commit bb0876b

Browse files
vjgit96Adam-Aghili
authored andcommitted
fix(ci): add missing SDK build step to cross-platform workflow_dispatch (#12536)
The build-if-needed job (used for workflow_dispatch) was not building the langflow-sdk package. Since lfx depends on langflow-sdk>=0.1.0 and langflow-sdk is not yet published to PyPI, all test jobs failed during lfx installation with 'No solution found'. Changes: - Build langflow-sdk wheel in build-if-needed job - Upload SDK artifact and output sdk-artifact-name - Update SDK download conditions with build-if-needed fallback - Update SDK+LFX combined/individual install conditions to properly route through the combined installer when both are available
1 parent f2c9cb3 commit bb0876b

1 file changed

Lines changed: 23 additions & 12 deletions

File tree

.github/workflows/cross-platform-test.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
base-artifact-name: ${{ steps.set-names.outputs.base-artifact-name }}
4242
main-artifact-name: ${{ steps.set-names.outputs.main-artifact-name }}
4343
lfx-artifact-name: ${{ steps.set-names.outputs.lfx-artifact-name }}
44+
sdk-artifact-name: ${{ steps.set-names.outputs.sdk-artifact-name }}
4445
steps:
4546
- name: Checkout code
4647
uses: actions/checkout@v6
@@ -67,13 +68,22 @@ jobs:
6768
run: |
6869
cd src/lfx
6970
uv build --wheel --out-dir dist
71+
- name: Build SDK package
72+
run: |
73+
cd src/sdk
74+
uv build --wheel --out-dir dist
7075
- name: Build main package
7176
run: make build_langflow args="--wheel"
7277
- name: Upload lfx artifact
7378
uses: actions/upload-artifact@v6
7479
with:
7580
name: adhoc-dist-lfx
7681
path: src/lfx/dist
82+
- name: Upload SDK artifact
83+
uses: actions/upload-artifact@v6
84+
with:
85+
name: adhoc-dist-sdk
86+
path: src/sdk/dist
7787
- name: Upload base artifact
7888
uses: actions/upload-artifact@v6
7989
with:
@@ -90,6 +100,7 @@ jobs:
90100
echo "base-artifact-name=adhoc-dist-base" >> $GITHUB_OUTPUT
91101
echo "main-artifact-name=adhoc-dist-main" >> $GITHUB_OUTPUT
92102
echo "lfx-artifact-name=adhoc-dist-lfx" >> $GITHUB_OUTPUT
103+
echo "sdk-artifact-name=adhoc-dist-sdk" >> $GITHUB_OUTPUT
93104
94105
test-installation-stable:
95106
name: Install & Run - ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.python-version }}
@@ -177,10 +188,10 @@ jobs:
177188

178189
# Download artifacts for wheel installation
179190
- name: Download langflow-sdk package artifact
180-
if: steps.install-method.outputs.method == 'wheel' && inputs.sdk-artifact-name != ''
191+
if: steps.install-method.outputs.method == 'wheel' && (inputs.sdk-artifact-name != '' || needs.build-if-needed.outputs.sdk-artifact-name != '')
181192
uses: actions/download-artifact@v7
182193
with:
183-
name: ${{ inputs.sdk-artifact-name }}
194+
name: ${{ inputs.sdk-artifact-name || needs.build-if-needed.outputs.sdk-artifact-name || 'adhoc-dist-sdk' }}
184195
path: ./sdk-dist
185196

186197
- name: Download LFX package artifact
@@ -211,7 +222,7 @@ jobs:
211222

212223
# Wheel installation steps — install SDK and LFX together when both are present.
213224
- name: Install SDK and LFX packages from wheel (Windows)
214-
if: steps.install-method.outputs.method == 'wheel' && matrix.os == 'windows' && inputs.sdk-artifact-name != '' && inputs.lfx-artifact-name != ''
225+
if: steps.install-method.outputs.method == 'wheel' && matrix.os == 'windows' && (inputs.sdk-artifact-name != '' || needs.build-if-needed.outputs.sdk-artifact-name != '') && (inputs.lfx-artifact-name != '' || needs.build-if-needed.outputs.lfx-artifact-name != '')
215226
run: |
216227
ls -la ./sdk-dist/
217228
find ./sdk-dist -name "*.whl" -type f
@@ -228,7 +239,7 @@ jobs:
228239
shell: bash
229240

230241
- name: Install SDK package from wheel (Windows)
231-
if: steps.install-method.outputs.method == 'wheel' && matrix.os == 'windows' && inputs.sdk-artifact-name != '' && inputs.lfx-artifact-name == ''
242+
if: steps.install-method.outputs.method == 'wheel' && matrix.os == 'windows' && (inputs.sdk-artifact-name != '' || needs.build-if-needed.outputs.sdk-artifact-name != '') && (inputs.lfx-artifact-name == '' && needs.build-if-needed.outputs.lfx-artifact-name == '')
232243
run: |
233244
WHEEL_FILE=$(find ./sdk-dist -name "*.whl" -type f | head -1)
234245
if [ -n "$WHEEL_FILE" ]; then
@@ -240,7 +251,7 @@ jobs:
240251
shell: bash
241252

242253
- name: Install LFX package from wheel (Windows)
243-
if: steps.install-method.outputs.method == 'wheel' && matrix.os == 'windows' && (inputs.lfx-artifact-name != '' || needs.build-if-needed.outputs.lfx-artifact-name != '') && inputs.sdk-artifact-name == ''
254+
if: steps.install-method.outputs.method == 'wheel' && matrix.os == 'windows' && (inputs.lfx-artifact-name != '' || needs.build-if-needed.outputs.lfx-artifact-name != '') && (inputs.sdk-artifact-name == '' && needs.build-if-needed.outputs.sdk-artifact-name == '')
244255
run: |
245256
ls -la ./lfx-dist/
246257
find ./lfx-dist -name "*.whl" -type f
@@ -282,7 +293,7 @@ jobs:
282293
shell: bash
283294

284295
- name: Install SDK and LFX packages from wheel (Unix)
285-
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows' && inputs.sdk-artifact-name != '' && inputs.lfx-artifact-name != ''
296+
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows' && (inputs.sdk-artifact-name != '' || needs.build-if-needed.outputs.sdk-artifact-name != '') && (inputs.lfx-artifact-name != '' || needs.build-if-needed.outputs.lfx-artifact-name != '')
286297
run: |
287298
ls -la ./sdk-dist/
288299
find ./sdk-dist -name "*.whl" -type f
@@ -299,7 +310,7 @@ jobs:
299310
shell: bash
300311

301312
- name: Install SDK package from wheel (Unix)
302-
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows' && inputs.sdk-artifact-name != '' && inputs.lfx-artifact-name == ''
313+
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows' && (inputs.sdk-artifact-name != '' || needs.build-if-needed.outputs.sdk-artifact-name != '') && (inputs.lfx-artifact-name == '' && needs.build-if-needed.outputs.lfx-artifact-name == '')
303314
run: |
304315
WHEEL_FILE=$(find ./sdk-dist -name "*.whl" -type f | head -1)
305316
if [ -n "$WHEEL_FILE" ]; then
@@ -311,7 +322,7 @@ jobs:
311322
shell: bash
312323

313324
- name: Install LFX package from wheel (Unix)
314-
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows' && (inputs.lfx-artifact-name != '' || needs.build-if-needed.outputs.lfx-artifact-name != '') && inputs.sdk-artifact-name == ''
325+
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows' && (inputs.lfx-artifact-name != '' || needs.build-if-needed.outputs.lfx-artifact-name != '') && (inputs.sdk-artifact-name == '' && needs.build-if-needed.outputs.sdk-artifact-name == '')
315326
run: |
316327
ls -la ./lfx-dist/
317328
find ./lfx-dist -name "*.whl" -type f
@@ -541,10 +552,10 @@ jobs:
541552

542553
# Download artifacts for wheel installation
543554
- name: Download langflow-sdk package artifact
544-
if: steps.install-method.outputs.method == 'wheel' && inputs.sdk-artifact-name != ''
555+
if: steps.install-method.outputs.method == 'wheel' && (inputs.sdk-artifact-name != '' || needs.build-if-needed.outputs.sdk-artifact-name != '')
545556
uses: actions/download-artifact@v7
546557
with:
547-
name: ${{ inputs.sdk-artifact-name }}
558+
name: ${{ inputs.sdk-artifact-name || needs.build-if-needed.outputs.sdk-artifact-name || 'adhoc-dist-sdk' }}
548559
path: ./sdk-dist
549560

550561
- name: Download LFX package artifact
@@ -575,7 +586,7 @@ jobs:
575586

576587
# Wheel installation steps — install langflow-sdk before LFX (sdk is not yet on PyPI)
577588
- name: Install langflow-sdk from wheel (Windows)
578-
if: steps.install-method.outputs.method == 'wheel' && matrix.os == 'windows' && inputs.sdk-artifact-name != ''
589+
if: steps.install-method.outputs.method == 'wheel' && matrix.os == 'windows' && (inputs.sdk-artifact-name != '' || needs.build-if-needed.outputs.sdk-artifact-name != '')
579590
run: |
580591
WHEEL_FILE=$(find ./sdk-dist -name "*.whl" -type f | head -1)
581592
if [ -n "$WHEEL_FILE" ]; then
@@ -587,7 +598,7 @@ jobs:
587598
shell: bash
588599

589600
- name: Install langflow-sdk from wheel (Unix)
590-
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows' && inputs.sdk-artifact-name != ''
601+
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows' && (inputs.sdk-artifact-name != '' || needs.build-if-needed.outputs.sdk-artifact-name != '')
591602
run: |
592603
WHEEL_FILE=$(find ./sdk-dist -name "*.whl" -type f | head -1)
593604
if [ -n "$WHEEL_FILE" ]; then

0 commit comments

Comments
 (0)