Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 386a4ea

Browse files
committed
Add Windows and macOS CI
1 parent ba7469b commit 386a4ea

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ jobs:
1414
os: [ubuntu-latest]
1515
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
1616
include:
17-
- os: ubuntu-latest
17+
- os: windows-latest
18+
python: 3.6
19+
- os: macos-latest
1820
python: 3.6
19-
- os: ubuntu-latest
20-
python: 3.7
21-
- os: ubuntu-latest
22-
python: 3.8
2321

2422
steps:
2523
- uses: actions/checkout@v2

tests/setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
#!/usr/bin/env python3
2+
import os.path
23

4+
5+
SRC_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
6+
7+
# C compiler flags for GCC and clang
38
CFLAGS = ['-Wall', '-Wextra', '-Werror']
49

510
def main():
611
from distutils.core import setup, Extension
712

13+
cflags = ['-I' + SRC_DIR]
14+
if os.name != "nt":
15+
cflags.extend(CFLAGS)
16+
817
ext = Extension('test_pythoncapi_compat_cext',
918
sources=['test_pythoncapi_compat_cext.c'],
10-
extra_compile_args=CFLAGS)
19+
extra_compile_args=cflags)
1120

1221
setup(name="test_pythoncapi_compat", ext_modules=[ext])
1322

tests/test_pythoncapi_compat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def display_title(title):
3333
print(title)
3434
print("=" * len(title))
3535
print()
36+
sys.stdout.flush()
3637

3738

3839
def build_ext():

0 commit comments

Comments
 (0)