-
Notifications
You must be signed in to change notification settings - Fork 6
164 lines (123 loc) · 4.87 KB
/
pypi-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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: pypi-wheels
on:
workflow_dispatch:
jobs:
build_windows:
env:
WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e83a8e64-04fc-45df-85c6-c2208d03bdb5/w_BaseKit_p_2024.2.0.635_offline.ex
WINDOWS_CPP_COMPONENTS: intel.oneapi.win.mkl.devel
VS_VER: vs2022
ONEAPI_ROOT: C:/Program Files (x86)/Intel/oneAPI/
CC: clang-cl.exe
CXX: clang-cl.exe
strategy:
fail-fast: false
matrix:
platform: [windows-latest]
python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"]
compiler: ["clang-cl"]
runs-on: ${{ matrix.platform }}
steps:
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "17.0"
- uses: actions/checkout@v3
with:
submodules: true
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86_64
- name: Install MKL
run: scripts/windowsoneapi_install.bat $WINDOWS_BASEKIT_URL $WINDOWS_CPP_COMPONENTS
shell: bash
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Add python requirements
run: python -m pip install --upgrade wheel setuptools && python -m pip install -r requirements.txt
- name: "Create build directory and run CMake"
run: >
cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DPIP_INSTALL=True -DBUILD_ASSET_WHEEL=True
-DCMAKE_C_COMPILER:FILEPATH="C:/Program Files/LLVM/bin/clang-cl.exe"
-DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files/LLVM/bin/clang-cl.exe"
-DCMAKE_LINKER:FILEPATH="C:/Program Files/LLVM/bin/lld-link.exe"
- name: "Build Project"
run: cmake --build build --target asset pypiwheel --config Release -- -j3
- name: 'Upload Wheels'
uses: actions/upload-artifact@v3
with:
name: dist_${{ matrix.python-version }}_${{ matrix.platform }}
path: build/pypiwheel/asset_asrl/dist/*.whl
retention-days: 5
build_linux_fast:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04]
python-version: ["3.7","3.8","3.9","3.10","3.11","3.12"]
compiler: ["clang-13"]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Ubuntu dependencies
env:
COMPILER: ${{ matrix.compiler }}
run: bash $GITHUB_WORKSPACE/.github/install_ubuntu_dependencies.sh
- name: Add python requirements
run: python -m pip install --upgrade wheel setuptools && python -m pip install -r requirements.txt
- run: pip install patchelf auditwheel
- name: "Create build directory and run CMake"
run: cmake -S . -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DPIP_INSTALL=True -DBUILD_ASSET_WHEEL=True
- name: "Build Project"
run: cmake --build build --target asset pypiwheel --config Release -- -j2
- name: Audit Wheel Test
run: auditwheel show build/pypiwheel/asset_asrl/dist/*.whl
- name: Audit Wheel Repair
run: auditwheel repair --plat manylinux_2_35_x86_64 build/pypiwheel/asset_asrl/dist/*.whl
- name: 'Upload Wheels'
uses: actions/upload-artifact@v3
with:
name: dist_${{ matrix.python-version }}_${{ matrix.platform }}
path: wheelhouse/*.whl
retention-days: 5
upload:
needs: [build_windows,build_linux_fast]
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
python-version: ["3.9"]
compiler: ["clang-13"]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v3
with:
path: dists/
- run: mkdir wheels
- name: Copy to Target
run: cp -r dists/dist_*/. wheels/
- name: Display structure of downloaded files
run: ls -R
working-directory: wheels/
- name: 'Upload Wheels To GitHub'
uses: actions/upload-artifact@v3
with:
name: All Wheels
path: wheels/
retention-days: 5
#- name: Publish package to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# packages_dir: wheels/