diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a22c8d50c8..f0fb8503d1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 }} diff --git a/_scripts/test.ps1 b/_scripts/test.ps1 index 8902a4a41f..4aeacc2e54 100644 --- a/_scripts/test.ps1 +++ b/_scripts/test.ps1 @@ -1,7 +1,8 @@ param ( [string]$target='CSharp', [string]$pc, - [string]$cc + [string]$cc, + [bool]$buildonly=$false ) function Get-GrammarSkip { @@ -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 + } } } } diff --git a/bnf/README.md b/bnf/README.md index 0a4dd6403f..6c02836e6b 100644 --- a/bnf/README.md +++ b/bnf/README.md @@ -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.