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 46b4714 commit 0afe332
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 35 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: CI

on: [push, pull_request]

env:
DOTNET_SDK_VERSION: '3.1.403'

jobs:

build:
Expand All @@ -14,10 +11,8 @@ jobs:
os: [ubuntu-latest, windows-latest]
configuration: [Debug, Release]
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
- name: Build and test
shell: pwsh
run: ./build-and-test.ps1 -configuration ${{ matrix.configuration }}
Expand All @@ -27,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 }}
15 changes: 10 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"version": "0.1.0",
"version": "2.0.0",
"command": "dotnet",
"isShellCommand": true,
"args": [],
"tasks": [
{
"taskName": "build",
"label": "build",
"type": "shell",
"command": "dotnet",
"args": [
"build",
"${workspaceRoot}/src/IxMilia.Iges.Test/IxMilia.Iges.Test.csproj"
],
"isBuildCommand": true,
"problemMatcher": "$msCompile"
"problemMatcher": "$msCompile",
"group": {
"_id": "build",
"isDefault": false
}
}
]
}
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "8.0.300",
"rollForward": "latestMinor"
}
}
2 changes: 1 addition & 1 deletion src/IxMilia.Iges.Test/IgesEntityReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ 208 0 0 1 0 D 6
");
Assert.Equal(new IgesPoint(1.0, 2.0, 3.0), flag.Location);
Assert.Equal(0.1, flag.RotationAngle);
Assert.Equal(1, flag.Leaders.Count);
Assert.Single(flag.Leaders);
}

[Fact, Trait(Traits.Feature, Traits.Features.Reading)]
Expand Down
12 changes: 4 additions & 8 deletions src/IxMilia.Iges.Test/IxMilia.Iges.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

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

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
<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>

</Project>
4 changes: 0 additions & 4 deletions src/IxMilia.Iges/IgesFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,30 +66,26 @@ public IgesFile()
Entities = new List<IgesEntity>();
}

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

public void Save(Stream stream)
{
new IgesFileWriter().Write(this, stream);
}

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

public static IgesFile Load(Stream stream)
{
Expand Down
8 changes: 2 additions & 6 deletions src/IxMilia.Iges/IxMilia.Iges.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Copyright>Copyright 2018</Copyright>
<AssemblyTitle>IxMilia.Iges</AssemblyTitle>
<Authors>IxMilia</Authors>
<TargetFrameworks>netstandard1.0;netstandard1.3</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyName>IxMilia.Iges</AssemblyName>
<PackageId>IxMilia.Iges</PackageId>
<PackageTags>CAD;IGES;IGS</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>

0 comments on commit 0afe332

Please sign in to comment.