Skip to content

Commit

Permalink
(#92) Test: use the proper package name for installation
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed May 19, 2024
1 parent e7699b2 commit 6f8e0d6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
path: ${{ env.NUGET_PACKAGES }}
- name: Test
shell: pwsh
run: ./common/test.ps1 -NuGet $env:GITHUB_WORKSPACE/tools/nuget.exe -UseMono
run: ./common/test.ps1 -PackageName tdlib.native.linux-x64 -NuGet $env:GITHUB_WORKSPACE/tools/nuget.exe -UseMono
test-macos-aarch64:
needs:
- build-macos-aarch64
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
path: ${{ env.NUGET_PACKAGES }}
- name: Test
shell: pwsh
run: ./common/test.ps1 -NuGet nuget
run: ./common/test.ps1 -PackageName tdlib.native.osx-arm64 -NuGet nuget
test-macos-x86-64:
needs:
- build-macos-x86-64
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
path: ${{ env.NUGET_PACKAGES }}
- name: Test
shell: pwsh
run: ./common/test.ps1 -NuGet nuget
run: ./common/test.ps1 -PackageName tdlib.native.osx-x64 -NuGet nuget
test-windows-x86-64:
needs:
- build-windows-x86-64
Expand Down Expand Up @@ -287,7 +287,7 @@ jobs:
path: ${{ env.NUGET_PACKAGES }}
- name: Test
shell: pwsh
run: ./common/test.ps1 -NuGet nuget
run: ./common/test.ps1 -PackageName tdlib.native.win-x64 -NuGet nuget
release:
needs:
- build-linux-x86-64
Expand Down
3 changes: 2 additions & 1 deletion common/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ param (
[string] $PackageSource = "$BuildRoot/../build/nuget/",
[string] $TdSharpRoot = "$PSScriptRoot/../tdsharp",
[string] $TdSharpTestProjectName = 'TdLib.Tests',
[string] $PackageName = 'tdlib.native',
[Parameter(Mandatory = $true)]
[string] $PackageName,

[string] $NuGet = 'NuGet.exe',
[switch] $UseMono,
Expand Down
6 changes: 4 additions & 2 deletions github-actions.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,19 @@ type Workflows =

yield! afterDownloadSteps |> Option.toList |> Seq.collect id

let rid = $"{platformToDotNet platform}-{archToDotNet arch}"

setUpDotNetSdk
pwsh "Pack NuGet" (
$"dotnet pack tdlib.native.{platformToDotNet platform}-{archToDotNet arch}.proj" +
$"dotnet pack tdlib.native.{rid}.proj" +
" -p:Version=${{ env.PACKAGE_VERSION_BASE }}-preview --output build"
)
// TODO[#64]: Add ${{ github.run_id }} as a patch version
step(name = "NuGet cache", uses = "actions/cache@v4", options = Map.ofList [
"path", "${{ env.NUGET_PACKAGES }}"
"key", "${{ runner.os }}.nuget.${{ hashFiles('tdsharp/**/*.csproj') }}"
])
pwsh "Test" $"./common/test.ps1 {testArgs}"
pwsh "Test" $"./common/test.ps1 -PackageName tdlib.native.{rid} {testArgs}"
]

module Platform =
Expand Down

0 comments on commit 6f8e0d6

Please sign in to comment.