Skip to content

Commit

Permalink
[build] Fix for #4326 -- GitHub Action VMs running MacOS are unreliab…
Browse files Browse the repository at this point in the history
…le. (#4327)

* Fix for #4326

* Try again.
  • Loading branch information
kaby76 authored Nov 17, 2024
1 parent 0120854 commit 6d94809
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 19 deletions.
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.

0 comments on commit 6d94809

Please sign in to comment.