Skip to content

Commit 3d666eb

Browse files
committed
csharp native
1 parent fae1f47 commit 3d666eb

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- crystal
3333
- scala
3434
- csharp
35+
- csharp-native
3536
- coffeescript
3637
- kotlin
3738
- java

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ rss.txt
2222
GPATH
2323
GRTAGS
2424
GTAGS
25+
bin/
26+
obj/
27+
out/
28+
*.csproj

docker/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ RUN apt-get install -y swi-prolog && apt-get clean
2727
RUN apt-get install -y tcl && apt-get clean
2828
RUN apt-get install -y valac && apt-get clean
2929

30+
RUN wget https://packages.microsoft.com/config/ubuntu/23.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
31+
&& dpkg -i packages-microsoft-prod.deb \
32+
&& rm packages-microsoft-prod.deb \
33+
&& apt-get update
34+
35+
RUN apt-get install -y dotnet-sdk-8.0 && apt-get clean
36+
3037
RUN curl -fSL https://deb.nodesource.com/setup_lts.x | bash - \
3138
&& apt-get install -y nodejs && apt-get clean \
3239
&& npm install --global coffeescript

justfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,24 @@ build-csharp: (_check "mcs mono") && (_size "count.exe") (_sizet "bytecode")
322322
mcs -o+ ./count.cs
323323
echo 'mono ./count.exe {{i}}' > CMD
324324

325+
build-csharp-native: (_check "dotnet") && (_size "count")
326+
dotnet --version > VERSION
327+
echo '<Project Sdk="Microsoft.NET.Sdk"> \
328+
<PropertyGroup> \
329+
<OutputType>Exe</OutputType> \
330+
<TargetFramework>net6.0</TargetFramework> \
331+
<PublishSingleFile>true</PublishSingleFile> \
332+
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> \
333+
<SelfContained>true</SelfContained> \
334+
<RuntimeIdentifier>linux-x64</RuntimeIdentifier> \
335+
</PropertyGroup> \
336+
<ItemGroup> \
337+
<Compile Include="count.cs" /> \
338+
</ItemGroup> \
339+
</Project>' > count.csproj
340+
DOTNET_CLI_TELEMETRY_OPTOUT="true" dotnet publish -c Release -o out count.csproj
341+
echo './out/count {{i}}' > CMD
342+
325343
build-ocaml: (_check "ocaml")
326344
ocaml --version > VERSION
327345
echo 'ocaml ./count.ml {{i}}' > CMD

0 commit comments

Comments
 (0)