-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Record coq version info to GITHUB_STEP_SUMMARY for easier access
- Loading branch information
1 parent
e752f1b
commit 5824db7
Showing
5 changed files
with
48 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,40 @@ | ||
@echo off | ||
if not defined in_subprocess (cmd /k set in_subprocess=y ^& %0 %*) & exit ) | ||
if not defined in_subprocess (cmd /k set in_subprocess=y ^& %0 %*) & exit | ||
|
||
SET "SCRIPT_DIR=%~dp0" | ||
|
||
ECHO ::group::wmic cpu get caption, deviceid, name, numberofcores, maxclockspeed, status | ||
wmic cpu get caption, deviceid, name, numberofcores, maxclockspeed, status | ||
wmic cpu get caption, deviceid, name, numberofcores, maxclockspeed, status & | ||
ECHO ::endgroup:: | ||
ECHO ::group::wmic cpu list /format:list | ||
wmic cpu list /format:list | ||
wmic cpu list /format:list & | ||
ECHO ::endgroup:: | ||
ECHO ::group::git config -l | ||
%CYGWIN_ROOT%\bin\bash.exe -l -c 'git config -l' | ||
%CYGWIN_ROOT%\bin\bash.exe -l -c 'git config -l' & | ||
ECHO ::endgroup:: | ||
ECHO ::group::git config --global -l | ||
%CYGWIN_ROOT%\bin\bash.exe -l -c 'git config --global -l' | ||
%CYGWIN_ROOT%\bin\bash.exe -l -c 'git config --global -l' & | ||
ECHO ::endgroup:: | ||
ECHO ::group::opam list | ||
opam list | ||
opam list & | ||
ECHO ::endgroup:: | ||
ECHO ::group::ocamlc -config | ||
opam exec -- ocamlc -config | ||
opam exec -- ocamlc -config & | ||
ECHO ::endgroup:: | ||
ECHO ::group::coqc --config | ||
opam exec -- coqc --config | ||
opam exec -- coqc --config & | ||
ECHO ::endgroup:: | ||
ECHO ::group::coqc --version | ||
opam exec -- coqc --version | ||
opam exec -- coqc --version & | ||
ECHO ::endgroup:: | ||
ECHO ::group::coqtop version | ||
echo | opam exec -- coqtop | ||
opam exec -- coqtop <nul & | ||
ECHO ::endgroup:: | ||
ECHO ::group::make printenv | ||
%CYGWIN_ROOT%\bin\bash.exe -l -c 'cd "%cd%"; opam exec -- make printenv' | ||
%CYGWIN_ROOT%\bin\bash.exe -l -c 'cd "%cd%"; opam exec -- make printenv' & | ||
ECHO ::endgroup:: | ||
ECHO ::group::PATH | ||
%CYGWIN_ROOT%\bin\bash.exe -l -c 'cd "%cd%"; echo "${PATH}"' | ||
%CYGWIN_ROOT%\bin\bash.exe -l -c 'cd "%cd%"; echo "${PATH}"' & | ||
ECHO ::endgroup:: | ||
|
||
powershell -ExecutionPolicy Bypass -File "%SCRIPT_DIR%github-actions-record-coq-info.ps1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Get the short version of coqc | ||
$COQC_VERSION_SHORT = & opam exec -- coqc --print-version 2>$null | Select-Object -First 1 | ||
|
||
# Get the full version of coqc, replace new lines with commas, and remove trailing comma | ||
$COQC_VERSION = & opam exec -- coqc --version 2>$null | ForEach-Object { $_ -join ',' } | ForEach-Object { $_ -replace ',$', '' } | ||
|
||
# Run coqtop and capture both stdout and stderr | ||
$COQTOP_VERSION = "" | & opam exec -- coqtop 2>$null | ||
|
||
# Check if GITHUB_STEP_SUMMARY and COQC_VERSION are not empty | ||
if (![string]::IsNullOrEmpty($env:GITHUB_STEP_SUMMARY) -and ![string]::IsNullOrEmpty($COQC_VERSION)) { | ||
# Append details to GITHUB_STEP_SUMMARY | ||
"<details><summary>$COQC_VERSION</summary>" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append | ||
"``````" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append | ||
$COQTOP_VERSION | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append | ||
"``````" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append | ||
"</details>" | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
# summarize coqc version to make it easier to read | ||
COQC_VERSION_SHORT="$(coqc --print-version 2>/dev/null | cut -d " " -f 1)" | ||
COQC_VERSION="$(coqc --version 2>/dev/null | tr '\n' ',' | sed 's/,$//g')" | ||
COQTOP_VERSION="$(true | coqtop 2>&1)" | ||
if [ ! -z "$GITHUB_STEP_SUMMARY" ] && [ ! -z "$COQC_VERSION" ]; then | ||
printf '%s\n\n' "<details><summary>${COQC_VERSION}</summary>" >> "$GITHUB_STEP_SUMMARY" | ||
printf '%s\n' '```' >> "$GITHUB_STEP_SUMMARY" | ||
printf '%s\n' "${COQTOP_VERSION} >> "$GITHUB_STEP_SUMMARY" | ||
printf '%s\n%s\n' '```' '</details>' >> "$GITHUB_STEP_SUMMARY" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
andres-erbsen
Contributor
|
||
fi |
https://github.com/mit-plv/fiat-crypto/actions/runs/8694265860/job/23842795253?pr=1864