Skip to content
Open
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
15 changes: 10 additions & 5 deletions .github/workflows/testing_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,15 @@ jobs:
firebird_password: "test_password"
isc_password: "masterkey"

- name: Checkout sources
uses: actions/checkout@v4

- name: Setup FirebirdSQL ${{ matrix.firebird }} on Windows
if: matrix.plataform == 'windows'
shell: pwsh
run: |
choco install firebird -params '/SuperClassic'
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
./ci-scripts/download_firebird_windows.ps1

- name: Setup FirebirdSQL ${{ matrix.firebird }} on MacOSX
if: matrix.plataform == 'macos'
Expand Down Expand Up @@ -175,6 +180,7 @@ jobs:
$found = Get-ChildItem -File -Recurse -Path $folder -Include $FileName -ea 0
Foreach ($source in $found) {
echo " - $source"
Copy-Item -Path $source
}
}
}
Expand All @@ -183,9 +189,6 @@ jobs:
Search-Common-Folders -FileName "fbclient_ms.lib"
Search-Common-Folders -FileName "isql.exe"

- name: Checkout sources
uses: actions/checkout@v2

- name: Create a alias to test.fdb on fb v2
if: matrix.firebird == 'v2'
run: |
Expand All @@ -209,7 +212,9 @@ jobs:
- name: Create database test.fdb in fb ${{ matrix.firebird }} on Windows
if: matrix.plataform == 'windows'
run: |
echo "CREATE DATABASE 'localhost:test.fdb';" | & "C:\Program Files\Firebird\Firebird_5_0\isql.exe" -bail -quiet -z -user SYSDBA -password masterkey
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
./ci-scripts/create_sysdba_user_windows.ps1
echo "CREATE DATABASE 'localhost:test.fdb';" | & "C:\Program Files\Firebird\isql.exe" -bail -quiet -z -user SYSDBA -password masterkey

- name: Create database test.fdb in fb ${{ matrix.firebird }} on MacOSX
if: matrix.plataform == 'macos'
Expand Down
3 changes: 3 additions & 0 deletions ci-scripts/create_sysdba_user_windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Stop-Service -Name 'FirebirdServerDefaultInstance' -Force
cmd /c "echo create user SYSDBA password 'masterkey'; exit; | ""C:\Program Files\Firebird\isql.exe"" -user sysdba employee"
Start-Service -Name 'FirebirdServerDefaultInstance'
43 changes: 43 additions & 0 deletions ci-scripts/download_firebird_windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
$repoApiUrl = "https://api.github.com/repos/FirebirdSQL/firebird/releases/latest"
$outputFolder = "C:\Program Files\Firebird"
$assetNamePattern = "*-windows-x64.zip"

New-Item -Path $outputFolder -ItemType "Directory"

try {
$release = Invoke-RestMethod -Uri $repoApiUrl
} catch {
Write-Error "Error get releases: $_"
exit
}

$asset = $release.assets | Where-Object { $_.name -like $assetNamePattern } | Select-Object -First 1

if (-not $asset) {
Write-Host "File by asset '$assetNamePattern' not found."
exit
}

$downloadUrl = $asset.browser_download_url
$outputPath = Join-Path $outputFolder $asset.name

Write-Host "Download $($asset.name)..."
try {
Invoke-WebRequest -Uri $downloadUrl -OutFile $outputPath
Write-Host "File successfully written: $outputPath"
} catch {
Write-Error "Error download file: $_"
}

Expand-Archive -Path $outputPath -DestinationPath $outputFolder -Force

Remove-Item $outputPath

Set-Location -Path $outputFolder

$currentPath = Get-Location

$runServiceFilename = "./install_service.bat"
& "$runServiceFilename"

Set-Location $currentPath
Loading