Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support net6.0,net7.0 and MAUI #1215

Merged
merged 72 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
a4cc157
Added net6.0 target to netstandard project
sacOO7 Mar 15, 2023
882abe8
Suppressed dispose compile error for net6.0 build
sacOO7 Mar 15, 2023
76df615
Added net7.0 target to netstandard project
sacOO7 Mar 15, 2023
251ec7a
Fixed compiler error caused by net7.0 target, renamed kvp to Kvp
sacOO7 Mar 15, 2023
426f1d2
Included net6.0 and net7.0 build DLLs into nuspec file
sacOO7 Mar 15, 2023
7ab7331
Added net6.0 and net7.0 targets inside dotnetcore test project
sacOO7 Mar 15, 2023
d942634
Updated README, included support for .Net 6 and .Net 7
sacOO7 Mar 15, 2023
c1a2128
Fixed github test workflow, supported additional dotnet version insta…
sacOO7 Mar 15, 2023
f796273
Added platform identifiers for for dotnet 6 and dotnet 7
sacOO7 Mar 15, 2023
a845610
Upgraded .Net core test project to support .NET6 and .NET7
sacOO7 Mar 17, 2023
b854d86
Replaced references to dotnetcore2.0 with NET6_NET7
sacOO7 Mar 17, 2023
4e40ff5
Update dotnet command to install fake tool from local manifest
sacOO7 Mar 17, 2023
bd0623f
Upgraded fake cli to 6.0.0, updated github workflow for the same
sacOO7 Mar 17, 2023
f6f433e
Updated fake tool to latest major version of 5.x
sacOO7 Mar 17, 2023
cf7ee26
Updated dotnet tools, deleted old lock fsx lock file
sacOO7 Mar 17, 2023
0c19451
Simplified naming convention for net6/net7 test project
sacOO7 Mar 19, 2023
c2ea93d
Updated global.json to support latest version of SDK
sacOO7 Mar 19, 2023
a23be39
Created a separate project for fake scripts, moved build.fsx to the p…
sacOO7 Mar 20, 2023
245f3ce
Fixed build error for fake project using right dependency imports
sacOO7 Mar 20, 2023
449ead3
Fixed build, refactored packet dependencies
sacOO7 Mar 20, 2023
a255f6c
Refactored build.fs file
sacOO7 Mar 20, 2023
296689e
Included F# specific tools for formatting and building docs in dotnet…
sacOO7 Apr 10, 2023
0e68cef
Added propertygroup to select netstandard as targetframework for mono
sacOO7 Apr 11, 2023
92691ab
Upgraded notificationPublisher SDK support to net6.0
sacOO7 Apr 11, 2023
4c032a6
Updated DOTNET tests core target to netcore for mono runtime build
sacOO7 Apr 11, 2023
c451ba0
Fixed issues for mono runtime for xamarin
sacOO7 Apr 11, 2023
fe18466
Updated notificationpublisher proj lang version to C# 9
sacOO7 Apr 12, 2023
395fec3
Fixed restore xamarin path in build script
sacOO7 Apr 12, 2023
a339db1
Updated restore xamarin step, set to XamarinSolution
sacOO7 Apr 13, 2023
6fa096a
Added dotnet runtime identifier for dotnet6 and dotnet7
sacOO7 Apr 13, 2023
8b9c0d3
Added comments to process OS specific agent headers
sacOO7 Apr 13, 2023
538c045
Added netframework solution to xamarin instead of dotnet6/dotnet7 tests
sacOO7 Apr 13, 2023
f3856e7
Added netframework project to xamarin solution
sacOO7 Apr 13, 2023
6b5f050
Added script to install latest version of mono on macOS CI
sacOO7 Apr 14, 2023
1b83cda
Marked mono script as executable
sacOO7 Apr 14, 2023
4bb97f9
Added osIdentifier method to detect the OS of the underlying platform
sacOO7 Apr 14, 2023
74f8fdb
Fixed notification publisher loglevel
sacOO7 Apr 14, 2023
af7fb51
Added agent header for identifying the underlying operating system
sacOO7 Apr 14, 2023
81cb7b3
Removed unncessary target for netcoreapp from dotnet tests
sacOO7 Apr 14, 2023
c33e2a2
Fixed tests for os identifier
sacOO7 Apr 14, 2023
eda6206
Removed unnecessary top level build.fsx file
sacOO7 Apr 14, 2023
769d862
Fixed package push script, reusing buish script instead
sacOO7 Apr 14, 2023
c7b2110
Updated supported platforms as per netstandard 2.0 compatibility chart
sacOO7 Apr 14, 2023
855ab60
Fixed failing tests for agent headers
sacOO7 Apr 15, 2023
60e5958
Added links to the famous dotnet tools
sacOO7 Apr 15, 2023
afba4c4
Formatted build script using fantomas
sacOO7 Apr 15, 2023
8450336
Fixed tests for agent headers
sacOO7 Apr 15, 2023
30c3154
Added option to choose the target framework to run the test
sacOO7 Apr 15, 2023
349dfb6
Updated github workflow, added targets for net6.0 and net7.0
sacOO7 Apr 15, 2023
eea8e79
Refactored github workflow, added net6.0 and net6.0 targets for all p…
sacOO7 Apr 15, 2023
f952f49
Refactored step to run integration tests with retry in build script file
sacOO7 Apr 15, 2023
277bd9e
Updated github workflows to run tests with retry
sacOO7 Apr 15, 2023
b48763a
Updated build.fs, added targets for netframework test retry
sacOO7 Apr 15, 2023
c9cb2f6
Updated windows netframework workflow to run tests with retry
sacOO7 Apr 15, 2023
2825f06
Added README to build script folder
sacOO7 Apr 15, 2023
e962640
Updated build script to fix xamarin project restore
sacOO7 Apr 15, 2023
597505b
Updated macos xamarin build workflow, removed unnecessary nuget restore
sacOO7 Apr 15, 2023
612d359
Updated xamarin restore step from nuget CLI
sacOO7 Apr 15, 2023
eff73bd
Refactored agent header implementation, moved to a separate file
sacOO7 Apr 16, 2023
a6f72b5
Added operating system under agents to the capabilities.yaml file
sacOO7 Apr 16, 2023
24092d0
Updated build.fs to by default build for Netstandard project
sacOO7 Apr 16, 2023
134f6f8
Updated build script README, added section for runnint unit
sacOO7 Apr 16, 2023
4f29898
Added steps to test xamarin build against netframework
sacOO7 Apr 17, 2023
d1cc43f
Added step to create nuget package in build script README
sacOO7 Apr 17, 2023
6da24c1
Refactored xamarin macOS build file
sacOO7 Apr 17, 2023
005b6f6
Refactored contributing doc as per comments, removed windows dependency
sacOO7 Apr 28, 2023
ec94c07
Refactored ably agent header test for removing keys
sacOO7 Apr 28, 2023
1238d6d
Refactored OS static class from static readonly string to const
sacOO7 Apr 28, 2023
1e4b09b
Added dotnet runtime version to runtime identifier
sacOO7 Apr 29, 2023
cf17e47
Added test to check dotnetRuntimeIdentifier should also contain version
sacOO7 Apr 29, 2023
d2d9925
marked mono-install script as executable, removed unnecessary step fr…
sacOO7 May 5, 2023
eefe118
Added dispose method to the jwtSandboxSpec, implemented dispose for h…
sacOO7 May 5, 2023
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
1 change: 1 addition & 0 deletions .ably/capabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ common-version: 1.2.0
compliance:
Agent Identifier:
Agents:
Operating System:
Runtime:
Authentication:
API Key:
Expand Down
26 changes: 24 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,33 @@
"version": 1,
"isRoot": true,
"tools": {
"paket": {
"version": "7.2.0",
"commands": [
"paket"
],
"_link": "https://github.com/fsprojects/Paket"
},
"fake-cli": {
"version": "5.20.3",
"version": "5.23.1",
"commands": [
"fake"
]
],
"_link": "https://github.com/fsprojects/FAKE"
},
"fsdocs-tool": {
"version": "17.2.0",
"commands": [
"fsdocs"
],
"_link": "https://github.com/fsprojects/FSharp.Formatting"
},
"fantomas": {
"version": "5.1.5",
"commands": [
"fantomas"
],
"_link": "https://github.com/fsprojects/fantomas"
}
}
}
27 changes: 0 additions & 27 deletions .github/workflows/integration-test-linux.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/integration-test-macos.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/integration-test-windows.yml

This file was deleted.

16 changes: 11 additions & 5 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ jobs:
with:
submodules: 'recursive'
- name: Download dotnet framework
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'
dotnet-version: |
3.1.x
6.0.x
7.0.x
- name: Download fake-cli
run: dotnet tool install fake-cli --version 5.20.4 --tool-path .
run: dotnet tool restore
- name: Package
run: ./package.cmd ${{ github.event.inputs.version }}
- name: Archive package
Expand All @@ -38,9 +41,12 @@ jobs:
with:
submodules: 'recursive'
- name: Download dotnet framework
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'
dotnet-version: |
3.1.x
6.0.x
7.0.x
- name: Download fake-cli
run: dotnet tool install fake-cli --version 5.20.4 --tool-path .
- name: Restore packages
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/run-tests-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Unit and Integration Test: Linux"
on:
pull_request:
push:
branches:
- main

jobs:
check:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true

strategy:
matrix:
targetframework: [ "net6.0", "net7.0" ]

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Download dotnet framework
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x

- name: Download dotnet build-script tools
run: dotnet tool restore

- name: Unit tests
run: ./build.sh Test.NetStandard.Unit.WithRetry -f ${{ matrix.targetframework }}

- name: Integration tests
run: ./build.sh Test.NetStandard.Integration.WithRetry -f ${{ matrix.targetframework }}
40 changes: 40 additions & 0 deletions .github/workflows/run-tests-macos-xamarin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Unit and Integration Test: macOS (Xamarin)"
on:
pull_request:
push:
branches:
- main

jobs:
check:
runs-on: macos-latest
env:
DOTNET_NOLOGO: true

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Download dotnet framework
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x

- name: Download dotnet build-script tools
run: dotnet tool restore

- name: Install mono
run: |
chmod +x ./tools/mono-install.sh
./tools/mono-install.sh

- name: Build Xamarin projects
run: ./build.sh Build.Xamarin

- name: Run Unit tests using mono
run: ./build.sh Test.NetFramework.Unit.WithRetry

- name: Run Integration tests using mono
run: ./build.sh Test.NetFramework.Integration.WithRetry
37 changes: 37 additions & 0 deletions .github/workflows/run-tests-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Unit and Integration Test: macOS"
on:
pull_request:
push:
branches:
- main

jobs:
check:
runs-on: macos-latest
env:
DOTNET_NOLOGO: true

strategy:
matrix:
targetframework: [ "net6.0", "net7.0" ]

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Download dotnet framework
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x

- name: Download dotnet build-script tools
run: dotnet tool restore

- name: Unit tests
run: ./build.sh Test.NetStandard.Unit.WithRetry -f ${{ matrix.targetframework }}

- name: Integration tests
run: ./build.sh Test.NetStandard.Integration.WithRetry -f ${{ matrix.targetframework }}
26 changes: 26 additions & 0 deletions .github/workflows/run-tests-windows-netframework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Unit and Integration Test: Windows (NetFramework)"
on:
pull_request:
push:
branches:
- main

jobs:
check:
runs-on: windows-latest
env:
DOTNET_NOLOGO: true

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Download dotnet build-script tools
run: dotnet tool restore

- name: Unit tests
run: ./build.cmd Test.NetFramework.Unit.WithRetry

- name: Integration tests
run: ./build.cmd Test.NetFramework.Integration.WithRetry
37 changes: 37 additions & 0 deletions .github/workflows/run-tests-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Unit and Integration Test: Windows"
on:
pull_request:
push:
branches:
- main

jobs:
check:
runs-on: windows-latest
env:
DOTNET_NOLOGO: true

strategy:
matrix:
targetframework: [ "net6.0", "net7.0" ]

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Download framework
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x

- name: Download dotnet build-script tools
run: dotnet tool restore

- name: Unit tests
run: ./build.cmd Test.NetStandard.Unit.WithRetry -f ${{ matrix.targetframework }}

- name: Integration tests
run: ./build.cmd Test.NetStandard.Integration.WithRetry -f ${{ matrix.targetframework }}
11 changes: 2 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,8 @@

## Building and Packaging

The build scripts are written using ```fake``` and need to be run on Windows with Visual Studio 2019 installed. Fake and nuget.exe can be installed via [chocolatey](https://chocolatey.org)

```shell
choco install fake
choco install nuget.commandline
```

Running `.\build.cmd` will start the build process and run the tests. By default it runs the NetFramework tests.
To run the Netcore build and tests you can run `.\build.cmd Test.NetStandard`
- The build scripts are written using [fake](https://fake.build/index.html) and need to be run on Windows with Visual Studio 2019+ installed.
marto83 marked this conversation as resolved.
Show resolved Hide resolved
- For more information on building, testing and packaging, take a look at [FAKE build scripts](./build-script/README.md).

## Working from source

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ This is a .NET client library for Ably. The library currently targets the [Ably

## Supported platforms

* .NET (Core) 3.1+
* .NET Framework 4.8
* .NET Standard 2.0+
* [.NET Standard 2.0+](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0)
* .NET 6.x, 7.x (MAUI supported)
* .NET Framework 4.6+
* .NET (Core) 2.0+
* Mono 5.4+
* [Xamarin.Android 8.0+](https://developer.xamarin.com/releases/android/xamarin.android_8/xamarin.android_8.0/)
* [Xamarin.iOS 11.4+](https://developer.xamarin.com/releases/ios/xamarin.ios_11/xamarin.ios_11.4/)
* [Xamarin.iOS 10.14+](https://developer.xamarin.com/releases/ios/xamarin.ios_10/xamarin.ios_10.14/)
* Xamarin.Mac 3.8+

## Push notification

Expand Down Expand Up @@ -49,7 +51,6 @@ The [Push Notifications Readme](PushNotifications.md) describes:

## Known Limitations
* Browser push notifications in [Blazor](https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blazor) are not supported.
* [MAUI framework](https://dotnet.microsoft.com/en-us/apps/maui) is under testing and not yet fully supported, see [MAUI issue](https://github.com/ably/ably-dotnet/issues/1205).

## Documentation

Expand Down
Loading