Skip to content

Commit

Permalink
github action #116
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefvand committed Nov 26, 2024
1 parent 6f5f6c5 commit 86912c2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,22 @@ jobs:
$bisonPath = "C:\ProgramData\chocolatey\bin\bison.exe"
if (-not (Test-Path $bisonPath)) {
Write-Host "bison is not available via Chocolatey. Installing manually..."
$bisonUrl = "https://sourceforge.net/projects/gnuwin32/files/bison/2.4.1/bison-2.4.1-bin.zip/download"
$bisonUrl = "https://downloads.sourceforge.net/project/gnuwin32/bison/2.4.1/bison-2.4.1-bin.zip"
$bisonDir = "C:\bison"
$bisonZip = "$bisonDir\bison.zip"
New-Item -ItemType Directory -Path $bisonDir -Force
Invoke-WebRequest -Uri $bisonUrl -OutFile $bisonZip
Expand-Archive -Path $bisonZip -DestinationPath $bisonDir
# Download the file
Invoke-WebRequest -Uri $bisonUrl -OutFile $bisonZip -UseBasicParsing
# Ensure the ZIP file exists and is valid
if (-not (Test-Path $bisonZip)) {
Write-Host "Error: bison ZIP file was not downloaded correctly."
exit 1
}
# Extract the ZIP archive
Expand-Archive -Path $bisonZip -DestinationPath $bisonDir -Force
$env:PATH += ";$bisonDir\bin"
[System.Environment]::SetEnvironmentVariable("PATH", $env:PATH, [System.EnvironmentVariableTarget]::Process)
} else {
Expand Down

0 comments on commit 86912c2

Please sign in to comment.