1
- name : Build Nabla Workflow
1
+ name : Build
2
2
3
3
on :
4
4
push :
7
7
8
8
permissions :
9
9
contents : read
10
+ checks : write
10
11
11
12
concurrency :
12
13
group : push-lock-${{ github.ref }}
13
14
cancel-in-progress : true
14
15
15
16
jobs :
16
17
build-windows :
17
- runs-on : windows-2022
18
+ name : Nabla (${{ matrix.os }}, ${{ matrix.vendor }}-${{ matrix.tag }}, ${{ matrix.config }})
19
+ runs-on : ${{ matrix.os }}
18
20
19
21
env :
20
22
image : ghcr.io/devsh-graphics-programming/docker-nanoserver-msvc-winsdk
33
35
vendor : [msvc]
34
36
config : [Release, Debug, RelWithDebInfo]
35
37
tag : ['17.13.6']
38
+ os : [windows-2022]
36
39
37
40
steps :
38
41
- name : Environment Setup
@@ -129,7 +132,30 @@ jobs:
129
132
--preset ci-build-dynamic-${{ matrix.vendor }} `
130
133
-t run-compiler-explorer --config ${{ matrix.config }}
131
134
132
- - name : Container – Build Examples
135
+ - name : Container – Install Nabla
136
+ run : |
137
+ docker exec orphan `
138
+ ${{ env.entry }} ${{ env.cmd }} -Command cmake --install `
139
+ ${{ env.binary }} --config ${{ matrix.config }} `
140
+ --prefix ${{ env.install }}
141
+
142
+ - name : API / Examples / Check Run (Create)
143
+ id : check-run-create
144
+ uses : actions/github-script@v6
145
+ with :
146
+ github-token : ${{ secrets.GITHUB_TOKEN }}
147
+ result-encoding : string
148
+ script : |
149
+ const response = await github.rest.checks.create({
150
+ owner: context.repo.owner,
151
+ repo: context.repo.repo,
152
+ name: `Examples (${{ matrix.os }}, ${{ matrix.vendor }}-${{ matrix.tag }}, ${{ matrix.config }})`,
153
+ head_sha: context.sha,
154
+ status: 'in_progress'
155
+ });
156
+ return response.data.id;
157
+
158
+ - name : Container – Build & Install Examples
133
159
id : build-examples
134
160
continue-on-error : true
135
161
run : |
@@ -139,21 +165,39 @@ jobs:
139
165
-t examples_tests\all --config ${{ matrix.config }} `
140
166
-- -k 0
141
167
142
- - name : Container – Install Nabla
143
- run : |
144
168
docker exec orphan `
145
169
${{ env.entry }} ${{ env.cmd }} -Command cmake --install `
146
- ${{ env.binary }} --config ${{ matrix.config }} `
170
+ ${{ env.binary }}\examples_tests --config ${{ matrix.config }} `
147
171
--prefix ${{ env.install }}
148
172
149
- - name : Container – Install Examples
150
- id : install-examples
151
- continue-on-error : true
173
+ - name : API / Examples / Check Run (Conclusion)
174
+ id : outcome-examples
152
175
run : |
153
- docker exec orphan `
154
- ${{ env.entry }} ${{ env.cmd }} -Command cmake --install `
155
- ${{ env.binary }}\examples_tests --config ${{ matrix.config }} `
156
- --prefix ${{ env.install }}
176
+ $completedAt = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
177
+ if ("${{ steps.build-examples.outcome }}" -eq "success") {
178
+ "conclusion=success" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
179
+ } else {
180
+ "conclusion=failure" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
181
+ }
182
+ "completed_at=$completedAt" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
183
+
184
+ - name : API / Examples / Check Run (Update)
185
+ uses : actions/github-script@v6
186
+ with :
187
+ github-token : ${{ secrets.GITHUB_TOKEN }}
188
+ script : |
189
+ await github.rest.checks.update({
190
+ owner: context.repo.owner,
191
+ repo: context.repo.repo,
192
+ check_run_id: ${{ steps.check-run-create.outputs.result }},
193
+ status: 'completed',
194
+ conclusion: '${{ steps.outcome-examples.outputs.conclusion }}',
195
+ completed_at: '${{ steps.outcome-examples.outputs.completed_at }}',
196
+ output: {
197
+ title: '',
198
+ summary: '[View logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) to see details.'
199
+ }
200
+ });
157
201
158
202
- name : Container – Save NSC Image
159
203
run : |
0 commit comments