Skip to content

Commit

Permalink
Merge pull request #1215 from ably/feature/support-net6.0
Browse files Browse the repository at this point in the history
Support net6.0,net7.0 and MAUI
  • Loading branch information
sacOO7 authored May 10, 2023
2 parents d7c9c85 + eefe118 commit 4d78097
Show file tree
Hide file tree
Showing 60 changed files with 2,188 additions and 1,099 deletions.
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 }}
39 changes: 39 additions & 0 deletions .github/workflows/run-tests-macos-xamarin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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: |
./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 build project](https://fake.build/guide/getting-started.html#Run-FAKE-using-a-dedicated-build-project).
- 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

0 comments on commit 4d78097

Please sign in to comment.