Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
67 changes: 39 additions & 28 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
"name": "C# (.NET)",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:0-6.0",
"features": {
"ghcr.io/devcontainers/features/dotnet:1": {
"installUsingApt": true,
"version": "6.0"
},
"ghcr.io/devcontainers/features/ruby:1": {
"version": "3.1"
"name": "C# (.NET) - Linux with Mono",
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm",
"onCreateCommand": "git submodule update --init --recursive",
"postAttachCommand": "bash .devcontainer/install-dependencies.sh",
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csdevkit"
],
"settings": {
"dotnet.server.useOmnisharp": false,
"files.watcherExclude": {
"**/bin/**": true,
"**/obj/**": true,
"**/.git/**": true,
"**/node_modules/**": true,
"**/.vs/**": true
},
"search.exclude": {
"**/bin": true,
"**/obj": true,
"**/node_modules": true
},
"files.eol": "\n"
}
}
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }
// Use 'postCreateCommand' to run commands after the container is created.
// Used for downloading all submodules and restoring dotnet tools as a part of dotnet CLI
"postCreateCommand": "git submodule init && git submodule update && dotnet tool restore"
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"containerEnv": {
"DOTNET_CLI_TELEMETRY_OPTOUT": "1",
"DOTNET_SKIP_FIRST_TIME_EXPERIENCE": "1",
"DOTNET_NOLOGO": "1",
"NUGET_XMLDOC_MODE": "skip",
"DOTNET_CLI_UI_LANGUAGE": "en",
"NUGET_PACKAGES": "${containerWorkspaceFolder}/.nuget/packages"
},
"remoteEnv": {
"PATH": "${containerEnv:PATH}:${containerWorkspaceFolder}/.dotnet/tools"
},
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"mounts": [
"source=ably-dotnet-nuget-cache,target=${containerWorkspaceFolder}/.nuget/packages,type=volume"
]
}
80 changes: 80 additions & 0 deletions .devcontainer/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/bin/bash
set -e

echo "=========================================="
echo "Installing dependencies for Ably .NET development..."
echo "=========================================="
echo ""

# Update package lists
echo "📦 Updating package lists..."
sudo apt-get update -qq
echo "✓ Package lists updated"
echo ""

# Install prerequisites
echo "📦 Installing prerequisites (gnupg, ca-certificates, wget)..."
sudo apt-get install -y gnupg ca-certificates wget
echo "✓ Prerequisites installed"
echo ""

# Note: Installing Mono from Debian's official repositories
echo "ℹ️ Using Mono from Debian official repositories (bookworm)"
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/debian stable-buster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
echo ""

# Add Microsoft package repository for .NET runtimes
echo "🔑 Adding Microsoft package repository..."
wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
echo "✓ Microsoft repository added"
echo ""

# Update package lists with Microsoft repository
echo "📦 Updating package lists..."
sudo apt-get update -qq
echo "✓ Package lists updated"
echo ""

# Install Mono and NuGet
echo "🔧 Installing Mono and NuGet (this may take a few minutes)..."
sudo apt-get install -y mono-complete nuget
echo "✓ Mono and NuGet installed"
echo ""

# Install .NET 6.0 runtime
echo "🔧 Installing .NET 6.0 runtime..."
sudo apt-get install -y dotnet-runtime-6.0
echo "✓ .NET 6.0 runtime installed"
echo ""

# Install .NET 7.0 runtime
echo "🔧 Installing .NET 7.0 runtime..."
sudo apt-get install -y dotnet-runtime-7.0
Comment thread
sacOO7 marked this conversation as resolved.
echo "✓ .NET 7.0 runtime installed"
echo ""

echo "=========================================="
echo "✅ All dependencies installed successfully!"
echo "=========================================="
echo ""

echo "📋 Installed versions:"
echo ""
echo "Mono version:"
mono --version | head -n 1
echo ""
echo ".NET Runtimes:"
dotnet --list-runtimes
echo ""
echo ".NET SDKs:"
dotnet --list-sdks
echo ""
echo "NuGet version:"
nuget help | head -n 1
echo ""
echo "=========================================="
echo "🎉 Setup complete! You can now build the project."
echo "=========================================="
12 changes: 6 additions & 6 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
dotnet-version: |
3.1.426
6.0.428
7.0.
7.0.410
Comment thread
sacOO7 marked this conversation as resolved.

- name: Setup Android SDK
uses: android-actions/setup-android@v3
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
run: dotnet tool restore

- name: Package
run: ./package-cake.cmd ${{ github.event.inputs.version }}
run: ./package.cmd ${{ github.event.inputs.version }}

- name: Archive package
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
run: dotnet tool restore

- name: Package Push (iOS & Android)
run: ./package-push-cake.sh ${{ github.event.inputs.version }}
run: ./package-push.sh ${{ github.event.inputs.version }}

- name: Archive push packages
uses: actions/upload-artifact@v4
Expand All @@ -147,7 +147,7 @@ jobs:
${{ github.workspace }}/*.nupkg

package-unity:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -164,7 +164,7 @@ jobs:
run: dotnet tool restore

- name: Package Unity
run: ./package-unity-cake.sh ${{ github.event.inputs.version }}
run: ./package-unity.sh ${{ github.event.inputs.version }}

- name: Archive Unity package
uses: actions/upload-artifact@v4
Expand All @@ -174,7 +174,7 @@ jobs:
${{ github.workspace }}/*.unitypackage

merge-artifacts:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [package-library, package-push, package-unity]
steps:
- name: Download all artifacts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/run-tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

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

Expand All @@ -34,7 +34,7 @@ jobs:
run: dotnet tool restore

- name: Unit tests
run: ./build-cake.sh --target=Test.NetStandard.Unit.WithRetry --framework=${{ matrix.targetframework }}
run: ./build.sh --target=Test.NetStandard.Unit.WithRetry --framework=${{ matrix.targetframework }}

- name: Integration tests
run: ./build-cake.sh --target=Test.NetStandard.Integration.WithRetry --framework=${{ matrix.targetframework }}
run: ./build.sh --target=Test.NetStandard.Integration.WithRetry --framework=${{ matrix.targetframework }}
10 changes: 5 additions & 5 deletions .github/workflows/run-tests-macos-mono.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

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

Expand All @@ -20,8 +20,8 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
7.0.408
3.1.426
7.0.410

- name: Download dotnet build-script tools
run: dotnet tool restore
Expand All @@ -31,7 +31,7 @@ jobs:
./tools/mono-install.sh

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

- name: Run Integration tests using mono
run: ./build-cake.sh --target=Test.NetFramework.Integration.WithRetry
run: ./build.sh --target=Test.NetFramework.Integration.WithRetry
6 changes: 3 additions & 3 deletions .github/workflows/run-tests-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

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

Expand All @@ -34,7 +34,7 @@ jobs:
run: dotnet tool restore

- name: Unit tests
run: ./build-cake.sh --target=Test.NetStandard.Unit.WithRetry --framework=${{ matrix.targetframework }}
run: ./build.sh --target=Test.NetStandard.Unit.WithRetry --framework=${{ matrix.targetframework }}

- name: Integration tests
run: ./build-cake.sh --target=Test.NetStandard.Integration.WithRetry --framework=${{ matrix.targetframework }}
run: ./build.sh --target=Test.NetStandard.Integration.WithRetry --framework=${{ matrix.targetframework }}
8 changes: 4 additions & 4 deletions .github/workflows/run-tests-windows-netframework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

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

Expand All @@ -20,13 +20,13 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
7.0.408
7.0.410

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

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

- name: Integration tests
run: ./build-cake.cmd --target=Test.NetFramework.Integration.WithRetry
run: ./build.cmd --target=Test.NetFramework.Integration.WithRetry
6 changes: 3 additions & 3 deletions .github/workflows/run-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

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

Expand All @@ -34,7 +34,7 @@ jobs:
run: dotnet tool restore

- name: Unit tests
run: ./build-cake.cmd --target=Test.NetStandard.Unit.WithRetry --framework=${{ matrix.targetframework }}
run: ./build.cmd --target=Test.NetStandard.Unit.WithRetry --framework=${{ matrix.targetframework }}

- name: Integration tests
run: ./build-cake.cmd --target=Test.NetStandard.Integration.WithRetry --framework=${{ matrix.targetframework }}
run: ./build.cmd --target=Test.NetStandard.Integration.WithRetry --framework=${{ matrix.targetframework }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ publish/
*.nupkg
# The packages folder can be ignored because of Package Restore
packages/
.nuget/
# except build/, which is used as an MSBuild target.
!packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
Expand Down
File renamed without changes.
File renamed without changes.
Loading
Loading