Skip to content

Commit

Permalink
Build all C# solutions in CI (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
externl authored Feb 13, 2025
1 parent a37cfbe commit 2467f1c
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 12 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ jobs:
- name: Windows Environment
if: runner.os == 'Windows'
run: |
echo "Platform=x64" >> $env:GITHUB_ENV
echo "Configuration=Release" >> $env:GITHUB_ENV
echo "IceHome=${{ github.workspace }}\ice" >> $env:GITHUB_ENV
# We need to replace \ with / in the path, specifically for Gradle
$iceHome = "${{ github.workspace }}/ice"
$iceHome = $iceHome.Replace("\", "/")
Expand All @@ -49,7 +45,6 @@ jobs:
if: runner.os != 'Windows'
run: |
echo "ICE_HOME=${{ github.workspace }}/ice" >> $GITHUB_ENV
echo "IceHome=${{ github.workspace }}/ice" >> $GITHUB_ENV
- name: Checkout Ice
uses: actions/checkout@v4
Expand All @@ -66,12 +61,12 @@ jobs:
timeout-minutes: 60
with:
working_directory: ice
build_flags: ${{ runner.os == 'Windows' && '/t:BuildDist' || 'srcs' }}
build_flags: ${{ runner.os == 'Windows' && '/t:BuildDist /p:Configuration=Release /p:Platform=x64' || 'srcs' }}

- name: Publish C# NuGet Packages
timeout-minutes: 5
working-directory: ice/csharp/msbuild
run: dotnet msbuild ice.proj /t:Publish
run: dotnet msbuild ice.proj /t:Publish /p:Configuration=Release /p:Platform=x64

- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -91,8 +86,8 @@ jobs:
find . -name CMakeLists.txt -type f | while IFS= read -r file; do
dir=$(dirname "$file");
cmake -B "$dir/build" -S "$dir" -DIce_DEBUG=ON
cmake --build "$dir/build" --config Release
cmake -B "$dir/build" -S "$dir" -DIce_DEBUG=ON -DCMAKE_BUILD_TYPE=Release
cmake --build "$dir/build"
done
if: runner.os != 'Windows'

Expand All @@ -113,10 +108,28 @@ jobs:
- name: Build C# Demos
timeout-minutes: 20
working-directory: ice-demos/csharp
run: dotnet build
run: |
find . -name '*.sln' -type f | while IFS= read -r file; do
dotnet build "$file"
done
if: runner.os != 'Windows'

- name: Build C# Demos
timeout-minutes: 20
working-directory: ice-demos/csharp
run: |
Get-ChildItem -Recurse -Filter *.sln | ForEach-Object {
dotnet build $_.FullName
}
if: runner.os == 'Windows'

- name: Run .NET format
run: dotnet format --verify-no-changes "./ice-demos/csharp/C# NET demos.sln"
working-directory: ice-demos/csharp
run: |
find . -name '*.sln' -type f | while IFS= read -r file; do
dotnet format --verify-no-changes "$file"
done
shell: bash
if: runner.os == 'Linux'

- name: Build Java Demos
Expand Down
1 change: 1 addition & 0 deletions csharp/Ice/Callback/Client/MockAlarmClock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ internal class MockAlarmClock : AlarmClockDisp_

private bool _needMoreTime = true;

/// <inheritdoc/>
// Implements the abstract method Ring from the AlarmClockDisp_ class generated by the Slice compiler.
public override ButtonPressed Ring(string message, Ice.Current current)
{
Expand Down
1 change: 1 addition & 0 deletions csharp/Ice/Callback/Server/SimpleWakeUpService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Server;
/// <summary>SimpleWakeUpService is an Ice servant that implements Slice interface WakeUpService.</summary>
internal class SimpleWakeUpService : WakeUpServiceDisp_
{
/// <inheritdoc/>
// Implements the abstract method WakeMeUp from the WakeUpServiceDisp_ class generated by the Slice compiler.
public override void WakeMeUp(AlarmClockPrx? alarmClock, long timeStamp, Ice.Current current)
{
Expand Down
1 change: 1 addition & 0 deletions csharp/Ice/Config/Server/Chatbot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Server;
/// <summary>Chatbot is an Ice servant that implements Slice interface Greeter.</summary>
internal class Chatbot : GreeterDisp_
{
/// <inheritdoc/>
// Implements the abstract method Greet from the GreeterDisp_ class generated by the Slice compiler.
// This variant is the synchronous implementation.
public override string Greet(string name, Ice.Current current)
Expand Down
2 changes: 1 addition & 1 deletion csharp/Ice/Filesystem/Server/MDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ internal class MDirectory : Filesystem.DirectoryDisp_
internal MDirectory(string name) => _name = name;

/// <summary>Adds a node to this directory.</summary>
/// <param name="child">The node proxy to add</param>
/// <param name="child">The node proxy to add.</param>
internal void AddChild(Filesystem.NodePrx child) => _contents.Add(child);
}
1 change: 1 addition & 0 deletions csharp/Ice/Forwarder/ForwardingServer/Forwarder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ internal class Forwarder : Ice.Object
// A template for the target proxy.
private readonly Ice.ObjectPrx _targetTemplate;

/// <inheritdoc/>
// Implements abstract method dispatchAsync defined on Ice.Object.
public async ValueTask<OutgoingResponse> dispatchAsync(IncomingRequest request)
{
Expand Down
1 change: 1 addition & 0 deletions csharp/Ice/Forwarder/Server/Chatbot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Server;
/// <summary>Chatbot is an Ice servant that implements Slice interface Greeter.</summary>
internal class Chatbot : GreeterDisp_
{
/// <inheritdoc/>
// Implements the abstract method Greet from the GreeterDisp_ class generated by the Slice compiler.
// This variant is the synchronous implementation.
public override string Greet(string name, Ice.Current current)
Expand Down
1 change: 1 addition & 0 deletions csharp/Ice/Greeter/Server/Chatbot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Server;
/// <summary>Chatbot is an Ice servant that implements Slice interface Greeter.</summary>
internal class Chatbot : GreeterDisp_
{
/// <inheritdoc/>
// Implements the abstract method Greet from the GreeterDisp_ class generated by the Slice compiler.
// This variant is the synchronous implementation.
public override string Greet(string name, Ice.Current current)
Expand Down
1 change: 1 addition & 0 deletions csharp/Ice/Greeter/ServerAMD/Chatbot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace ServerAMD;
/// <summary>Chatbot is an Ice servant that implements Slice interface Greeter.</summary>
internal class Chatbot : GreeterDisp_
{
/// <inheritdoc/>
// Implements the abstract method GreetAsync from the GreeterDisp_ class generated by the Slice compiler.
// This version uses the Asynchronous Method Dispatch (AMD) variant.
public override async Task<string> GreetAsync(string name, Ice.Current current)
Expand Down

0 comments on commit 2467f1c

Please sign in to comment.