Skip to content

Update commands.yml #18608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2025
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