Skip to content

Commit

Permalink
Merge branch 'dotnet'
Browse files Browse the repository at this point in the history
* dotnet:
  csharp-native: disable restore during build
  merge csharp-native into a single docker step
  fix size check
  csharp native
  • Loading branch information
acheronfail committed Jan 23, 2024
2 parents fae14c7 + fae1d44 commit f10910e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- crystal
- scala
- csharp
- csharp-native
- coffeescript
- kotlin
- java
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ rss.txt
GPATH
GRTAGS
GTAGS
bin/
obj/
out/
*.csproj
7 changes: 7 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ RUN apt-get install -y swi-prolog && apt-get clean
RUN apt-get install -y tcl && apt-get clean
RUN apt-get install -y valac && apt-get clean

RUN curl -fSL https://packages.microsoft.com/config/ubuntu/23.04/packages-microsoft-prod.deb > packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y dotnet-sdk-8.0 \
&& apt-get clean

RUN curl -fSL https://deb.nodesource.com/setup_lts.x | bash - \
&& apt-get install -y nodejs && apt-get clean \
&& npm install --global coffeescript
Expand Down
20 changes: 20 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,26 @@ build-csharp: (_check "mcs mono") && (_size "count.exe") (_sizet "bytecode")
mcs -o+ ./count.cs
echo 'mono ./count.exe {{i}}' > CMD

build-csharp-native: (_check "dotnet") && (_size "./out/count")
#!/usr/bin/env bash
dotnet --version > VERSION
echo '<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<OptimizationPreference>Speed</OptimizationPreference>
</PropertyGroup>
<ItemGroup>
<Compile Include="count.cs" />
</ItemGroup>
</Project>' > count.csproj
DOTNET_CLI_TELEMETRY_OPTOUT="true" dotnet publish --no-restore -c Release -o out count.csproj
echo './out/count {{i}}' > CMD
build-ocaml: (_check "ocaml")
ocaml --version > VERSION
echo 'ocaml ./count.ml {{i}}' > CMD
Expand Down

0 comments on commit f10910e

Please sign in to comment.