|
1 | | -# |
2 | | -# Python wheels build is now done in Github Actions + Cirrus CI(for arm build) |
3 | | -# so python build is disabled in Azure pipelines. |
4 | | -# |
5 | | - |
6 | | -variables: |
7 | | - # https://cibuildwheel.readthedocs.io/en/stable/cpp_standards/ |
8 | | - # cibuildwheel now supports python 3.6+(as of 2022 Oct) |
9 | | - #CIBW_SKIP: "pp*" |
10 | | - CIBW_BEFORE_BUILD: "pip install pybind11" |
11 | | - CIBW_ARCHS_LINUXBEFORE_BUILD: "pip install pybind11" |
12 | | - # disable aarch64 build for a while since it(pulling docker aarch64 image) exceeds Azure's 60 min limit |
13 | | - # NOTE: aarch64 linux support in Azure pipeline is not yet officially supported(as of 2022 Oct) https://github.com/microsoft/azure-pipelines-agent/issues/3935 |
14 | | - #CIBW_ARCHS_LINUX: auto aarch64 |
15 | | - CIBW_ARCHS_MACOS: x86_64 universal2 arm64 |
16 | | - #CIBW_BEFORE_BUILD_MACOS: "pip install -U pip setuptools" |
17 | | - #CIBW_BEFORE_BUILD_LINUX: "pip install -U pip setuptools" |
18 | | - #CIBW_TEST_COMMAND: TODO "python -c \"import tinyobjloader; tinyobjloader.test()\"" |
19 | | - CIBW_BUILD_VERBOSITY: "2" |
20 | | - #CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 |
21 | | - #CIBW_MANYLINUX_I686_IMAGE: manylinux2014 |
22 | | - |
23 | 1 | jobs: |
24 | 2 | - job: unit_linux |
25 | 3 | pool: { vmImage: "ubuntu-latest" } |
|
29 | 7 | make && ./tester |
30 | 8 | displayName: Run unit tests |
31 | 9 |
|
32 | | - - job: python_format |
33 | | - pool: { vmImage: "ubuntu-latest" } |
34 | | - steps: |
35 | | - - task: UsePythonVersion@0 |
36 | | - - script: | |
37 | | - # 19.10b0 triggers 'cannot import name '_unicodefun' from 'click'' error. |
38 | | - # https://stackoverflow.com/questions/71673404/importerror-cannot-import-name-unicodefun-from-click |
39 | | - #pip install black==19.10b0 |
40 | | - #pip install black==22.3.0 |
41 | | - pip install black==22.10.0 |
42 | | -
|
43 | | - black --check python/ |
44 | | - displayName: Check Python code format |
45 | | -
|
46 | | - # Disabled: python build |
47 | | - ## |
48 | | - ## Ubuntu16.04 seems now deprecated(as of 2021/12/01), |
49 | | - ## so use `ubuntu-latest` |
50 | | - #- job: linux |
51 | | - # pool: {vmImage: "ubuntu-latest"} |
52 | | - # steps: |
53 | | - # - task: UsePythonVersion@0 |
54 | | - # - bash: | |
55 | | - # python3 -m pip install --upgrade pip |
56 | | - # pip3 install cibuildwheel twine |
57 | | - |
58 | | - # # Use pipx to build source dist |
59 | | - # pip3 install pipx |
60 | | - |
61 | | - # # Source dist |
62 | | - # pipx run build --sdist |
63 | | - # ls -la dist/* |
64 | | - |
65 | | - # # build binary wheels |
66 | | - # cibuildwheel --platform linux --output-dir wheelhouse . |
67 | | - |
68 | | - # - task: CopyFiles@2 |
69 | | - # inputs: |
70 | | - # contents: 'wheelhouse/**' |
71 | | - # targetFolder: $(Build.ArtifactStagingDirectory) |
72 | | - |
73 | | - # - task: CopyFiles@2 |
74 | | - # inputs: |
75 | | - # contents: 'dist/**' |
76 | | - # targetFolder: $(Build.ArtifactStagingDirectory) |
77 | | - |
78 | | - # - task: PublishBuildArtifacts@1 |
79 | | - # inputs: |
80 | | - # path: $(Build.ArtifactStagingDirectory) |
81 | | - # artifactName: tinyobjDeployLinux |
82 | | - |
83 | | - #- job: macos |
84 | | - # pool: {vmImage: 'macOS-latest'} |
85 | | - # variables: |
86 | | - # # Support C++11: https://github.com/joerick/cibuildwheel/pull/156 |
87 | | - # MACOSX_DEPLOYMENT_TARGET: 10.9 |
88 | | - # steps: |
89 | | - # - task: UsePythonVersion@0 |
90 | | - # - bash: | |
91 | | - # python3 -m pip install --upgrade pip |
92 | | - # pip3 install cibuildwheel |
93 | | - # cibuildwheel --platform macos --output-dir wheelhouse . |
94 | | - # - task: CopyFiles@2 |
95 | | - # inputs: |
96 | | - # contents: 'wheelhouse/*.whl' |
97 | | - # targetFolder: $(Build.ArtifactStagingDirectory) |
98 | | - # - task: PublishBuildArtifacts@1 |
99 | | - # inputs: |
100 | | - # path: $(Build.ArtifactStagingDirectory) |
101 | | - # artifactName: tinyobjDeployMacOS |
102 | | - |
103 | | - #- job: windows |
104 | | - # pool: {vmImage: 'windows-latest'} |
105 | | - # steps: |
106 | | - # - task: UsePythonVersion@0 |
107 | | - # - bash: | |
108 | | - # python -m pip install --upgrade pip |
109 | | - # pip install cibuildwheel |
110 | | - # cibuildwheel --platform windows --output-dir wheelhouse . |
111 | | - # - task: CopyFiles@2 |
112 | | - # inputs: |
113 | | - # contents: 'wheelhouse/*.whl' |
114 | | - # targetFolder: $(Build.ArtifactStagingDirectory) |
115 | | - # - task: PublishBuildArtifacts@1 |
116 | | - # inputs: |
117 | | - # path: $(Build.ArtifactStagingDirectory) |
118 | | - # artifactName: tinyobjDeployWindows |
119 | | - |
120 | | - #- job: deployPyPI |
121 | | - # # Based on vispy: https://github.com/vispy/vispy/blob/master/azure-pipelines.yml |
122 | | - # pool: {vmImage: 'ubuntu-latest'} |
123 | | - # condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) |
124 | | - # dependsOn: |
125 | | - # - linux |
126 | | - # - macos |
127 | | - # - windows |
128 | | - # steps: |
129 | | - # - task: UsePythonVersion@0 |
130 | | - |
131 | | - # # TODO(syoyo): Use buildType: specific to download multiple artifacts at once? |
132 | | - # - task: DownloadBuildArtifacts@0 |
133 | | - # inputs: |
134 | | - # artifactName: 'tinyobjDeployLinux' |
135 | | - # downloadPath: $(Pipeline.Workspace) |
136 | | - |
137 | | - # - task: DownloadBuildArtifacts@0 |
138 | | - # inputs: |
139 | | - # artifactName: 'tinyobjDeployMacOS' |
140 | | - # downloadPath: $(Pipeline.Workspace) |
141 | | - |
142 | | - # - task: DownloadBuildArtifacts@0 |
143 | | - # inputs: |
144 | | - # artifactName: 'tinyobjDeployWindows' |
145 | | - # downloadPath: $(Pipeline.Workspace) |
146 | | - |
147 | | - # # Publish to PyPI through twine |
148 | | - # - bash: | |
149 | | - # cd $(Pipeline.Workspace) |
150 | | - # find . |
151 | | - # python -m pip install --upgrade pip |
152 | | - # pip install twine |
153 | | - # echo tinyobjDeployLinux/dist/* |
154 | | - # echo tinyobjDeployLinux/wheelhouse/* tinyobjDeployMacOS/wheelhouse/* tinyobjDeployWindows/wheelhouse/* |
155 | | - # twine upload -u "__token__" --skip-existing tinyobjDeployLinux/dist/* tinyobjDeployLinux/wheelhouse/* tinyobjDeployMacOS/wheelhouse/* tinyobjDeployWindows/wheelhouse/* |
156 | | - # env: |
157 | | - # TWINE_PASSWORD: $(pypiToken2) |
158 | | - |
159 | 10 | trigger: |
160 | 11 | branches: |
161 | 12 | include: |
|
0 commit comments