-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (71 loc) · 2.35 KB
/
wheels.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
name: Build
on:
push:
workflow_dispatch:
inputs:
save:
description: 'Save Wheels'
required: true
default: false
type: boolean
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macOS-11]
steps:
- uses: actions/github-script@v6
id: conan-path-script
env:
WORKSPACE: "${{github.workspace}}"
with:
result-encoding: string
script: |
const { WORKSPACE } = process.env
switch('${{runner.os}}'){
case 'Windows':
return `${WORKSPACE}\\ciwheelbuilder\\conan`;
case 'Linux':
return `/host/${WORKSPACE}/ciwheelbuilder/conan`
case 'macOS':
return `${WORKSPACE}/ciwheelbuilder/conan`
default:
return `${WORKSPACE}/ciwheelbuilder/conan`
}
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
cache-dependency-path: |
requirements-cibuildwheel.txt
requirements/requirements-*.txt
# Used to host cibuildwheel
- name: Install cibuildwheel
run: python -m pip install -r requirements-cibuildwheel.txt
- uses: actions/cache@v3
id: cache-conan
with:
path: ${{github.workspace}}/ciwheelbuilder/conan
key: ${{ runner.os }}-${{ hashFiles('**/conanfile.py') }}
- name: Build wheels
if: contains(matrix.os, 'windows')
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
python -m cibuildwheel --output-dir wheelhouse
env:
CONAN_USER_HOME: ${{steps.conan-path-script.outputs.result}}
- name: Build wheels
if: "!contains(matrix.os, 'windows')"
run: python -m cibuildwheel --output-dir wheelhouse
env:
CONAN_USER_HOME: ${{steps.conan-path-script.outputs.result}}
# CIBW_SOME_OPTION: value
- uses: actions/upload-artifact@v3
if: ${{ inputs.save }}
with:
name: uiucprescon.ocr-wheels
path: ./wheelhouse/*.whl