-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
87 lines (86 loc) · 3.26 KB
/
azure-pipelines.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
79
80
81
82
83
84
85
86
87
variables:
# Skip building on Python 2.7 on all platforms
CIBW_SKIP: cp27-*
CIBW_BEFORE_BUILD: "pip install -r requirements.txt"
# https://github.com/matthew-brett/delocate/pull/39
#CIBW_BEFORE_BUILD_MACOS: "pip install -r requirements.txt && pip install git+https://github.com/matthew-brett/delocate.git@single-file-refactor"
CIBW_BEFORE_BUILD_LINUX: "pip install -r requirements.txt && bash ci/centos_install_libarchive_builddep.sh && bash ci/build_libarchive.sh"
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"
jobs:
- job: test
pool:
vmImage: "Ubuntu-20.04"
variables:
LD_LIBRARY_PATH: /usr/local/lib
steps:
- checkout: self
lfs: true
- bash: bash ci/download_libarchive.sh
displayName: download libarchive
- bash: |
sudo apt update
sudo apt install -y build-essential cmake libssl-dev libacl1-dev libbz2-dev liblzma-dev libzip-dev liblz4-dev libzstd-dev lzop
displayName: install build dependencies for libarchive
- bash: sudo bash ci/build_libarchive.sh
displayName: build libarchive
- task: UsePythonVersion@0
- bash: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r dev-requirements.txt
python setup.py test
- bash: |
bash <(curl -s https://codecov.io/bash)
displayName: "Upload to codecov.io"
- job: linux_wheels
pool: { vmImage: "Ubuntu-20.04" }
steps:
- checkout: self
lfs: true
- bash: bash ci/download_libarchive.sh
displayName: download libarchive
- task: UsePythonVersion@0
- bash: |
python -m pip install --upgrade pip setuptools wheel twine
python -m pip install cibuildwheel==2.4.0
cibuildwheel --output-dir wheelhouse .
twine check wheelhouse/*.whl
- task: PublishBuildArtifacts@1
inputs: { pathtoPublish: "wheelhouse" }
- job: macos_wheels
pool: { vmImage: "macOS-1015" }
variables:
LDFLAGS: "-L/usr/local/opt/libarchive/lib"
CPPFLAGS: "-I/usr/local/opt/libarchive/include"
PKG_CONFIG_PATH: "/usr/local/opt/libarchive/lib/pkgconfig"
steps:
- checkout: self
lfs: true
- bash: |
brew update
brew install libarchive
displayName: Install libarchive
- task: UsePythonVersion@0
- bash: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install cibuildwheel==2.4.0
cibuildwheel --output-dir wheelhouse .
- task: PublishBuildArtifacts@1
inputs: { pathtoPublish: "wheelhouse" }
# - job: windows_wheels
# pool: { vmImage: "vs2017-win2016" }
# steps:
# - bash: bash ci/download_libarchive.sh
# displayName: download libarchive
# - script: ci/build_libarchive.cmd
# displayName: build libarchive
# - task: UsePythonVersion@0
# - bash: |
# cp libarchive/libarchive/*.h .
# cp build_ci/cmake/libarchive/Release/* .
# ls .
# python -m pip install --upgrade pip
# pip install cibuildwheel==1.0.0
# cibuildwheel --output-dir wheelhouse .
# - task: PublishBuildArtifacts@1
# inputs: { pathtoPublish: "wheelhouse" }