|
22 | 22 | paths: |
23 | 23 | - ".github/workflows/build_mlir_python_bindings_wheel.yml" |
24 | 24 | - "projects/mlir-python-bindings/**" |
| 25 | + - "projects/eudsl-python-extras/**" |
25 | 26 | - "third_party/llvm-project" |
26 | 27 | push: |
27 | 28 | branches: |
28 | 29 | - main |
29 | 30 | paths: |
30 | 31 | - ".github/workflows/build_mlir_python_bindings_wheel.yml" |
31 | 32 | - "projects/mlir-python-bindings/**" |
| 33 | + - "projects/eudsl-python-extras/**" |
32 | 34 | - "third_party/llvm-project" |
33 | 35 |
|
34 | 36 | concurrency: |
@@ -377,3 +379,139 @@ jobs: |
377 | 379 | replacesArtifacts: true |
378 | 380 | makeLatest: true |
379 | 381 | omitBody: true |
| 382 | + |
| 383 | + build-eudsl-python-extras: |
| 384 | + |
| 385 | + runs-on: ubuntu-22.04 |
| 386 | + |
| 387 | + name: "Build eudsl-python-extras sdist" |
| 388 | + |
| 389 | + defaults: |
| 390 | + run: |
| 391 | + shell: bash |
| 392 | + |
| 393 | + steps: |
| 394 | + - name: "Check out repository" |
| 395 | + |
| 396 | + with: |
| 397 | + submodules: false |
| 398 | + |
| 399 | + - name: "Install Python" |
| 400 | + |
| 401 | + with: |
| 402 | + python-version: "3.12" |
| 403 | + |
| 404 | + - name: "Install prereqs" |
| 405 | + run: python -m pip install setuptools |
| 406 | + |
| 407 | + - name: "Build eudsl-python-extras sdist" |
| 408 | + run: pushd projects/eudsl-python-extras && python setup.py sdist && popd |
| 409 | + |
| 410 | + - name: Upload eudsl-python-extras sdist |
| 411 | + uses: actions/upload-artifact@v4 |
| 412 | + with: |
| 413 | + path: projects/eudsl-python-extras/dist/*.tar.gz |
| 414 | + name: eudsl_python_extras_sdist_artifact |
| 415 | + |
| 416 | + test-eudsl-python-extras: |
| 417 | + |
| 418 | + needs: [build-eudsl-python-extras, build-mlir-python-bindings] |
| 419 | + |
| 420 | + strategy: |
| 421 | + fail-fast: false |
| 422 | + matrix: |
| 423 | + runs-on: [ |
| 424 | + "ubuntu-22.04", |
| 425 | + "ubuntu-22.04-arm", |
| 426 | + "macos-13", |
| 427 | + "macos-14", |
| 428 | + "windows-2022" |
| 429 | + ] |
| 430 | + python-version: [ |
| 431 | + # "3.10", "3.11", "3.12", |
| 432 | + "3.13", "3.14", "3.14t" |
| 433 | + ] |
| 434 | + include: [ |
| 435 | + {runs-on: "ubuntu-22.04", name: "ubuntu_x86_64", os: "ubuntu"}, |
| 436 | + {runs-on: "ubuntu-22.04-arm", name: "ubuntu_aarch64", os: "ubuntu"}, |
| 437 | + {runs-on: "windows-2022", name: "windows_x86_64", os: "windows"}, |
| 438 | + {runs-on: "macos-14", name: "macos_arm64", os: "macos"}, |
| 439 | + {runs-on: "macos-13", name: "macos_x86_64", os: "macos"} |
| 440 | + ] |
| 441 | + exclude: |
| 442 | + # <frozen importlib._bootstrap>:491: Warning: Numpy built with MINGW-W64 on Windows 64 bits is experimental, and only available for testing. You are advised not to use it for production. |
| 443 | + - runs-on: windows-2022 |
| 444 | + python-version: "3.14" |
| 445 | + |
| 446 | + - runs-on: windows-2022 |
| 447 | + python-version: "3.14t" |
| 448 | + |
| 449 | + runs-on: ${{ matrix.runs-on }} |
| 450 | + |
| 451 | + name: "Test eudsl-python-extras ${{ matrix.name }} ${{ matrix.python-version }}" |
| 452 | + |
| 453 | + defaults: |
| 454 | + run: |
| 455 | + shell: bash |
| 456 | + |
| 457 | + steps: |
| 458 | + - name: "Check out repository" |
| 459 | + |
| 460 | + with: |
| 461 | + submodules: false |
| 462 | + |
| 463 | + - name: "Install Python" |
| 464 | + |
| 465 | + with: |
| 466 | + python-version: "${{ matrix.python-version }}" |
| 467 | + |
| 468 | + - uses: actions/download-artifact@v4 |
| 469 | + with: |
| 470 | + name: mlir_python_bindings_${{ matrix.name }}_artifact |
| 471 | + path: wheelhouse |
| 472 | + |
| 473 | + - uses: actions/download-artifact@v4 |
| 474 | + with: |
| 475 | + name: eudsl_python_extras_sdist_artifact |
| 476 | + path: dist |
| 477 | + |
| 478 | + - name: "Install mlir-python-bindings" |
| 479 | + run: python -m pip install mlir-python-bindings -f wheelhouse |
| 480 | + |
| 481 | + - name: "Install eudsl-python-extras" |
| 482 | + run: python -m pip install dist/eudsl_python_extras*.tar.gz |
| 483 | + |
| 484 | + - name: "Test eudsl-python-extras" |
| 485 | + run: python -m pytest projects/eudsl-python-extras/tests |
| 486 | + |
| 487 | + release-eudsl-python-extras: |
| 488 | + |
| 489 | + if: (github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'workflow_dispatch' |
| 490 | + needs: [test-eudsl-python-extras] |
| 491 | + runs-on: "ubuntu-22.04" |
| 492 | + |
| 493 | + permissions: |
| 494 | + id-token: write |
| 495 | + contents: write |
| 496 | + |
| 497 | + name: "Release eudsl-python-extras" |
| 498 | + |
| 499 | + steps: |
| 500 | + |
| 501 | + - uses: actions/download-artifact@v4 |
| 502 | + with: |
| 503 | + name: eudsl_python_extras_sdist_artifact |
| 504 | + path: dist |
| 505 | + |
| 506 | + - name: Release current commit |
| 507 | + |
| 508 | + with: |
| 509 | + artifacts: "dist/eudsl_python_extras*.tar.gz" |
| 510 | + token: "${{ secrets.GITHUB_TOKEN }}" |
| 511 | + tag: eudsl-python-extras |
| 512 | + name: eudsl-python-extras |
| 513 | + removeArtifacts: false |
| 514 | + allowUpdates: true |
| 515 | + replacesArtifacts: true |
| 516 | + makeLatest: true |
| 517 | + omitBody: true |
0 commit comments