Skip to content

Commit

Permalink
⬆️ Update build system and deprecate .NET Core 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pleonex committed Dec 5, 2021
1 parent 1aa9470 commit cd9d278
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 40 deletions.
14 changes: 3 additions & 11 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:6.0

# Install .NET Core 3.1
RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y apt-transport-https \
&& apt-get update \
&& apt-get install -y aspnetcore-runtime-3.1

# Install Mono
RUN apt install -y gnupg ca-certificates \
# Install Mono (for DocFX)
RUN apt install -y apt-transport-https dirmngr gnupg ca-certificates \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
&& echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" >> /etc/apt/sources.list.d/mono-official-stable.list \
&& echo "deb https://download.mono-project.com/repo/debian stable-buster main" >> tee /etc/apt/sources.list.d/mono-official-stable.list \
&& apt update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt install -y mono-devel
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Dev (Ubuntu - .NET 6, 3.1 and Mono)",
"name": "Dev (.NET 6 and Mono)",
"build": {
"dockerfile": "Dockerfile",
},
Expand All @@ -18,12 +18,12 @@

"remoteUser": "vscode",

// Required for Podman (Docker alternative)
// PODMAN ONLY. You may need to remove this line for Docker.
// SELinux issues: https://github.com/containers/podman/issues/3683
"runArgs": [ "--security-opt", "label=disable", "--userns=keep-id" ],

// Podman issues: https://github.com/microsoft/vscode-remote-release/issues/3231
"containerEnv": {
"HOME": "/home/vscode"
}
}
}
13 changes: 0 additions & 13 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:

env:
NET_SDK: '6.0.100'
NET31_SDK: '3.1.415'

jobs:
build_main:
Expand All @@ -28,10 +27,6 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NET_SDK }}
- name: "Setup .NET Core 3.1 for Cake dependencies"
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NET31_SDK }}

- name: "Install build tools"
run: dotnet tool restore
Expand Down Expand Up @@ -77,10 +72,6 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NET_SDK }}
- name: "Setup .NET Core 3.1 for Cake dependencies"
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NET31_SDK }}

- name: "Install build tools"
run: dotnet tool restore
Expand Down Expand Up @@ -115,10 +106,6 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NET_SDK }}
- name: "Setup .NET Core 3.1 for Cake dependencies"
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NET31_SDK }}

- name: "Install build tools"
run: dotnet tool restore
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Cake: Run Build for release",
"program": "${workspaceFolder}/src/Yarhl.PerformanceTests/bin/Release/net5.0/Yarhl.PerformanceTests.dll",
"program": "${workspaceFolder}/src/Yarhl.PerformanceTests/bin/Release/net6.0/Yarhl.PerformanceTests.dll",
"args": [ "auto" ],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ provide an small snippet of code that reproduces the issue. Try to provide also
the following information:

- OS: Linux / Windows / Mac OS
- Runtime: .NET Framework, Mono, .NET Core, .NET 5
- Runtime: .NET Framework, Mono, .NET 6
- Version of Yarhl
- Stacktrace if any
- What's happening and what you expect to happen
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ Stable releases are available from nuget.org:
The libraries target .NET Standard 2.0. The tests (so the library) runs with the
supported runtimes:

- .NET 5.0
- .NET Core 3.1
- .NET 6.0
- .NET Framework 4.8 or Mono (latest on CI)

Preview releases can be found in this
Expand All @@ -53,9 +52,8 @@ your solution (.sln) file with the following content:

## Build

The project requires to build .NET 5.0 SDK, .NET Core 3.1 runtime and .NET
Framework 4.8 or latest Mono. If you open the project with VS Code and you did
install the
The project requires to build .NET 6.0 SDK and .NET Framework 4.8 or latest
Mono. If you open the project with VS Code and you did install the
[VS Code Remote Containers](https://code.visualstudio.com/docs/remote/containers)
extension, you can have an already pre-configured development environment with
Docker or Podman.
Expand Down
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#load "nuget:?package=PleOps.Cake&version=0.5.1"
#load "nuget:?package=PleOps.Cake&version=0.6.1"

Task("Define-Project")
.Description("Fill specific project information")
Expand Down
2 changes: 2 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Copyright>Copyright (C) 2019 SceneGate</Copyright>

<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<NoWarn>NETSDK1179</NoWarn>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -13,6 +14,7 @@
<RepositoryUrl>https://github.com/SceneGate/Yarhl</RepositoryUrl>
<PackageIcon>icon.png</PackageIcon>
<PackageTags>translation;localization;romhacking;fan-translation</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<!-- Deterministic and source link -->
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />

<PackageVersion Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="8.31.0.39249" />
<PackageVersion Include="Roslynator.Analyzers" Version="3.2.2" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="8.32.0.39516" />
<PackageVersion Include="Roslynator.Analyzers" Version="3.3.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Yarhl.IntegrationTests/Yarhl.IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<Description>Plugin integration tests for Yarhl.</Description>
<TargetFrameworks>netcoreapp3.1;net48;net6.0</TargetFrameworks>
<TargetFrameworks>net48;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Yarhl.UnitTests/Yarhl.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<Description>Yarhl unit tests.</Description>
<TargetFrameworks>netcoreapp3.1;net48;net6.0</TargetFrameworks>
<TargetFrameworks>net48;net6.0</TargetFrameworks>
<LangVersion>9.0</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Yarhl/Yarhl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<None Include="../../docs/images/favicon-128.png" Pack="true" PackagePath="$(PackageIcon)" Visible="false" />
<None Include="../../README.md" Pack="true" PackagePath="README.md" Visible="false" />
<None Include="../../README.md" Pack="true" PackagePath="$(PackageReadmeFile)" Visible="false" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit cd9d278

Please sign in to comment.