|
80 | 80 | if: steps.command-extractor.outputs.result == 'xlf' |
81 | 81 | id: xlf |
82 | 82 | run: dotnet build src/Compiler /t:UpdateXlf |
83 | | - - name: Post ilverify start comment |
84 | | - if: steps.command-extractor.outputs.result == 'ilverify' |
85 | | - uses: actions/github-script@v3 |
86 | | - with: |
87 | | - script: | |
88 | | - const body = `Started to run ilverify baseline update`; |
89 | | - await github.issues.createComment({ |
90 | | - issue_number: context.issue.number, |
91 | | - owner: context.repo.owner, |
92 | | - repo: context.repo.repo, |
93 | | - body: body |
94 | | - }); |
95 | 83 |
|
96 | | - - name: Process ilverify command (Update ILVerify baselines) |
97 | | - if: steps.command-extractor.outputs.result == 'ilverify' |
98 | | - id: ilverify |
99 | | - env: |
100 | | - TEST_UPDATE_BSL: 1 |
101 | | - run: | |
102 | | - # Run the ilverify script with TEST_UPDATE_BSL=1 |
103 | | - pwsh tests/ILVerify/ilverify.ps1 |
104 | | - |
105 | | - # Calculate the changes per file |
106 | | - echo "Checking for changes in baseline files..." |
107 | | - FILES_CHANGED=0 |
108 | | - CHANGES_OUTPUT="" |
109 | | - |
110 | | - for file in tests/ILVerify/*.bsl; do |
111 | | - if git diff --quiet "$file"; then |
112 | | - continue |
113 | | - else |
114 | | - FILES_CHANGED=$((FILES_CHANGED + 1)) |
115 | | - LINES_CHANGED=$(git diff --numstat "$file" | awk '{print $1 + $2}') |
116 | | - CHANGES_OUTPUT="${CHANGES_OUTPUT}${file}: ${LINES_CHANGED} lines changed\n" |
117 | | - fi |
118 | | - done |
119 | | - |
120 | | - if [ "$FILES_CHANGED" -eq 0 ]; then |
121 | | - echo "result=The ilverify command ran and did not modify any baseline." >> $GITHUB_OUTPUT |
122 | | - else |
123 | | - echo -e "result=The ilverify command ran and triggered the following number of changes per file:\n${CHANGES_OUTPUT}" >> $GITHUB_OUTPUT |
124 | | - fi |
125 | 84 | - name: Commit and push changes |
126 | 85 | if: steps.fantomas.outcome == 'success' || steps.xlf.outcome == 'success' || steps.ilverify.outcome == 'success' |
127 | 86 | run: | |
|
0 commit comments