-
Notifications
You must be signed in to change notification settings - Fork 0
190 lines (185 loc) · 6.65 KB
/
build-pypi-package.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
name: Build Pypi Package
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
pull_request:
branches: [main]
paths:
- ".github/workflows/nightly-build.yml"
- ".github/actions/bigdl-core-xe-build/**"
- ".github/actions/bigdl-core-xe-build-win/**"
- "bigdl-core-xe/**"
- "bigdl-core-xe-addons/**"
- "bigdl-core-xe-batch/**"
- "bigdl-core-cpp/**"
- "bigdl-core-npu/**"
push:
branches: [main]
paths:
- ".github/workflows/nightly-build.yml"
- ".github/actions/bigdl-core-xe-build/**"
- ".github/actions/bigdl-core-xe-build-win/**"
- "bigdl-core-xe/**"
- "bigdl-core-xe-addons/**"
- "bigdl-core-xe-batch/**"
- "bigdl-core-cpp/**"
- "bigdl-core-npu/**"
workflow_dispatch:
inputs:
pypi-version:
description: 'pypi version (e.g. 2.5.0.dev0)'
required: true
default: 'latest'
type: string
python-version:
description: 'Python version to use (e.g., 3.9, 3.10, 3.11)'
required: true
default: '3.11'
type: string
release-bigdl-core-xe:
description: "If trigger release job for bigdl-core-xe"
required: false
type: boolean
default: true
release-bigdl-core-xe-win:
description: "If trigger release job for bigdl-core-xe-win"
required: false
type: boolean
default: true
release-bigdl-core-xe-batch:
description: "If trigger release job for bigdl-core-xe-batch"
required: false
type: boolean
default: true
release-bigdl-core-xe-batch-win:
description: "If trigger release job for bigdl-core-xe-batch-win"
required: false
type: boolean
default: true
# The maximum inputs that the worflow_dispatch accepts is only 10, so we use release-bigdl-core-xe-addons-for-linux-and-windows to trigger both bigdl-core-xe-addons and bigdl-core-xe-addons-win
release-bigdl-core-xe-addons-for-linux-and-windows:
description: "If trigger release job for bigdl-core-xe-addons and bigdl-core-xe-addons-win"
required: false
type: boolean
default: true
# release-bigdl-core-xe-addons-win:
# description: "If trigger release job for bigdl-core-xe-addons-win"
# required: false
# type: boolean
# default: true
release-bigdl-core-cpp:
description: "If trigger release job for bigdl-core-cpp"
required: false
type: boolean
default: true
release-bigdl-core-cpp-win:
description: "If trigger release job for bigdl-core-cpp-win"
required: false
type: boolean
default: true
release-bigdl-core-npu-win:
description: "If trigger release job for bigdl-core-npu-win"
required: false
type: boolean
default: true
workflow_call:
inputs:
pypi-version:
description: 'pypi version (e.g. 2.5.0.dev0)'
required: true
default: 'latest'
type: string
python-version:
description: 'Python version to use (e.g., 3.9, 3.10, 3.11)'
required: true
default: '3.11'
type: string
release-bigdl-core-xe:
description: "If trigger release job for bigdl-core-xe"
required: false
type: boolean
default: true
release-bigdl-core-xe-win:
description: "If trigger release job for bigdl-core-xe-win"
required: false
type: boolean
default: true
release-bigdl-core-xe-batch:
description: "If trigger release job for bigdl-core-xe-batch"
required: false
type: boolean
default: true
release-bigdl-core-xe-batch-win:
description: "If trigger release job for bigdl-core-xe-batch-win"
required: false
type: boolean
default: true
release-bigdl-core-xe-addons-for-linux-and-windows:
description: "If trigger release job for bigdl-core-xe-addons and bigdl-core-xe-addons-win"
required: false
type: boolean
default: true
# release-bigdl-core-xe-addons-win:
# description: "If trigger release job for bigdl-core-xe-addons-win"
# required: false
# type: boolean
# default: true
release-bigdl-core-cpp:
description: "If trigger release job for bigdl-core-cpp"
required: false
type: boolean
default: false
release-bigdl-core-cpp-win:
description: "If trigger release job for bigdl-core-cpp-win"
required: false
type: boolean
default: true
release-bigdl-core-npu-win:
description: "If trigger release job for bigdl-core-npu-win"
required: false
type: boolean
default: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
release-bigdl-core-xe:
runs-on: ubuntu-latest
if: ${{ ( github.event.schedule && inputs.release-bigdl-core-xe ) || ( github.event_name == 'workflow_dispatch' && (inputs.release-bigdl-core-xe == 'true')) || needs.paths-filter.outputs.xe == 'true'}}
strategy:
fail-fast: false
matrix:
python-version: ["${{ inputs.python-version || '3.11' }}"]
oneapi-version: ["2024.0"]
steps:
- name: Install build dependencies & build wheel
shell: bash
run: |
if [ ${{ github.event_name }} == "workflow_dispatch" ]; then
export nb_version=${{ inputs.pypi-version }}
else
export TIMESTAMP=`date '+%Y%m%d'`
export PYPI_VERSION=2.5.0
nb_version=${PYPI_VERSION}b${TIMESTAMP}
fi
echo ${nb_version}
echo ${{ inputs.release-bigdl-core-cpp }}
release-bigdl-core-xe-1:
runs-on: ubuntu-latest
if: ${{ ( github.event.schedule && inputs.release-bigdl-core-cpp == 'true' ) || ( github.event_name == 'workflow_dispatch' && inputs.release-bigdl-core-xe ) || needs.paths-filter.outputs.xe == 'true'}}
strategy:
fail-fast: false
matrix:
python-version: ["${{ inputs.python-version || '3.11' }}"]
oneapi-version: ["2024.0"]
steps:
- name: Install build dependencies & build wheel
shell: bash
run: |
if [ ${{ github.event_name }} == "workflow_dispatch" ]; then
export nb_version=${{ inputs.pypi-version }}
else
export TIMESTAMP=`date '+%Y%m%d'`
export PYPI_VERSION=2.5.0
nb_version=${PYPI_VERSION}b${TIMESTAMP}
fi
echo ${nb_version}
echo ${{ inputs.release-bigdl-core-cpp }}