-
-
Notifications
You must be signed in to change notification settings - Fork 27
218 lines (209 loc) · 6.82 KB
/
test.yml
File metadata and controls
218 lines (209 loc) · 6.82 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
name: test and release CI
on:
push:
branches:
- main
- '*.preview'
pull_request:
branches:
- main
- '*.preview'
jobs:
test:
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toxic:tx22.4.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup nox
run: pip install nox
- name: lint
run: nox -s lint
- name: test-nnvg
run: nox -s nnvg-3.11
- name: test-doctest
run: nox -s doctest-3.11 rstdoctest-3.11
- name: test-pytest
run: nox -s test-3.11
- name: test-report
run: nox -s report
- name: package
run: nox -s package
- name: upload-coverage-reports
uses: actions/upload-artifact@v4
with:
name: coverage-reports
path: .nox/report/tmp/*
- name: upload-xunit-results
uses: actions/upload-artifact@v4
with:
name: xunit-results
path: .nox/test-3-11/tmp/xunit-result.xml
- name: upload-package
uses: actions/upload-artifact@v4
with:
name: pypi-package
path: .nox/package/tmp/dist/*
sonar:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: download-coverage-reports
uses: actions/download-artifact@v4
with:
name: coverage-reports
path: .nox/report/tmp/
- name: download-xunit-results
uses: actions/download-artifact@v4
with:
name: xunit-results
path: .nox/test-3-11/tmp/
- name: set-environment
run: |
echo NUNAVUT_MAJOR_MINOR_VERSION=$(./src/nunavut/_version.py --major-minor-only) >> $GITHUB_ENV
- name: verify nox artifacts
run: ls -R
working-directory: .nox
- name: report-release
if: ${{ github.event_name != 'pull_request' }}
uses: SonarSource/sonarqube-scan-action@v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
with:
args: >
-Dsonar.token=${{ env.SONAR_TOKEN }}
-Dsonar.buildString=${{ env.GITHUB_RUN_ID }}
-Dsonar.projectVersion=${{ env.NUNAVUT_MAJOR_MINOR_VERSION }}
-Dsonar.python.version=python3.11
-Dsonar.python.coverage.reportPaths=.nox/report/tmp/coverage.xml
-Dsonar.python.xunit.reportPath=.nox/test-3-11/tmp/xunit-result.xml
- name: report-pr
if: ${{ github.event_name == 'pull_request' }}
uses: SonarSource/sonarqube-scan-action@v6.0.0
env:
SONAR_TOKEN: "6526e88c286672a7852fea52056c4b6ea583aaf7"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: >
-Dsonar.token=${{ env.SONAR_TOKEN }}
-Dsonar.buildString=${{ env.GITHUB_RUN_ID }}
-Dsonar.projectVersion=${{ env.NUNAVUT_MAJOR_MINOR_VERSION }}
-Dsonar.python.version=python3.11
-Dsonar.python.coverage.reportPaths=.nox/report/tmp/coverage.xml
-Dsonar.python.xunit.reportPath=.nox/test-3-11/tmp/xunit-result.xml
compat-test-python3-windows-and-mac:
strategy:
matrix:
python3-version: ['11', '12', '13']
python3-platform: ['windows-latest', 'macos-latest']
runs-on: ${{ matrix.python3-platform }}
needs: test
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.${{ matrix.python3-version }}
- name: setup nox
run: pip3 install nox
- name: python3.${{ matrix.python3-version }} test
run: nox -s nnvg-3.${{ matrix.python3-version }} test-3.${{ matrix.python3-version }}
compat-test-python3-ubuntu:
strategy:
matrix:
python3-version: ['10', '11', '12', '13']
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toxic:tx22.4.3
needs: test
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup nox
run: pip install nox
- name: python3.${{ matrix.python3-version }} test
run: nox -s nnvg-3.${{ matrix.python3-version }} test-3.${{ matrix.python3-version }}
language-verification-c-cpp:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toolshed:ts24.4.3
strategy:
matrix:
architecture: [native32, native, arm-none-eabi]
compiler: [gcc, clang]
language: [c-11, c-11-arr-override, c-17, c-23, cpp-14, cetl-14-17, cpp-17, cpp-17-pmr, cpp-20, cpp-20-pmr]
exclude:
- architecture: native32
compiler: clang
- architecture: arm-none-eabi
compiler: clang
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: verify
working-directory: verification
run: cmake --workflow --preset workflow-${{ matrix.compiler }}-${{ matrix.architecture }}-${{ matrix.language }}
language-verification-c-clang-native-extra:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toolshed:ts24.4.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: verify
working-directory: verification
run: |
cmake -DNUNAVUT_EXTRA_GENERATOR_ARGS="--enable-override-variable-array-capacity;--embed-auditing-info" --preset configure-clang-native-c-11
cmake --build --preset build-DebugCov-clang-native-c-11 --target cov_all
- name: upload-verification-coverage-reports
uses: actions/upload-artifact@v4
with:
name: verification-c-coverage-reports
path: |
verification/build/DebugCov/coverage/html/
verification/build/DebugCov/coverage/lcov/
language-verification-cpp-clang-native-extra:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toolshed:ts24.4.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: verify
working-directory: verification
run: |
cmake -DNUNAVUT_EXTRA_GENERATOR_ARGS="--enable-override-variable-array-capacity;--embed-auditing-info" --preset configure-clang-native-cpp-20
cmake --build --preset build-DebugCov-clang-native-cpp-20 --target cov_all
- name: upload-verification-coverage-reports
uses: actions/upload-artifact@v4
with:
name: verification-cpp-coverage-reports
path: |
verification/build/DebugCov/coverage/html/
verification/build/DebugCov/coverage/lcov/
language-verification-python:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toxic:tx22.4.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: verify
run: |
cd verification/python
nox
env:
FORCE_COLOR: 1
continue-on-error: true