Skip to content

Commit

Permalink
(#55) Test: use correct package location on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed May 26, 2024
1 parent 190e3d2 commit cf03d0c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ jobs:
path: build/tdlib.native.osx-arm64/runtimes/osx-arm64/native
- name: Verify library dependencies
shell: pwsh
run: ./macos/Test-Dependencies.ps1 -DotNetArch arm64
run: ./macos/Test-Dependencies.ps1 -DotNetArch arm64 -PackageName tdlib.native.osx-arm64
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:
path: build/tdlib.native.osx-x64/runtimes/osx-x64/native
- name: Verify library dependencies
shell: pwsh
run: ./macos/Test-Dependencies.ps1 -DotNetArch x64
run: ./macos/Test-Dependencies.ps1 -DotNetArch x64 -PackageName tdlib.native.osx-x64
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
Expand Down
30 changes: 18 additions & 12 deletions github-actions.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,18 +241,21 @@ let workflows = [
$"Set-Location {dir} && zip -r $env:GITHUB_WORKSPACE/{Names.ciArtifact platform arch}.zip *"
]

let testLinuxDependencies platform arch =
pwsh "Verify library dependencies" (
"./linux/Test-Dependencies.ps1" +
$" -Platform {platform}" +
$" -PackageName {Names.package platform arch}"
)

Workflows.TestJob(
image = ubuntu20_04,
platform = Platform.Ubuntu20_04,
arch = Arch.X86_64,
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}" +
$" -PackageName {Names.package Platform.Ubuntu20_04 Arch.X86_64}"
)
testLinuxDependencies Platform.Ubuntu20_04 Arch.X86_64
]
)

Expand All @@ -263,21 +266,24 @@ 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}" +
$" -PackageName {Names.package Platform.Ubuntu22_04 Arch.X86_64}"
)
testLinuxDependencies Platform.Ubuntu22_04 Arch.X86_64
]
)

let testMacOsDependencies platform arch =
pwsh "Verify library dependencies" (
"./macos/Test-Dependencies.ps1" +
$" -DotNetArch {Names.archToDotNet arch}" +
$" -PackageName {Names.package platform arch}"
)

Workflows.TestJob(
image = macOs14,
platform = Platform.MacOS,
arch = Arch.AArch64,
testArgs = "-NuGet nuget",
afterDownloadSteps = [
pwsh "Verify library dependencies" $"./macos/Test-Dependencies.ps1 -DotNetArch {Names.archToDotNet Arch.AArch64}"
testMacOsDependencies Platform.MacOS Arch.AArch64
]
)

Expand All @@ -287,7 +293,7 @@ let workflows = [
arch = Arch.X86_64,
testArgs = "-NuGet nuget",
afterDownloadSteps = [
pwsh "Verify library dependencies" $"./macos/Test-Dependencies.ps1 -DotNetArch {Names.archToDotNet Arch.X86_64}"
testMacOsDependencies Platform.MacOS Arch.X86_64
]
)

Expand Down
4 changes: 3 additions & 1 deletion macos/Test-Dependencies.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
param (
[Parameter(Mandatory = $true)]
[string] $DotNetArch,
[Parameter(Mandatory = $true)]
[string] $PackageName,
[string] $RepoRoot = "$PSScriptRoot/..",
[string] $Package = "$RepoRoot/build/runtimes/macos-$DotNetArch/native",
[string] $Package = "$RepoRoot/build/$PackageName/runtimes/macos-$DotNetArch/native",
[string] $GoldFile = "$RepoRoot/macos/libraries.$DotNetArch.gold.txt",
[string] $ResultFile = "$RepoRoot/macos/libraries.temp.txt",
[string] $LddApple = "$RepoRoot/ldd-apple/ldd-apple.sh",
Expand Down

0 comments on commit cf03d0c

Please sign in to comment.