-
Notifications
You must be signed in to change notification settings - Fork 14
118 lines (99 loc) · 2.81 KB
/
release.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
name: release
on:
push:
tags:
- '*'
branches-ignore:
- '*'
jobs:
build_sdist:
name: sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
build_wheels:
name: ${{ matrix.platform }}
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- image: ubuntu-latest
platform: linux
- image: macos-13
platform: macos-intel
- image: macos-14
platform: macos-arm
- image: windows-latest
platform: windows
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache Conan
id: cache-conan
uses: actions/cache@v3
if: matrix.platform == 'windows'
with:
path: |
conan_build
conan_data
key: conan-${{ matrix.image }}-${{ hashFiles('conanfile.txt') }}
- name: Configure Python
uses: actions/setup-python@v5
if: matrix.platform == 'windows' && steps.cache-conan.outputs.cache-hit != 'true'
with:
python-version: '3.x'
- name: Install Conan
if: matrix.platform == 'windows' && steps.cache-conan.outputs.cache-hit != 'true'
run: |
pip install pip --upgrade
pip install conan<2.0.0
conan profile new default --detect
conan profile update "settings.compiler=Visual Studio" default
conan profile update "settings.compiler.version=17" default
conan config set "storage.path=$env:GITHUB_WORKSPACE/conan_data"
conan install --build=openssl --install-folder conan_build .
- name: Set up QEMU
if: matrix.platform == 'linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
if: matrix.platform != 'macos-arm'
uses: pypa/[email protected]
env:
MACOSX_DEPLOYMENT_TARGET: 13.0
- name: Build wheels
if: matrix.platform == 'macos-arm'
uses: pypa/[email protected]
env:
MACOSX_DEPLOYMENT_TARGET: 14.0
- name: Verify clean directory
run: git diff --exit-code
shell: bash
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
upload:
name: upload
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}