|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + run_tests: |
| 7 | + name: Run Tests |
| 8 | + runs-on: ${{ matrix.os }} |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + os: [ubuntu-latest] |
| 12 | + python-version: ['3.14.2'] |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Checkout CinderX |
| 16 | + uses: actions/checkout@v6 |
| 17 | + |
| 18 | + - name: Set up Python |
| 19 | + uses: actions/setup-python@v6 |
| 20 | + with: |
| 21 | + python-version: ${{ matrix.python-version }} |
| 22 | + |
| 23 | + - name: Set up uv |
| 24 | + uses: astral-sh/setup-uv@v7 |
| 25 | + |
| 26 | + - name: Create venv |
| 27 | + run: uv venv --python ${{ matrix.python-version }} |
| 28 | + |
| 29 | + - name: Build CinderX |
| 30 | + run: uv build --wheel --python ${{ matrix.python-version }} |
| 31 | + |
| 32 | + - name: Install CinderX |
| 33 | + run: uv pip install dist/*.whl |
| 34 | + |
| 35 | + - name: Check CinderX loads successfully |
| 36 | + run: | |
| 37 | + uv run python -c 'import cinderx ; print(cinderx.get_import_error()) ; assert cinderx.is_initialized()' |
| 38 | +
|
| 39 | + - name: Install Pytest |
| 40 | + run: uv pip install pytest |
| 41 | + |
| 42 | + - name: Run Tests |
| 43 | + run: uv run pytest cinderx/PythonLib/test_cinderx/test*.py |
| 44 | + |
| 45 | + build_wheels: |
| 46 | + name: Build wheels on ${{ matrix.os }} |
| 47 | + runs-on: ${{ matrix.os }} |
| 48 | + strategy: |
| 49 | + matrix: |
| 50 | + os: [ubuntu-latest] |
| 51 | + |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v6 |
| 54 | + |
| 55 | + # cibuildwheel uses a docker container so the Python version is irrelevant |
| 56 | + # here. |
| 57 | + - uses: actions/setup-python@v6 |
| 58 | + |
| 59 | + - name: Install cibuildwheel |
| 60 | + run: python -m pip install cibuildwheel |
| 61 | + |
| 62 | + - name: Build wheels |
| 63 | + run: python -m cibuildwheel --output-dir wheelhouse |
| 64 | + |
| 65 | + build_sdist: |
| 66 | + name: Build source distribution |
| 67 | + runs-on: ${{ matrix.os }} |
| 68 | + strategy: |
| 69 | + matrix: |
| 70 | + os: [ubuntu-latest] |
| 71 | + python-version: ['3.14.2'] |
| 72 | + |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v6 |
| 75 | + |
| 76 | + - uses: actions/setup-python@v6 |
| 77 | + with: |
| 78 | + python-version: ${{ matrix.python-version }} |
| 79 | + |
| 80 | + - name: Install build tools |
| 81 | + run: python -m pip install build |
| 82 | + |
| 83 | + - name: Build sdist |
| 84 | + run: python -m build --sdist |
0 commit comments