Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .github/workflows/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,48 +80,7 @@ jobs:
if: steps.command-extractor.outputs.result == 'xlf'
id: xlf
run: dotnet build src/Compiler /t:UpdateXlf
- name: Post ilverify start comment
if: steps.command-extractor.outputs.result == 'ilverify'
uses: actions/github-script@v3
with:
script: |
const body = `Started to run ilverify baseline update`;
await github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
});

- name: Process ilverify command (Update ILVerify baselines)
if: steps.command-extractor.outputs.result == 'ilverify'
id: ilverify
env:
TEST_UPDATE_BSL: 1
run: |
# Run the ilverify script with TEST_UPDATE_BSL=1
pwsh tests/ILVerify/ilverify.ps1

# Calculate the changes per file
echo "Checking for changes in baseline files..."
FILES_CHANGED=0
CHANGES_OUTPUT=""

for file in tests/ILVerify/*.bsl; do
if git diff --quiet "$file"; then
continue
else
FILES_CHANGED=$((FILES_CHANGED + 1))
LINES_CHANGED=$(git diff --numstat "$file" | awk '{print $1 + $2}')
CHANGES_OUTPUT="${CHANGES_OUTPUT}${file}: ${LINES_CHANGED} lines changed\n"
fi
done

if [ "$FILES_CHANGED" -eq 0 ]; then
echo "result=The ilverify command ran and did not modify any baseline." >> $GITHUB_OUTPUT
else
echo -e "result=The ilverify command ran and triggered the following number of changes per file:\n${CHANGES_OUTPUT}" >> $GITHUB_OUTPUT
fi
- name: Commit and push changes
if: steps.fantomas.outcome == 'success' || steps.xlf.outcome == 'success' || steps.ilverify.outcome == 'success'
run: |
Expand Down