-
Notifications
You must be signed in to change notification settings - Fork 33
250 lines (200 loc) · 6.83 KB
/
Copy pathon_pr.yml
File metadata and controls
250 lines (200 loc) · 6.83 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
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
name: on PR
# Controls when the workflow will run
on: [pull_request]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository_owner }}
concurrency:
group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
cancel-in-progress: true
jobs:
make_code_archive:
name: Make Code Archive
uses: ./.github/workflows/make_code_archive.yml
upload_pr_detail:
runs-on: ubuntu-latest
steps:
- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
mkdir -p ./pr
echo $PR_NUMBER > ./pr_number.txt
- uses: actions/upload-artifact@v4
with:
name: report_pr_number
path: ./pr_number.txt
email_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Extract author email
id: author
run: |
git log -1
echo "email=$(git show -s --format='%ae' HEAD~0)" >> $GITHUB_OUTPUT
- name: Show email
run: echo "Commiter email is ${{ steps.author.outputs.email }}" > report_______email.md
- name: Validate author email
if: ${{ endsWith(steps.author.outputs.EMAIL, 'noreply.github.com') }}
run: echo "You are using github private e-mail. This prevent proper tracing of who contributed what, please disable it (see [Keep my email addresses private](https://github.com/settings/emails))." >> report_______email.md
- uses: actions/upload-artifact@v4
with:
name: report_email
path: ./report_______email.md
src_check:
name: Linting
#needs: [detect_changes]
uses: ./.github/workflows/source_checks.yml
#make shamrock documentation
make_documentation:
name: Doc
needs: [src_check]
uses: ./.github/workflows/make_documentation.yml
doxygen_warn_main:
name: Doxygen Main branch
needs: [make_documentation]
runs-on: ubuntu-latest
container:
image: ghcr.io/shamrock-code/shamrock-ci:ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name : Install pck (doxygen)
run: |
sudo apt update && \
sudo apt install -y -qq doxygen graphviz
- name : Modify texlive packages
run: |
sudo apt install -y \
texlive-full \
dvipng \
ghostscript \
latexmk
- name : Run doxygen
run: |
cd doc/doxygen
doxygen dox.conf
- name: Archive doxygen warnings
uses: actions/upload-artifact@v4
with:
name: doxygen_warning_main
path: doc/doxygen/warn_doxygen.txt
doxygen_diff:
name: Doxygen Diff
needs: [doxygen_warn_main]
runs-on: ubuntu-latest
steps:
#### Checkout part ####
# Checkout merge commit if PR otherwise default
- name : Reconfigure git
run: |
git config --global --add safe.directory '*'
git config --global --list
- uses: actions/checkout@v4
if: github.event_name == 'pull_request_target'
with:
fetch-depth: 0
ref: "refs/pull/${{ github.event.number }}/merge"
- uses: actions/checkout@v4
if: github.event_name != 'pull_request_target'
with:
fetch-depth: 0
- name: Show diff against main
if: github.event_name == 'pull_request_target'
run: git diff ${{ github.event.pull_request.base.sha }} HEAD
#### End Checkout part ####
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Download PR doxygen warning'
uses: actions/download-artifact@v4
with:
name: doxygen_warning
path: PR_dox_output
- name: 'Download PR doxygen warning'
uses: actions/download-artifact@v4
with:
name: doxygen_warning_main
path: main_dox_output
- name: 'ls PR_dox_output'
run: |
ls PR_dox_output
- name: 'ls main_dox_output'
run: |
ls main_dox_output
- name: 'Diff'
run: |
python3 buildbot/doxygen_diff.py main_dox_output/warn_doxygen.txt PR_dox_output/warn_doxygen.txt > report_doc_diff.md
- name: 'cat diff'
run: |
cat report_doc_diff.md
- uses: actions/upload-artifact@v4
if: always()
with:
name: report_doc_diff
path: ./report_doc_diff.md
env_tests:
needs: [src_check]
name: Tests
if: ${{!contains(github.event.pull_request.labels.*.name, 'no-src-change ')}}
uses: ./.github/workflows/env_tests.yml
shamrock_linux_acpp_conda:
needs: [src_check]
name: Tests
if: ${{!contains(github.event.pull_request.labels.*.name, 'no-src-change ')}}
uses: ./.github/workflows/shamrock-acpp-conda.yml
shamrock_linux_acpp_pylib:
needs: [src_check]
name: Tests
if: ${{!contains(github.event.pull_request.labels.*.name, 'no-src-change ')}}
uses: ./.github/workflows/shamrock-acpp-clang-py.yml
shamrock_linux_acpp_asan:
needs: [src_check]
name: Tests
if: ${{!contains(github.event.pull_request.labels.*.name, 'no-src-change ')}}
uses: ./.github/workflows/shamrock-acpp-clang-asan.yml
shamrock_linux_acpp_ubsan:
needs: [src_check]
name: Tests
if: ${{!contains(github.event.pull_request.labels.*.name, 'no-src-change ')}}
uses: ./.github/workflows/shamrock-acpp-clang-ubsan.yml
shamrock_linux_acpp_tidy:
needs: [src_check]
name: Tests
if: ${{!contains(github.event.pull_request.labels.*.name, 'no-src-change ')}}
uses: ./.github/workflows/shamrock-acpp-clang-tidy.yml
shamrock_linux_acpp_cov:
needs: [src_check]
name: Tests
if: ${{!contains(github.event.pull_request.labels.*.name, 'no-src-change ')}}
uses: ./.github/workflows/shamrock-acpp-clang-coverage.yml
shamrock_linux_dpcpp:
needs: [src_check]
name: Tests
if: ${{!contains(github.event.pull_request.labels.*.name, 'no-src-change ')}}
uses: ./.github/workflows/shamrock-dpcpp.yml
shamrock_linux_acpp_phystests:
needs: [src_check]
name: Tests (Phys)
if: ${{!contains(github.event.pull_request.labels.*.name, 'no-src-change ')}}
uses: ./.github/workflows/shamrock-acpp-phys-test.yml
make_github_page:
name: "GithubPage"
needs: [make_documentation, shamrock_linux_acpp_pylib, shamrock_linux_acpp_cov,shamrock_linux_acpp_tidy]
uses: ./.github/workflows/make_website.yml
with:
upload-page-artifact: false
build_push_docker:
name: Build dockerfiles
needs: [shamrock_linux_dpcpp]
uses: ./.github/workflows/build-dockerfiles.yml