-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathverify_source_generated_changes_are_persisted.yml
More file actions
37 lines (30 loc) · 1.35 KB
/
verify_source_generated_changes_are_persisted.yml
File metadata and controls
37 lines (30 loc) · 1.35 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
name: Verify source generator changes have been persisted
on:
pull_request:
workflow_dispatch:
jobs:
verify_source_generators:
runs-on: windows-latest
timeout-minutes: 34 # max + 3*std over the last 3700 runs
permissions:
contents: read
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1
with:
global-json-file: global.json
- name: "Regenerating package versions"
run: .\tracer\build.ps1 Restore CompileManagedSrc
- name: "Verify no changes in generated files"
run: |
git diff --quiet -- .\tracer\src\Datadog.Trace\Generated .\tracer\src\Datadog.Tracer.Native\Generated .\tracer\build\supported_calltargets.g.json
if ($LASTEXITCODE -eq 1) {
git diff -- .\tracer\src\Datadog.Trace\Generated .\tracer\src\Datadog.Tracer.Native\Generated .\tracer\build\supported_calltargets.g.json
Write-Error "Found changes in Generated folder. Build the solution locally using Nuke and ensure you have committed all source generated files."
Exit 1
} else {
echo "No changes found to generated files"
}