Skip to content

Commit

Permalink
(#55) Tests: proper paths for Linux dependency testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed May 26, 2024
1 parent 54bbf25 commit 9b44eb0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:
path: build/tdlib.native.ubuntu-20.04-x64/runtimes/linux-x64/native
- name: Verify library dependencies
shell: pwsh
run: ./linux/Test-Dependencies.ps1 -Platform ubuntu-20.04
run: ./linux/Test-Dependencies.ps1 -Platform ubuntu-20.04 -PackageName tdlib.native.ubuntu-20.04-x64
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
path: build/tdlib.native.linux-x64/runtimes/linux-x64/native
- name: Verify library dependencies
shell: pwsh
run: ./linux/Test-Dependencies.ps1 -Platform ubuntu-22.04
run: ./linux/Test-Dependencies.ps1 -Platform ubuntu-22.04 -PackageName tdlib.native.linux-x64
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
Expand Down
12 changes: 10 additions & 2 deletions github-actions.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ let workflows = [
installScript = "./linux/install.ps1 -ForTests",
testArgs = "-NuGet $env:GITHUB_WORKSPACE/tools/nuget.exe -UseMono",
afterDownloadSteps = [
pwsh "Verify library dependencies" $"./linux/Test-Dependencies.ps1 -Platform {Platform.Ubuntu20_04}"
pwsh "Verify library dependencies" (
"./linux/Test-Dependencies.ps1" +
$" -Platform {Platform.Ubuntu20_04}" +
$" -PackageName {Names.package Platform.Ubuntu20_04 Arch.X86_64}"
)
]
)

Expand All @@ -259,7 +263,11 @@ let workflows = [
installScript = "./linux/install.ps1 -ForTests",
testArgs = "-NuGet $env:GITHUB_WORKSPACE/tools/nuget.exe -UseMono",
afterDownloadSteps = [
pwsh "Verify library dependencies" $"./linux/Test-Dependencies.ps1 -Platform {Platform.Ubuntu22_04}"
pwsh "Verify library dependencies" (
"./linux/Test-Dependencies.ps1" +
$" -Platform {Platform.Ubuntu22_04}" +
$" -PackageName {Names.package Platform.Ubuntu22_04 Arch.X86_64}"
)
]
)

Expand Down
9 changes: 6 additions & 3 deletions linux/Test-Dependencies.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
param (
[Parameter(Mandatory = $true)]
[string] $Platform,
[string] $Package = "$PSScriptRoot/../build/runtimes/linux-x64/native",
[string] $GoldFile = "$PSScriptRoot/../linux/libraries.$Platform.gold.txt",
[string] $ResultFile = "$PSScriptRoot/../linux/libraries.temp.txt",
[Parameter(Mandatory = $true)]
[string] $PackageName,
[string] $RepoRoot = "$PSScriptRoot/..",
[string] $Package = "$RepoRoot/build/$PackageName/runtimes/linux-x64/native",
[string] $GoldFile = "$RepoRoot/linux/libraries.$Platform.gold.txt",
[string] $ResultFile = "$RepoRoot/linux/libraries.temp.txt",
[switch] $GenerateGold
)

Expand Down

0 comments on commit 9b44eb0

Please sign in to comment.