You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<PackageVersionCondition="'$(SilkOriginalVersionSuffix)' != '' and $(PackageVersion.Contains('-'))">$(PackageVersion)$(SilkOriginalVersionSuffix)</PackageVersion>
208
+
<PackageVersionCondition="'$(SilkOriginalVersionSuffix)' != '' and !$(PackageVersion.Contains('-'))">$(PackageVersion)-$(SilkOriginalVersionSuffix)</PackageVersion>
198
209
</PropertyGroup>
210
+
<ErrorText="Native packages should have a version.txt file! Read documentation/for-contributors/build-system.md for more info."
211
+
Condition="'$(SilkNativePackage)' == 'true' and !Exists('$(SilkVersionTxtPath)')" />
The `targets_referenced` is one of the main exports from this job. The `workflow_filters` is used as an input to the
233
+
`dorny/paths-filter@v3`action which will determine which targets had any changes that match the patterns given in the
234
+
output array. This is so we can tell the user off for missing out `/build-native`s. Note that we try to edit an existing
235
+
comment so we're not constantly spamming the PR, which is why we use `peter-evans/find-comment@v3` and
236
+
`peter-evans/create-or-update-comment@v4`.
237
+
238
+
After this Stage 1 script has run, and we've tried to locate an existing comment, we run the Stage 2 script to determine
239
+
the matrix strategy and the contents of the comment we should add/update. This outputs something like the following to
240
+
`GITHUB_OUTPUT`:
241
+
```
242
+
matrix_strategy<<EOF
243
+
[
244
+
{
245
+
"target": "SDL",
246
+
"runtime": "osx",
247
+
"exec": "build-osx.sh",
248
+
"dir": "sources/SDL/Native"
249
+
}
250
+
]
251
+
EOF
252
+
comment_to_write=Some of the native library builds modified in this PR were not referenced in the PR description. Please ensure that the PR description contains \`/build-native SDL\`. These libraries won't be rebuilt without this being specified. If you believe this is in error, then please write a comment explaining why and ignore this suggestion. This comment will be automatically updated if rectified.
253
+
```
254
+
255
+
`matrix_strategy` is the actual JSON representation of what would be in the `matrix: strategy:` section of the GitHub
256
+
Workflow for the Build job. This is determined by the `build-*.{sh,cmd}` scripts added to the `NATIVE_LIBRARY_PATHS`
257
+
directories. `comment_to_write` is the... comment to write... Note that this Stage 2 script receives the output from the
258
+
`find-comment`action and this will indicate whether the issues have been resolved as appropriate (i.e. if we've already
259
+
told the PR author off and they've listened). If no comment should be written and we don't have a comment to update,
260
+
this is simply omitted.
261
+
262
+
The rest of the workflow continues as expected - the Build job essentially does exactly what is expected from the
263
+
`matrix_strategy`outputs and uploads the binaries as an artifact, which are all pulled down in the Commit Native
264
+
Binaries job and aggregated into a single commit.
265
+
266
+
To better understand the workflow scripts, it's probably better to just read through the
267
+
`eng/native/buildsystem/test-workflow-stages.sh`script as this has a number of different test cases, but the scripts
268
+
aren't too hard to understand if you're familiar with Bash.
269
+
86
270
## NUKE
87
271
88
272
NUKE is used to provide an easy interface into both MSBuild and our other non-C# or otherwise auxiliary build tasks.
0 commit comments