-
Notifications
You must be signed in to change notification settings - Fork 3
158 lines (140 loc) · 4.77 KB
/
cd.yml
File metadata and controls
158 lines (140 loc) · 4.77 KB
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
name: Release
on: workflow_dispatch
jobs:
release-first:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-15]
py-abi: ['cp310']
vtk-tag: ['9.6.0']
include:
# Python version to install on host
- py-abi: cp310
python-version: '3.10'
# OS name to ciwheelbuild platform name
- os: ubuntu-latest
platform-tag: manylinux_2_28_x86_64
build-target: "manylinux_x86_64"
- os: windows-latest
platform-tag: win_amd64
build-target: "win_amd64"
- os: macos-15
platform-tag: macosx_11_0_arm64
build-target: "macosx_arm64"
uses: ./.github/workflows/build-wheels.yml
with:
os: ${{ matrix.os }}
vtk-tag: ${{ matrix.vtk-tag }}
build-target: ${{ matrix.py-abi }}-${{ matrix.build-target }}
python-version: ${{ matrix.python-version }}
platform-tag: ${{ matrix.platform-tag }}
use-cache: true
release-all:
needs: release-first # wait for previous job
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-15]
py-abi: ['cp311', 'cp312', 'cp313']
vtk-tag: ['9.6.0']
include:
# Python version to install on host
- py-abi: cp311
python-version: '3.11'
- py-abi: cp312
python-version: '3.12'
- py-abi: cp313
python-version: '3.13'
# OS name to ciwheelbuild platform name
- os: ubuntu-latest
platform-tag: manylinux_2_28_x86_64
build-target: "manylinux_x86_64"
- os: windows-latest
platform-tag: win_amd64
build-target: "win_amd64"
- os: macos-15
platform-tag: macosx_11_0_arm64
build-target: "macosx_arm64"
uses: ./.github/workflows/build-wheels.yml
with:
os: ${{ matrix.os }}
vtk-tag: ${{ matrix.vtk-tag }}
build-target: ${{ matrix.py-abi }}-${{ matrix.build-target }}
python-version: ${{ matrix.python-version }}
platform-tag: ${{ matrix.platform-tag }}
use-cache: true
upload-github:
name: Push SlicerCore release on github
needs: [release-first, release-all]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all wheel artifacts
uses: actions/download-artifact@v4
with:
path: ./wheelhouse
merge-multiple: true # Flattens them into one directory
- name: Show downloaded wheels
run: ls ./wheelhouse
- name: Publish Release and Attach Wheels
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
# Attach all the downloaded wheels to the GitHub Release page
files: ./wheelhouse/*.whl
upload-pypi:
name: Push SlicerCore on PyPi
needs: [release-first, release-all]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/slicer-core
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
contents: write # IMPORTANT: mandatory for making GitHub Releases
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download all wheel artifacts
uses: actions/download-artifact@v4
with:
path: ./wheelhouse
pattern: slicer_core-*
merge-multiple: true # Flattens them into one directory
- name: Show downloaded wheels
run: ls ./wheelhouse
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./wheelhouse
upload-pypi-sdk:
name: Push SlicerCoreSDK on PyPi
needs: [release-first, release-all]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/slicer-core-sdk
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
contents: write # IMPORTANT: mandatory for making GitHub Releases
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download all wheel artifacts
uses: actions/download-artifact@v4
with:
path: ./wheelhouse
pattern: slicer_core_sdk-*
merge-multiple: true # Flattens them into one directory
- name: Show downloaded wheels
run: ls ./wheelhouse
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./wheelhouse