Skip to content

Commit 827f37e

Browse files
committed
Add tests stage to wheel workflow.
1 parent a0dd3c0 commit 827f37e

File tree

1 file changed

+85
-3
lines changed

1 file changed

+85
-3
lines changed

.github/workflows/wheels.yml

Lines changed: 85 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,88 @@ on:
77
- v*
88

99
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,]
1192
name: Build wheels on ${{ matrix.os }} for ${{ matrix.arch }}
1293
runs-on: ${{ matrix.os }}
1394
strategy:
@@ -59,7 +140,8 @@ jobs:
59140
path: wheelhouse/*.whl
60141
if-no-files-found: error
61142

62-
sdist:
143+
sdist:
144+
needs: [tests,]
63145
name: Build sdist
64146
runs-on: ubuntu-latest
65147
steps:
@@ -86,7 +168,7 @@ jobs:
86168
path: dist/*
87169
if-no-files-found: error
88170

89-
publish:
171+
publish:
90172
name: Publish builds on PyPI
91173
runs-on: ubuntu-latest
92174
needs: [sdist, wheels]

0 commit comments

Comments
 (0)