Skip to content

Commit

Permalink
update SDK and TFMs
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed Aug 30, 2024
1 parent 7602b74 commit f7837de
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 26 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
os: [ubuntu-latest, windows-latest]
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
- name: Build and test
shell: pwsh
run: ./build-and-test.ps1 -configuration ${{ matrix.configuration }}
Expand All @@ -22,9 +22,7 @@ jobs:
needs: [build]
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
- run: .\build-and-test.ps1 -configuration Release -notest
- run: dotnet nuget push .\artifacts\packages\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.100",
"version": "8.0.100",
"rollForward": "latestMinor"
}
}
14 changes: 5 additions & 9 deletions src/IxMilia.Stl.Test/IxMilia.Stl.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\IxMilia.Stl\IxMilia.Stl.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

</Project>
</Project>
8 changes: 2 additions & 6 deletions src/IxMilia.Stl/IxMilia.Stl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Copyright>Copyright 2018</Copyright>
<AssemblyTitle>IxMilia.Stl</AssemblyTitle>
<Authors>IxMilia</Authors>
<TargetFrameworks>netstandard1.0;netstandard1.3</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyName>IxMilia.Stl</AssemblyName>
<PackageId>IxMilia.Stl</PackageId>
<PackageTags>CAD;STL</PackageTags>
Expand All @@ -18,12 +18,8 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<DefineConstants>$(DefineConstants);HAS_FILESYSTEM_ACCESS</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

</Project>
4 changes: 0 additions & 4 deletions src/IxMilia.Stl/StlFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,27 @@ public StlFile()
Triangles = new List<StlTriangle>();
}

#if HAS_FILESYSTEM_ACCESS
public void Save(string path, bool asAscii = true)
{
using (var stream = new FileStream(path, FileMode.Create))
{
Save(stream, asAscii);
}
}
#endif

public void Save(Stream stream, bool asAscii = true)
{
var writer = new StlWriter();
writer.Write(this, stream, asAscii);
}

#if HAS_FILESYSTEM_ACCESS
public static StlFile Load(string path)
{
using (var stream = new FileStream(path, FileMode.Open))
{
return Load(stream);
}
}
#endif

public static StlFile Load(Stream stream)
{
Expand Down

0 comments on commit f7837de

Please sign in to comment.