-
Notifications
You must be signed in to change notification settings - Fork 25
214 lines (186 loc) · 5.67 KB
/
ci_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
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
name: CI Release
on:
push:
tags:
- "v*"
schedule:
- cron: "0 13 * * 0"
workflow_dispatch:
inputs:
standalone_branch_suffix:
description: 'Suffix of the branch on standalone'
required: false
default: '.pre0'
#┌───────────── minute (0 - 59)
#│ ┌───────────── hour (0 - 23)
#│ │ ┌───────────── day of the month (1 - 31)
#│ │ │ ┌───────────── month (1 - 12)
#│ │ │ │ ┌───────────── day of the week (0 - 6), 0 being Sunday
#│ │ │ │ │
#│ │ │ │ │
#│ │ │ │ │
#* * * * *
env:
ANSYS_VERSION: 241
DOCUMENTATION_CNAME: 'dpf.docs.pyansys.com'
MAIN_PYTHON_VERSION: '3.8'
jobs:
debug:
runs-on: ubuntu-latest
steps:
- name: Show the Github context for the triggered event
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
style:
name: "Style Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Setup Python"
uses: actions/setup-python@v4.6.0
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: "Install pre-commit"
run: pip install pre-commit
- name: "Run pre-commit"
run: pre-commit run --all-files --show-diff-on-failure
tests:
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: "241"
python_versions: '["3.7", "3.8", "3.9", "3.10"]'
wheel: true
wheelhouse: true
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit
docs:
uses: ./.github/workflows/docs.yml
with:
ANSYS_VERSION: "241"
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
event_name: ${{ github.event_name }}
secrets: inherit
examples:
uses: ./.github/workflows/examples.yml
with:
ANSYS_VERSION: "241"
python_versions: '["3.7", "3.8", "3.9", "3.10"]'
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit
retro_232:
name: "retro 232"
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: "232"
python_versions: '["3.8"]'
DOCSTRING: false
secrets: inherit
retro_231:
name: "retro 231"
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: "231"
python_versions: '["3.8"]'
DOCSTRING: false
secrets: inherit
retro_222:
name: "retro 222"
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: "222"
python_versions: '["3.8"]'
DOCSTRING: false
secrets: inherit
retro_221:
name: "retro 221"
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: "221"
python_versions: '["3.8"]'
DOCSTRING: false
secrets: inherit
pydpf-post_241:
name: "PyDPF-Post with 241"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: "241"
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit
pydpf-post_232:
name: "PyDPF-Post with 232"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: "232"
secrets: inherit
pydpf-post_231:
name: "PyDPF-Post with 231"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: "231"
secrets: inherit
pydpf-post_222:
name: "PyDPF-Post with 222"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: "222"
secrets: inherit
pydpf-post_221:
name: "PyDPF-Post with 221"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: "221"
secrets: inherit
gate:
name: "gate"
uses: ./.github/workflows/gate.yml
with:
ANSYS_VERSION: "241"
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit
docker_tests:
name: "Build and Test on Docker"
uses: ./.github/workflows/test_docker.yml
with:
ANSYS_VERSION: "241"
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit
docker_examples:
name: "Run examples on Docker"
uses: ./.github/workflows/examples_docker.yml
with:
ANSYS_VERSION: "241"
python_versions: '["3.7", "3.8", "3.9", "3.10"]'
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit
draft_release:
name: "Draft Release"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [style, tests, docs, examples, retro_232, retro_231, retro_222, retro_221, gate, pydpf-post_241, pydpf-post_232, pydpf-post_231, pydpf-post_222, pydpf-post_221, docker_tests]
runs-on: ubuntu-latest
steps:
- name: "Set up Python"
uses: actions/setup-python@v4.6.0
with:
python-version: 3.9
- name: "Download artifacts"
uses: actions/download-artifact@v3
- name: "Display downloaded files"
run: ls -R
- name: "Create draft release"
uses: softprops/action-gh-release@v1
with:
files: |
./**/*.whl
./**/*.tar.gz
./**/*.zip
draft: true
generate_release_notes: true
# - name: "Upload to Test PyPi" # Change TOKEN
# run: |
# pip install twine
# twine upload --repository testpypi --skip-existing ./**/*.whl
# twine upload --repository testpypi --skip-existing ./**/*.tar.gz
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}