Skip to content
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

[build] Fix for #4326 -- GitHub Action VMs running MacOS are unreliable. #4327

Merged
merged 2 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 8 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
- name: Upgrade Pip.
run: |
python -m ensurepip --upgrade
- name: Test Pip.
- name: Test Pip
run: |
pip --version
- name: Install Antlr tool
Expand Down Expand Up @@ -162,7 +162,13 @@ jobs:
$Before = "${{ github.event.before }}"
$After = "${{ github.event.after }}"
}
_scripts/test.ps1 -target ${{ matrix.language }} -pc "$Before" -cc "$After"
if ("${{ matrix.os }}" -eq "ubuntu-latest") {
_scripts/test.ps1 -target ${{ matrix.language }} -pc "$Before" -cc "$After"
} elseif ("${{ matrix.os }}" -eq "windows-latest") {
_scripts/test.ps1 -target ${{ matrix.language }} -pc "$Before" -cc "$After"
} elseif ("${{ matrix.os }}" -eq "macos-latest") {
_scripts/test.ps1 -target ${{ matrix.language }} -pc "$Before" -cc "$After" -buildonly:1
}

static-check:
runs-on: ${{ matrix.os }}
Expand Down
36 changes: 19 additions & 17 deletions _scripts/test.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
param (
[string]$target='CSharp',
[string]$pc,
[string]$cc
[string]$cc,
[bool]$buildonly=$false
)

function Get-GrammarSkip {
Expand Down Expand Up @@ -123,22 +124,23 @@ function Test-Grammar {
}

# test
$start2 = Get-Date
Write-Host "--- Testing files ---"
$workingDirectory = Get-Location
Write-Host "The pwd is $workingDirectory"
./test.ps1
$passed = $LASTEXITCODE -eq 0

if (! $passed) {
$success = $false
$failStage = [FailStage]::Test
Write-Host "Test completed, time: $((Get-Date) - $start2)" -ForegroundColor Yellow
Set-Location $cwd
return @{
Success = $success
Stage = $failStage
FailedCases = $failedList
if (! $buildonly) {
$start2 = Get-Date
Write-Host "--- Testing files ---"
$workingDirectory = Get-Location
Write-Host "The pwd is $workingDirectory"
./test.ps1
$passed = $LASTEXITCODE -eq 0
if (! $passed) {
$success = $false
$failStage = [FailStage]::Test
Write-Host "Test completed, time: $((Get-Date) - $start2)" -ForegroundColor Yellow
Set-Location $cwd
return @{
Success = $success
Stage = $failStage
FailedCases = $failedList
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions bnf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ https://dl.acm.org/doi/pdf/10.1145/366193.366201
https://www.softwarepreservation.org/projects/ALGOL/paper/Backus-Syntax_and_Semantics_of_Proposed_IAL.pdf

https://dl.acm.org/doi/pdf/10.1145/355588.365140

### Issues
* Grammar is ambiguous.
Loading