|
7 | 7 | - v* |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - wheels: |
| 10 | + tests: |
| 11 | + strategy: |
| 12 | + fail-fast: false |
| 13 | + matrix: |
| 14 | + python-version: |
| 15 | + - 3.8 |
| 16 | + - 3.9 |
| 17 | + - "3.10" |
| 18 | + - 3.11 |
| 19 | + - 3.12 |
| 20 | + - 3.13 |
| 21 | + - pypy-3.8 |
| 22 | + os: |
| 23 | + - ubuntu-latest |
| 24 | + - macos-latest |
| 25 | + - windows-latest |
| 26 | + exclude: |
| 27 | + - os: macos-latest |
| 28 | + python-version: '3.10' |
| 29 | + - os: macos-latest |
| 30 | + python-version: 3.9 |
| 31 | + - os: macos-latest |
| 32 | + python-version: 3.8 |
| 33 | + - os: macos-latest |
| 34 | + python-version: '3.11' |
| 35 | + - os: macos-latest |
| 36 | + python-version: 'pypy-3.8' |
| 37 | + runs-on: ${{ matrix.os }} |
| 38 | + name: ${{ matrix.os }} @ ${{ matrix.python-version }} |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v4 |
| 41 | + - name: Set up Python |
| 42 | + uses: actions/setup-python@v4 |
| 43 | + with: |
| 44 | + python-version: ${{ matrix.python-version }} |
| 45 | + architecture: x64 |
| 46 | + - name: Linux install LZO |
| 47 | + if: runner.os == 'Linux' |
| 48 | + run: sudo apt install liblzo2-dev |
| 49 | + - name: macos install LZO |
| 50 | + if: runner.os == 'macOS' |
| 51 | + run: | |
| 52 | + echo "$RUNNER_OS uses included lzo source" |
| 53 | + echo PWD: `pwd` |
| 54 | + echo LS lzo |
| 55 | + ls -l lzo-2.10/ |
| 56 | + echo LS lzo include |
| 57 | + ls -l lzo-2.10/include/ |
| 58 | + cd lzo-2.10 |
| 59 | + ./configure --enable-shared --disable-dependency-tracking --prefix=`pwd` |
| 60 | + make |
| 61 | + make test &> test_results |
| 62 | + make install |
| 63 | + cd .. |
| 64 | + ls -l lzo-2.10/ |
| 65 | + find ./lzo-2.10/ -name "*lzo2*" |
| 66 | + - name: Add msbuild to PATH |
| 67 | + if: runner.os == 'Windows' |
| 68 | + uses: microsoft/setup-msbuild@v1.1 |
| 69 | + with: |
| 70 | + msbuild-architecture: x64 |
| 71 | + - name: Setup LZO Windows |
| 72 | + if: runner.os == 'Windows' |
| 73 | + run: | |
| 74 | + pwd |
| 75 | + cd lzo-2.10 |
| 76 | + mkdir build |
| 77 | + cd build |
| 78 | + cmake .. |
| 79 | + pwd |
| 80 | + - name: build LZO Windows |
| 81 | + if: runner.os == 'Windows' |
| 82 | + working-directory: .\lzo-2.10\build |
| 83 | + run: msbuild lzo_static_lib.vcxproj -p:Configuration=Release -p:Platform=x64 -p:OutDir=..\ |
| 84 | + - run: pip install -e ./ |
| 85 | + - run: pip install pytest build |
| 86 | + - run: pytest --doctest-modules tests/ |
| 87 | + - run: ls -l |
| 88 | + if: runner.os != 'Windows' |
| 89 | + - run: python -m build |
| 90 | + wheels: |
| 91 | + needs: [tests,] |
11 | 92 | name: Build wheels on ${{ matrix.os }} for ${{ matrix.arch }} |
12 | 93 | runs-on: ${{ matrix.os }} |
13 | 94 | strategy: |
|
59 | 140 | path: wheelhouse/*.whl |
60 | 141 | if-no-files-found: error |
61 | 142 |
|
62 | | - sdist: |
| 143 | + sdist: |
| 144 | + needs: [tests,] |
63 | 145 | name: Build sdist |
64 | 146 | runs-on: ubuntu-latest |
65 | 147 | steps: |
|
86 | 168 | path: dist/* |
87 | 169 | if-no-files-found: error |
88 | 170 |
|
89 | | - publish: |
| 171 | + publish: |
90 | 172 | name: Publish builds on PyPI |
91 | 173 | runs-on: ubuntu-latest |
92 | 174 | needs: [sdist, wheels] |
|
0 commit comments