-
Notifications
You must be signed in to change notification settings - Fork 24
/
.appveyor.yml
78 lines (68 loc) · 2.59 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
image: Visual Studio 2017
# We always use a 64-bit machine, but can build x86 distributions
# with the TARGET_ARCH variable.
platform:
- x64
environment:
matrix:
- CMAKE_GENERATOR: "Visual Studio 15 2017"
PYTHON35: "C:\\Python35"
PYTHON36: "C:\\Python36"
PYTHON37: "C:\\Python37"
- CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
PYTHON35: "C:\\Python35-x64"
PYTHON36: "C:\\Python36-x64"
PYTHON37: "C:\\Python37-x64"
matrix:
fast_finish: true
install:
# Fetch submodules
- git submodule update --init --recursive
- cmake --version
# Make sure Python environments are up to date.
# Pin wheel to 0.26.0 to avoid Windows ABI tag for built wheel
# For context: https://github.com/pypa/wheel/issues/161 and
# https://github.com/pypa/wheel/issues/171
- "%PYTHON35%\\python -m pip install --upgrade pip wheel==0.26.0"
- "%PYTHON36%\\python -m pip install --upgrade pip wheel==0.26.0"
- "%PYTHON37%\\python -m pip install --upgrade pip wheel==0.26.0"
# Set up environment
- git submodule update --init --recursive
- set BUILD_DIR=%APPVEYOR_BUILD_FOLDER%\crc32c\build
- set CRC32C_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\usr
build_script:
# First, build libcrc32c
- mkdir %BUILD_DIR%
- cd %BUILD_DIR%
- cmake
-G "%CMAKE_GENERATOR%"
-DCMAKE_BUILD_TYPE=Release
-DCRC32C_BUILD_TESTS=no
-DCRC32C_BUILD_BENCHMARKS=no
-DBUILD_SHARED_LIBS=yes
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=yes
-DCMAKE_INSTALL_PREFIX:PATH=%CRC32C_INSTALL_PREFIX%
..
- cmake --build . --config RelWithDebInfo --target install
- dir %CRC32C_INSTALL_PREFIX% /b /s
# Build wheels (requires CRC32C_INSTALL_PREFIX is set)
- cd %APPVEYOR_BUILD_FOLDER%
- "%PYTHON35%\\python -m pip wheel ."
- "%PYTHON36%\\python -m pip wheel ."
- "%PYTHON37%\\python -m pip wheel ."
test_script:
# Install the wheel with pip
- "%PYTHON35%\\python -m pip install --no-index --find-links=. google-crc32c"
- "%PYTHON36%\\python -m pip install --no-index --find-links=. google-crc32c"
- "%PYTHON37%\\python -m pip install --no-index --find-links=. google-crc32c"
# Install pytest with pip
- "%PYTHON35%\\python -m pip install pytest"
- "%PYTHON36%\\python -m pip install pytest"
- "%PYTHON37%\\python -m pip install pytest"
# Run the tests
- "%PYTHON35%/python -m pytest tests"
- "%PYTHON36%/python -m pytest tests"
- "%PYTHON37%/python -m pytest tests"
artifacts:
- path: 'google_crc32c*win*.whl'