From dadd132b91515df95229ba95727bf3922527e5e6 Mon Sep 17 00:00:00 2001 From: Benito Palacios Sanchez Date: Thu, 23 Nov 2023 09:49:50 +0100 Subject: [PATCH 1/5] :shirt: Warning cleanup with StyleCop --- .editorconfig | 6 +----- src/Directory.Packages.props | 2 +- src/Yarhl.Examples/Formats/AdvancedConverters.cs | 4 +++- src/Yarhl.Media.Text/Encodings/SimpleSpanEncoding.cs | 4 ++-- src/Yarhl.PerformanceTests/Encodings/EncodingSpan.cs | 8 ++++---- ...rmWithInterfaces.cs => NodeTransformWithInterfaces.cs} | 0 .../FileFormat/ConvertFormatTests.FormatInheritance.cs | 1 + .../FileFormat/ConvertFormatTests.Obsolete4.cs | 1 + src/Yarhl.UnitTests/FileFormat/FormatExtensionsTests.cs | 6 +----- .../TestConvertersDefinition.FormatInheritance.cs | 3 +++ .../FileFormat/TestConvertersDefinition.cs | 2 ++ .../IO/StreamFormat/LazyFileStreamTests.cs | 4 ++-- .../IO/StreamFormat/RecyclableMemoryStreamTests.cs | 4 ++-- src/Yarhl.UnitTests/Media/Text/ReplacerTests.cs | 4 ++-- src/Yarhl.UnitTests/Plugins/TestConvertersDefinition.cs | 2 ++ src/Yarhl.sln | 4 ++-- src/Yarhl/FileSystem/NavigationMode.cs | 4 ++-- src/Yarhl/IO/{EndianessMode.cs => EndiannessMode.cs} | 0 18 files changed, 31 insertions(+), 28 deletions(-) rename src/Yarhl.PerformanceTests/FileSystem/{Node.TransformWithInterfaces.cs => NodeTransformWithInterfaces.cs} (100%) rename src/Yarhl/IO/{EndianessMode.cs => EndiannessMode.cs} (100%) diff --git a/.editorconfig b/.editorconfig index 28b321a7..74ecb07a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -240,14 +240,9 @@ dotnet_diagnostic.IDE0045.severity = suggestion # Simplify ifs dotnet_diagnostic.IDE0046.severity = suggestion # Simplify ifs ### StyleCop -dotnet_diagnostic.SA1000.severity = none # false positive, space before parentheses in new() -dotnet_diagnostic.SA1009.severity = none # false positive with ()! for null checking -dotnet_diagnostic.SA1011.severity = none # False positive due to nullables dotnet_diagnostic.SA1101.severity = none # Do not force to prefix local calls with 'this' -dotnet_diagnostic.SA1313.severity = none # Pascal naming broken with records. dotnet_diagnostic.SA1204.severity = suggestion # Static methods should be before non-static dotnet_diagnostic.SA1500.severity = none # Allow inline braces -dotnet_diagnostic.SA1516.severity = none # Multiple blank lines - broken with top-level statements dotnet_diagnostic.SA1633.severity = none # No XML-format header in source files ### SonarAnalyzer @@ -266,6 +261,7 @@ dotnet_diagnostic.CA1062.severity = none # No need to validate args in test meth dotnet_diagnostic.CA1305.severity = none # No culture method for quick test code dotnet_diagnostic.CA1307.severity = none # No culture method for quick test code dotnet_diagnostic.SA0001.severity = none # Disable documentation +dotnet_diagnostic.SA1402.severity = none # Multiple types in the same file dotnet_diagnostic.SA1600.severity = none # Disable documentation dotnet_diagnostic.SA1601.severity = none # Disable documentation dotnet_diagnostic.SA1201.severity = none # Allow enums inside classes diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 97a97595..09376af9 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -15,7 +15,7 @@ - + \ No newline at end of file diff --git a/src/Yarhl.Examples/Formats/AdvancedConverters.cs b/src/Yarhl.Examples/Formats/AdvancedConverters.cs index 11c32385..1e555c64 100644 --- a/src/Yarhl.Examples/Formats/AdvancedConverters.cs +++ b/src/Yarhl.Examples/Formats/AdvancedConverters.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2023 SceneGate +// Copyright (c) 2023 SceneGate // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,6 +23,8 @@ namespace Yarhl.Examples.Formats; using Yarhl.FileSystem; using Yarhl.IO; +#pragma warning disable SA1649 // File name match type name + #region ManyToOneFont public class Font2Binary : IConverter { diff --git a/src/Yarhl.Media.Text/Encodings/SimpleSpanEncoding.cs b/src/Yarhl.Media.Text/Encodings/SimpleSpanEncoding.cs index a7b0c971..91bd0f6f 100644 --- a/src/Yarhl.Media.Text/Encodings/SimpleSpanEncoding.cs +++ b/src/Yarhl.Media.Text/Encodings/SimpleSpanEncoding.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2020 SceneGate +// Copyright (c) 2020 SceneGate // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -300,7 +300,7 @@ public override string GetString(byte[] bytes, int index, int count) ArgumentNullException.ThrowIfNull(bytes); int length = GetCharCount(bytes.AsSpan(index, count)); - return string.Create(length, ValueTuple.Create(this, bytes, index, count), (chars, state) => + return string.Create(length, (this, bytes, index, count), (chars, state) => { var (encoding, stateBytes, stateIndex, stateCount) = state; _ = encoding.GetChars(stateBytes.AsSpan(stateIndex, stateCount), chars); diff --git a/src/Yarhl.PerformanceTests/Encodings/EncodingSpan.cs b/src/Yarhl.PerformanceTests/Encodings/EncodingSpan.cs index 48efa2c8..6909a31e 100644 --- a/src/Yarhl.PerformanceTests/Encodings/EncodingSpan.cs +++ b/src/Yarhl.PerformanceTests/Encodings/EncodingSpan.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2020 SceneGate +// Copyright (c) 2020 SceneGate // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -210,7 +210,7 @@ public override int GetCharCount(byte[] bytes, int index, int count) chars++; } else if (current is >= 0xA1 and <= 0xDF) { chars++; - } else if (current is(>= 0x81 and <= 0x9F) or(>= 0xE0 and <= 0xFC)) { + } else if (current is (>= 0x81 and <= 0x9F) or (>= 0xE0 and <= 0xFC)) { lead = current; } else { throw new FormatException(); @@ -295,7 +295,7 @@ public override int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] codePoint = current; } else if (current is >= 0xA1 and <= 0xDF) { codePoint = 0xFF61 - 0xA1 + current; - } else if (current is(>= 0x81 and <= 0x9F) or(>= 0xE0 and <= 0xFC)) { + } else if (current is (>= 0x81 and <= 0x9F) or (>= 0xE0 and <= 0xFC)) { lead = current; } else { throw new FormatException(); @@ -370,7 +370,7 @@ protected override void Decode(ReadOnlySpan bytes, SpanStream buffer codePoint = current; } else if (current is >= 0xA1 and <= 0xDF) { codePoint = 0xFF61 - 0xA1 + current; - } else if (current is(>= 0x81 and <= 0x9F) or(>= 0xE0 and <= 0xFC)) { + } else if (current is (>= 0x81 and <= 0x9F) or (>= 0xE0 and <= 0xFC)) { lead = current; } else { throw new FormatException(); diff --git a/src/Yarhl.PerformanceTests/FileSystem/Node.TransformWithInterfaces.cs b/src/Yarhl.PerformanceTests/FileSystem/NodeTransformWithInterfaces.cs similarity index 100% rename from src/Yarhl.PerformanceTests/FileSystem/Node.TransformWithInterfaces.cs rename to src/Yarhl.PerformanceTests/FileSystem/NodeTransformWithInterfaces.cs diff --git a/src/Yarhl.UnitTests/FileFormat/ConvertFormatTests.FormatInheritance.cs b/src/Yarhl.UnitTests/FileFormat/ConvertFormatTests.FormatInheritance.cs index 593cbc18..83e45c65 100644 --- a/src/Yarhl.UnitTests/FileFormat/ConvertFormatTests.FormatInheritance.cs +++ b/src/Yarhl.UnitTests/FileFormat/ConvertFormatTests.FormatInheritance.cs @@ -1,4 +1,5 @@ namespace Yarhl.UnitTests.FileFormat; + using System; using NUnit.Framework; using Yarhl.FileFormat; diff --git a/src/Yarhl.UnitTests/FileFormat/ConvertFormatTests.Obsolete4.cs b/src/Yarhl.UnitTests/FileFormat/ConvertFormatTests.Obsolete4.cs index d834536e..b3e40ea0 100644 --- a/src/Yarhl.UnitTests/FileFormat/ConvertFormatTests.Obsolete4.cs +++ b/src/Yarhl.UnitTests/FileFormat/ConvertFormatTests.Obsolete4.cs @@ -1,4 +1,5 @@ namespace Yarhl.UnitTests.FileFormat; + using System.Globalization; using NUnit.Framework; using Yarhl.FileFormat; diff --git a/src/Yarhl.UnitTests/FileFormat/FormatExtensionsTests.cs b/src/Yarhl.UnitTests/FileFormat/FormatExtensionsTests.cs index f8482a8e..dfc0c93b 100644 --- a/src/Yarhl.UnitTests/FileFormat/FormatExtensionsTests.cs +++ b/src/Yarhl.UnitTests/FileFormat/FormatExtensionsTests.cs @@ -1,10 +1,6 @@ namespace Yarhl.UnitTests.FileFormat; -using System; -using System.Collections.Generic; + using System.Globalization; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using FluentAssertions; using NUnit.Framework; using Yarhl.FileFormat; diff --git a/src/Yarhl.UnitTests/FileFormat/TestConvertersDefinition.FormatInheritance.cs b/src/Yarhl.UnitTests/FileFormat/TestConvertersDefinition.FormatInheritance.cs index b2efa731..596df57e 100644 --- a/src/Yarhl.UnitTests/FileFormat/TestConvertersDefinition.FormatInheritance.cs +++ b/src/Yarhl.UnitTests/FileFormat/TestConvertersDefinition.FormatInheritance.cs @@ -1,6 +1,9 @@ namespace Yarhl.UnitTests.FileFormat; + using Yarhl.FileFormat; +#pragma warning disable SA1649 // File name match type name + public interface IInterface { int Z { get; } diff --git a/src/Yarhl.UnitTests/FileFormat/TestConvertersDefinition.cs b/src/Yarhl.UnitTests/FileFormat/TestConvertersDefinition.cs index d5fecbca..3dbc01bc 100644 --- a/src/Yarhl.UnitTests/FileFormat/TestConvertersDefinition.cs +++ b/src/Yarhl.UnitTests/FileFormat/TestConvertersDefinition.cs @@ -7,6 +7,8 @@ // Disable file may only contain a single class since we aren't going // to create a file per test converter. +#pragma warning disable SA1649 // File name match type name + public class ConverterWithoutGenericInterface : IConverter, IInitializer { public void Initialize(int parameters) diff --git a/src/Yarhl.UnitTests/IO/StreamFormat/LazyFileStreamTests.cs b/src/Yarhl.UnitTests/IO/StreamFormat/LazyFileStreamTests.cs index e0791659..ce505e2d 100644 --- a/src/Yarhl.UnitTests/IO/StreamFormat/LazyFileStreamTests.cs +++ b/src/Yarhl.UnitTests/IO/StreamFormat/LazyFileStreamTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2019 SceneGate +// Copyright (c) 2019 SceneGate // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -180,4 +180,4 @@ public void PublicMethodThrowAfterDispose() Throws.InstanceOf()); } } -} \ No newline at end of file +} diff --git a/src/Yarhl.UnitTests/IO/StreamFormat/RecyclableMemoryStreamTests.cs b/src/Yarhl.UnitTests/IO/StreamFormat/RecyclableMemoryStreamTests.cs index 50286e87..9d03112f 100644 --- a/src/Yarhl.UnitTests/IO/StreamFormat/RecyclableMemoryStreamTests.cs +++ b/src/Yarhl.UnitTests/IO/StreamFormat/RecyclableMemoryStreamTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2019 SceneGate +// Copyright (c) 2019 SceneGate // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -106,4 +106,4 @@ public void PublicMethodThrowAfterDispose() Throws.InstanceOf()); } } -} \ No newline at end of file +} diff --git a/src/Yarhl.UnitTests/Media/Text/ReplacerTests.cs b/src/Yarhl.UnitTests/Media/Text/ReplacerTests.cs index 092ef8e7..e05795b6 100644 --- a/src/Yarhl.UnitTests/Media/Text/ReplacerTests.cs +++ b/src/Yarhl.UnitTests/Media/Text/ReplacerTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2019 SceneGate +// Copyright (c) 2019 SceneGate // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -193,4 +193,4 @@ public void TransformNullThrowException() Assert.That(() => replacer.TransformForward(null), Throws.ArgumentNullException); } } -} \ No newline at end of file +} diff --git a/src/Yarhl.UnitTests/Plugins/TestConvertersDefinition.cs b/src/Yarhl.UnitTests/Plugins/TestConvertersDefinition.cs index de0c73c6..ebf52355 100644 --- a/src/Yarhl.UnitTests/Plugins/TestConvertersDefinition.cs +++ b/src/Yarhl.UnitTests/Plugins/TestConvertersDefinition.cs @@ -3,6 +3,8 @@ using System; using Yarhl.FileFormat; +#pragma warning disable SA1649 // File name match type name + public class BasicConverter : IConverter { public byte Convert(string source) diff --git a/src/Yarhl.sln b/src/Yarhl.sln index ddb60153..7b4f63e9 100644 --- a/src/Yarhl.sln +++ b/src/Yarhl.sln @@ -17,7 +17,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yarhl.Plugins", "Yarhl.Plug EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E5B9743C-A789-449C-9F2F-F39EE77AD890}" ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig + ..\.editorconfig = ..\.editorconfig ..\.github\workflows\build-and-release.yml = ..\.github\workflows\build-and-release.yml Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props @@ -26,7 +26,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{7EA26602-EB23-42EE-805B-4C47D5B5325E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yarhl.Examples", "Yarhl.Examples\Yarhl.Examples.csproj", "{9E6C19AC-D497-482B-8929-AADC44D9F9A6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yarhl.Examples", "Yarhl.Examples\Yarhl.Examples.csproj", "{9E6C19AC-D497-482B-8929-AADC44D9F9A6}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/Yarhl/FileSystem/NavigationMode.cs b/src/Yarhl/FileSystem/NavigationMode.cs index dbcdb84a..47f0be98 100644 --- a/src/Yarhl/FileSystem/NavigationMode.cs +++ b/src/Yarhl/FileSystem/NavigationMode.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2019 SceneGate +// Copyright (c) 2019 SceneGate // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -36,4 +36,4 @@ public enum NavigationMode /// DepthFirst, } -} \ No newline at end of file +} diff --git a/src/Yarhl/IO/EndianessMode.cs b/src/Yarhl/IO/EndiannessMode.cs similarity index 100% rename from src/Yarhl/IO/EndianessMode.cs rename to src/Yarhl/IO/EndiannessMode.cs From e2c6b39275b05119f429b10c76db4abeaa08e358 Mon Sep 17 00:00:00 2001 From: Benito Palacios Sanchez Date: Thu, 23 Nov 2023 10:43:41 +0100 Subject: [PATCH 2/5] =?UTF-8?q?=E2=9C=A8=20Upgrade=20build=20system?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/dotnet-tools.json | 26 +++- .editorconfig | 3 + .github/ISSUE_TEMPLATE/bug_report.md | 29 ++-- .github/ISSUE_TEMPLATE/feature_request.md | 16 ++- .github/pull_request_template.md | 22 +++ .github/workflows/build-and-release.yml | 128 +++--------------- .github/workflows/build.yml | 57 ++++++++ .github/workflows/deploy.yml | 68 ++++++++++ .gitignore | 10 +- .vscode/launch.json | 13 +- .vscode/settings.json | 1 - .vscode/tasks.json | 61 ++++----- CODE_OF_CONDUCT.md | 6 +- CONTRIBUTING.md | 4 + GitReleaseManager.yaml | 10 +- build.cake | 88 ------------ build/orchestrator/BuildSystem.csproj | 17 +++ build/orchestrator/BuildSystem.sln | 22 +++ .../PrepareIntegrationTestsTask.cs | 47 +++++++ build/orchestrator/Program.cs | 56 ++++++++ docs/toc.yml | 2 +- src/Directory.Build.props | 24 ++-- src/Directory.Packages.props | 1 - Tests.runsettings => src/Tests.runsettings | 5 - src/Yarhl.Media.Text/Yarhl.Media.Text.csproj | 11 +- src/Yarhl.Plugins/Yarhl.Plugins.csproj | 3 + src/Yarhl/Yarhl.csproj | 5 +- 27 files changed, 444 insertions(+), 291 deletions(-) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/deploy.yml delete mode 100644 build.cake create mode 100644 build/orchestrator/BuildSystem.csproj create mode 100644 build/orchestrator/BuildSystem.sln create mode 100644 build/orchestrator/PrepareIntegrationTestsTask.cs create mode 100644 build/orchestrator/Program.cs rename Tests.runsettings => src/Tests.runsettings (79%) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 20572a9e..f5803a96 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -2,17 +2,35 @@ "version": 1, "isRoot": true, "tools": { - "cake.tool": { - "version": "3.0.0", + "gitversion.tool": { + "version": "5.12.0", "commands": [ - "dotnet-cake" + "dotnet-gitversion" + ] + }, + "thirdlicense": { + "version": "1.3.1", + "commands": [ + "thirdlicense" + ] + }, + "dotnet-reportgenerator-globaltool": { + "version": "5.2.0", + "commands": [ + "reportgenerator" ] }, "docfx": { - "version": "2.70.3", + "version": "2.73.2", "commands": [ "docfx" ] + }, + "gitreleasemanager.tool": { + "version": "0.16.0", + "commands": [ + "dotnet-gitreleasemanager" + ] } } } \ No newline at end of file diff --git a/.editorconfig b/.editorconfig index 74ecb07a..ea53a85b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,6 +5,9 @@ root = true [*] indent_style = space +[*.yml] +indent_size = 2 + [*.md] charset = utf-8 insert_final_newline = true diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 09e64813..cddcba4a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -6,29 +6,22 @@ labels: "" assignees: "" --- -**Describe the bug** -A clear and concise description of what the bug is. +## Description -**To Reproduce** -Steps to reproduce the behavior: +TODO: describe the issue -1. Get the library from '...' and version '...' -2. Use the class and method '....' -3. See error +## Reproducer -**Expected behavior** -A clear and concise description of what you expected to happen. +TODO: steps to reproduce the behavior. -**Exceptions** -If applicable, the full exception stacktrace that you get. +## Expected behavior -**Screenshots** -If applicable, add screenshots to help explain your problem. +TODO: description of the expected behavior. -**Desktop (please complete the following information):** +## Report info -- OS: [e.g. Windows, Linux, Mac] -- Version [e.g. 22] +TODO: if applicable, the full exception stacktrace that you get. -**Additional context** -Add any other context about the problem here. \ No newline at end of file +TODO: if applicable, add screenshots to help explain your problem. + +TODO: describe your environment like OS, app/lib version diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 9ecb8465..8f080c9c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -6,6 +6,18 @@ labels: "" assignees: "" --- -A clear and concise description of what the problem is. +## Goal -**Describe the solution you'd like to see.** +TODO: describe with user stories or a short text the goal of the feature. + +## Description + +TODO: describe the motivation behind of the idea and what it should do. + +## Proposed solution + +TODO: add any ideas for the implementation or how it should look like. + +## Acceptance criteria + +TODO: list of expectations it should pass to close the request. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..529af204 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,22 @@ +TODO: description of the PR work. + +This PR closes # + +## Quality check list + +- [ ] Related code has been tested automatically or manually +- [ ] Related documentation is updated +- [ ] I acknowledge I have read and filled this checklist and accept the + [developer certificate of origin](https://developercertificate.org/) + +## Acceptance criteria + +TODO: list of expectations it has passed from the related issue. + +## Follow-up work + +TODO: describe any missing or future required work. + +## Example + +TODO: small code-snippet or screenshot of the work diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 08ac2044..ee9ed23a 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -9,116 +9,28 @@ on: branches: [ develop ] # Stable tags: [ "v*" ] - -env: - NET_SDK: '6.0.406' + release: + types: + - published jobs: - build_main: - name: "[ubuntu-latest] Build, test and stage" - runs-on: ubuntu-latest - steps: - - name: "Checkout" - uses: actions/checkout@v2 - with: - fetch-depth: 0 # We need full history for version number - - - name: "Setup .NET SDK" - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.NET_SDK }} - - - name: "Install build tools" - run: dotnet tool restore - - - name: "Generate release notes" - run: dotnet cake --target=Generate-ReleaseNotes --verbosity=diagnostic - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: "Build, test and stage" - run: dotnet cake --target=Stage-Artifacts-NewDocs --configuration=Release --verbosity=diagnostic - - - name: "Publish test results" - uses: actions/upload-artifact@v2 - with: - name: "Test results" - path: "./artifacts/test_results" - retention-days: 1 - - - name: "Publish artifacts to CI" - uses: actions/upload-artifact@v2 - with: - name: "Artifacts" - path: | - ./artifacts/*.zip - ./artifacts/*.nupkg - ./artifacts/*.snupkg - retention-days: 2 - - build_sec: - name: "[${{ matrix.os }}] Build and test" - strategy: - matrix: - os: [ macos-latest, windows-latest ] - runs-on: ${{ matrix.os }} - steps: - - name: "Checkout" - uses: actions/checkout@v2 - with: - fetch-depth: 0 # We need full history for version number + build: + name: "Build" + uses: ./.github/workflows/build.yml + with: + dotnet_version: '8.0.100' - - name: "Setup .NET SDK" - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.NET_SDK }} - - - name: "Install build tools" - run: dotnet tool restore - - # No need to stage as one job can create the binaries for all platforms - - name: "Build and test" - run: dotnet cake --target=BuildTest --configuration=Release --verbosity=diagnostic - - # Preview release on push to develop only + # Preview release on push to main only # Stable release on version tag push only - push_artifacts: - name: "Push artifacts" + deploy: + name: "Deploy" if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/v') - needs: [ "build_main", "build_sec" ] - runs-on: ubuntu-latest - env: - # Needed only for Azure DevOps Artifacts due to its weird auth method. - PREVIEW_NUGET_FEED: 'https://pkgs.dev.azure.com/SceneGate/SceneGate/_packaging/SceneGate-Preview/nuget/v3/index.json' - steps: - - name: "Checkout" - uses: actions/checkout@v2 - with: - fetch-depth: 0 # We need full history for version number - - - name: "Download artifacts" - uses: actions/download-artifact@v2 - with: - name: "Artifacts" - path: "./artifacts" - - - name: "Setup .NET SDK" - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.NET_SDK }} - - - name: "Install build tools" - run: dotnet tool restore - - # Weird way to authenticate in Azure DevOps Artifacts - # Then, we need to setup VSS_NUGET_EXTERNAL_FEED_ENDPOINTS - - name: "Install Azure Artifacts Credential Provider" - run: wget -qO- https://aka.ms/install-artifacts-credprovider.sh | bash - - - name: "Publish artifacts" - run: dotnet cake --target=Push-Artifacts --verbosity=diagnostic - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - STABLE_NUGET_FEED_TOKEN: ${{ secrets.STABLE_NUGET_FEED_TOKEN }} - PREVIEW_NUGET_FEED_TOKEN: "az" # Dummy, auth via below env var - VSS_NUGET_EXTERNAL_FEED_ENDPOINTS: '{"endpointCredentials": [{"endpoint":"${{ env.PREVIEW_NUGET_FEED }}", "username":"", "password":"${{ secrets.PREVIEW_NUGET_FEED_TOKEN }}"}]}' + needs: build + uses: ./.github/workflows/deploy.yml + with: + dotnet_version: '8.0.100' + azure_nuget_feed: 'https://pkgs.dev.azure.com/SceneGate/SceneGate/_packaging/SceneGate-Preview/nuget/v3/index.json' + secrets: + nuget_preview_token: "az" # Dummy values as we use Azure DevOps only + nuget_stable_token: ${{ secrets.NUGET_FEED_TOKEN }} + azure_nuget_token: ${{ secrets.ADO_NUGET_FEED_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..f32f5d97 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,57 @@ +name: "Build" + +on: + workflow_call: + inputs: + dotnet_version: + required: true + type: string + +jobs: + build: + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + include: + # By default they are no "main build" but if it matches "os" then yes. + - os: ubuntu-latest + is_main_build: true + name: "${{ matrix.os }}" + runs-on: ${{ matrix.os }} + steps: + - name: "Checkout" + uses: actions/checkout@v4 + with: + fetch-depth: 0 # We need full history for version number + + - name: "Setup .NET SDK" + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ inputs.dotnet_version }} + + - name: "Build and test" + run: dotnet run --project build/orchestrator -- --target=Default --dotnet-configuration=Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: "Bundle" + if: ${{ matrix.is_main_build }} + run: dotnet run --project build/orchestrator -- --target=Bundle --dotnet-configuration=Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: "Publish artifacts to CI" + if: ${{ matrix.is_main_build }} + uses: actions/upload-artifact@v3 + with: + name: "Artifacts" + retention-days: 7 + path: | + build/artifacts/ + !build/artifacts/docs + + - name: Publish docs artifact to CI + if: ${{ matrix.is_main_build }} + uses: actions/upload-pages-artifact@v2 + with: + path: build/artifacts/docs diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..7039796f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,68 @@ +name: "Deploy" + +on: + workflow_call: + inputs: + dotnet_version: + required: true + type: string + azure_nuget_feed: + required: false + type: string + secrets: + nuget_preview_token: + required: false + nuget_stable_token: + required: false + azure_nuget_token: + required: false + +jobs: + upload_doc: + name: "Documentation" + runs-on: "ubuntu-latest" + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 + + push_artifacts: + name: "Artifacts" + runs-on: "ubuntu-latest" + steps: + - name: "Checkout" + uses: actions/checkout@v4 + with: + fetch-depth: 0 # We need full history for version number + + - name: "Download artifacts" + uses: actions/download-artifact@v3 + with: + name: "Artifacts" + path: "./build/artifacts/" + + - name: "Setup .NET SDK" + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ inputs.dotnet_version }} + + # Weird way to authenticate in Azure DevOps Artifacts + # Then, we need to setup VSS_NUGET_EXTERNAL_FEED_ENDPOINTS + - name: "Install Azure Artifacts Credential Provider" + run: wget -qO- https://aka.ms/install-artifacts-credprovider.sh | bash + + - name: "Deploy artifacts" + run: dotnet run --project build/orchestrator -- --target=Deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + STABLE_NUGET_FEED_TOKEN: ${{ secrets.nuget_stable_token }} + PREVIEW_NUGET_FEED_TOKEN: ${{ secrets.nuget_preview_token }} + VSS_NUGET_EXTERNAL_FEED_ENDPOINTS: '{"endpointCredentials": [{"endpoint":"${{ inputs.azure_nuget_feed }}", "username":"", "password":"${{ secrets.azure_nuget_token }}"}]}' diff --git a/.gitignore b/.gitignore index 671ae458..9a99cf63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,15 @@ # Output -bin/ obj/ -artifacts/ +bin/ +build/artifacts/ +build/temp/ +/CHANGELOG.md +/CHANGELOG.NEXT.md # IDE *.userprefs *.user *.vs -# Cake -tools/* - # Benchmarks BenchmarkDotNet.Artifacts/ diff --git a/.vscode/launch.json b/.vscode/launch.json index b43d3514..d2b4f353 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,16 +1,25 @@ { + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { - "name": ".NET Launch (console)", + "name": "Run perf test", "type": "coreclr", "request": "launch", - "preLaunchTask": "Cake: Run Build for release", + "preLaunchTask": "Build release", "program": "${workspaceFolder}/src/Yarhl.PerformanceTests/bin/Release/net6.0/Yarhl.PerformanceTests.dll", "args": [ "auto" ], "cwd": "${workspaceFolder}", "stopAtEntry": false, "console": "internalConsole" + }, + { + "name": ".NET Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" } ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 29456b5f..894073c0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,7 +12,6 @@ "editor.defaultFormatter": "ms-dotnettools.csharp", "editor.formatOnType": true }, - "prettier.proseWrap": "always", "cSpell.words": [ "Conv", "cref", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index dbaf89db..27fd5bdc 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -5,59 +5,48 @@ "type": "process", "command": "dotnet", "args": [ - "cake" - ], - "group": "build", - "problemMatcher": [ - "$msCompile" - ], - "label": "Cake: Run Default" - }, - { - "type": "process", - "command": "dotnet", - "args": [ - "cake", - "--target=Build" + "run", + "--project", + "build/orchestrator/", ], "group": { "kind": "build", "isDefault": true }, - "problemMatcher": [ - "$msCompile" - ], - "label": "Cake: Run Build" + "problemMatcher": ["$msCompile"], + "label": "Build" }, { "type": "process", "command": "dotnet", "args": [ - "cake", - "--target=BuildTest" + "run", + "--project", + "build/orchestrator/", + "--", + "--dotnet-configuration=Release" ], "group": { - "kind": "test", - "isDefault": true + "kind": "build", }, - "problemMatcher": [ - "$msCompile" - ], - "label": "Cake: Run Test" + "problemMatcher": ["$msCompile"], + "label": "Build release" }, { "type": "process", "command": "dotnet", "args": [ - "cake", - "--target=Build", - "--configuration=Release" - ], - "group": "build", - "problemMatcher": [ - "$msCompile" + "run", + "--project", + "build/orchestrator/", + "--", + "--target=Bundle" ], - "label": "Cake: Run Build for release" - } + "group": { + "kind": "build", + }, + "problemMatcher": ["$msCompile"], + "label": "Bundle" + }, ] -} \ No newline at end of file +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 56dbd7db..a6d79eba 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -55,9 +55,9 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at benito356@gmail.com. The project team -will review and investigate all complaints, and will respond in a way that it -deems appropriate to the circumstances. The project team is obligated to +reported by contacting the project team at . The project +team will review and investigate all complaints, and will respond in a way that +it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a6037f0d..80dd464d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,6 +5,10 @@ Thanks for taking the time to contribute! :sparkles: In this document you will find all the information you need to make sure that the projects continues to be consistent and with great quality! +> [!NOTE] +> By contributing in this repository you accept the +> [developer certificate of origin](https://developercertificate.org/). + ## Reporting features and issues ### Issues diff --git a/GitReleaseManager.yaml b/GitReleaseManager.yaml index d2903f42..b64b9286 100644 --- a/GitReleaseManager.yaml +++ b/GitReleaseManager.yaml @@ -13,13 +13,21 @@ export: # Configuration values used when closing a milestone close: use-issue-comments: false +# issue-comment: |- +# :tada: This issue has been resolved in version {milestone} :tada: +# +# The release is available on: +# +# - [GitHub release](https://github.com/{owner}/{repository}/releases/tag/{milestone}) +# +# Your **[GitReleaseManager](https://github.com/GitTools/GitReleaseManager)** bot :package::rocket: # The labels that will be used to include issues in release notes. issue-labels-include: - Breaking - Bug - - Documentation - Duplicate + - Documentation - Enhancement - Feature - Improvement diff --git a/build.cake b/build.cake deleted file mode 100644 index 6d3d1784..00000000 --- a/build.cake +++ /dev/null @@ -1,88 +0,0 @@ -#load "nuget:?package=PleOps.Cake&version=0.8.0" - -Task("Define-Project") - .Description("Fill specific project information") - .Does(info => -{ - info.CoverageTarget = 99; // can't be 100 due to platform-specific code paths - - info.AddLibraryProjects("Yarhl"); - info.AddLibraryProjects("Yarhl.Media.Text"); - info.AddLibraryProjects("Yarhl.Plugins"); - info.AddTestProjects("Yarhl.UnitTests"); - info.AddTestProjects("Yarhl.IntegrationTests"); - - info.ChangelogFile = "docs/articles/Changelog.md"; - - info.PreviewNuGetFeed = "https://pkgs.dev.azure.com/SceneGate/SceneGate/_packaging/SceneGate-Preview/nuget/v3/index.json"; -}); - -Task("DocFx-BuildDoc") - .Does(info => -{ - if (!FileExists(info.DocFxFile)) { - Warning("There isn't documentation."); - return; - } - - string args = $"-o {info.ArtifactsDirectory}/_site"; - if (info.WarningsAsErrors) { - args += " --warningsAsErrors"; - } - - DotNetTool($"docfx {info.DocFxFile} {args}"); - - Zip( - $"{info.ArtifactsDirectory}/_site", - $"{info.ArtifactsDirectory}/docs.zip"); -}); - -Task("Prepare-IntegrationTests") - .Description("Prepare the integration tests by copying an example of DLL") - .IsDependeeOf("Test") - .Does(info => -{ - // Copy a good and bad plugin to test the assembly load logic - string pluginPath = $"src/Yarhl.Media.Text/bin/{info.Configuration}/net6.0/Yarhl.Media.Text.dll"; - string badPluginPath = info.SolutionFile; // this isn't a DLL for sure :D - - string outputBasePath = $"src/Yarhl.IntegrationTests/bin/{info.Configuration}"; - string testProjectPath = "src/Yarhl.IntegrationTests/Yarhl.IntegrationTests.csproj"; - - foreach (string framework in GetTargetFrameworks(testProjectPath)) { - string pluginDir = $"{outputBasePath}/{framework}/Plugins"; - CreateDirectory(pluginDir); - CopyFile(pluginPath, $"{pluginDir}/Yarhl.Media.Text.dll"); - CopyFile(badPluginPath, $"{pluginDir}/MyBadPlugin.dll"); - } -}); - -public IEnumerable GetTargetFrameworks(string projectPath) -{ - var projectXml = System.Xml.Linq.XDocument.Load(projectPath).Root; - List frameworks = projectXml.Elements("PropertyGroup") - .Where(x => x.Element("TargetFrameworks") != null) - .SelectMany(x => x.Element("TargetFrameworks").Value.Split(';')) - .ToList(); - - string singleFramework = projectXml.Elements("PropertyGroup") - .Select(x => x.Element("TargetFramework")?.Value) - .FirstOrDefault(); - if (singleFramework != null && !frameworks.Contains(singleFramework)) { - frameworks.Add(singleFramework); - } - - return frameworks; -} - -Task("Default") - .IsDependentOn("Stage-Artifacts-NewDocs"); - -Task("Stage-Artifacts-NewDocs") - .IsDependentOn("BuildTest") - .IsDependentOn("DocFx-BuildDoc") - .IsDependentOn("Pack-Libs") - .IsDependentOn("Pack-Apps"); - -string target = Argument("target", "Default"); -RunTarget(target); diff --git a/build/orchestrator/BuildSystem.csproj b/build/orchestrator/BuildSystem.csproj new file mode 100644 index 00000000..ee528c14 --- /dev/null +++ b/build/orchestrator/BuildSystem.csproj @@ -0,0 +1,17 @@ + + + + Exe + + net8.0 + $(MSBuildProjectDirectory)/../.. + + enable + enable + + + + + + + diff --git a/build/orchestrator/BuildSystem.sln b/build/orchestrator/BuildSystem.sln new file mode 100644 index 00000000..d332efc1 --- /dev/null +++ b/build/orchestrator/BuildSystem.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildSystem", "BuildSystem.csproj", "{C3AF4C5B-294F-4EA3-BCC9-3E6B2AA4D569}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C3AF4C5B-294F-4EA3-BCC9-3E6B2AA4D569}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C3AF4C5B-294F-4EA3-BCC9-3E6B2AA4D569}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C3AF4C5B-294F-4EA3-BCC9-3E6B2AA4D569}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C3AF4C5B-294F-4EA3-BCC9-3E6B2AA4D569}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/build/orchestrator/PrepareIntegrationTestsTask.cs b/build/orchestrator/PrepareIntegrationTestsTask.cs new file mode 100644 index 00000000..208b6bb6 --- /dev/null +++ b/build/orchestrator/PrepareIntegrationTestsTask.cs @@ -0,0 +1,47 @@ +namespace BuildSystem; + +using System.Xml.Linq; +using Cake.Frosting; +using Cake.Frosting.PleOps.Recipe; + +[TaskName("Prepare-IntegrationTests")] +[TaskDescription("Prepare the integration tests by copying an example of DLL")] +[IsDependeeOf(typeof(Cake.Frosting.PleOps.Recipe.Dotnet.TestTask))] +public class PrepareIntegrationTestsTask : FrostingTask +{ + public override void Run(PleOpsBuildContext context) + { + // Copy a good and bad plugin to test the assembly load logic + string pluginPath = $"src/Yarhl.Media.Text/bin/{context.DotNetContext.Configuration}/net6.0/Yarhl.Media.Text.dll"; + string badPluginPath = context.DotNetContext.SolutionPath; // this isn't a DLL for sure :D + + string outputBasePath = $"src/Yarhl.IntegrationTests/bin/{context.DotNetContext.Configuration}"; + string testProjectPath = "src/Yarhl.IntegrationTests/Yarhl.IntegrationTests.csproj"; + + foreach (string framework in GetTargetFrameworks(testProjectPath)) { + string pluginDir = $"{outputBasePath}/{framework}/Plugins"; + _ = Directory.CreateDirectory(pluginDir); + File.Copy(pluginPath, $"{pluginDir}/Yarhl.Media.Text.dll", true); + File.Copy(badPluginPath, $"{pluginDir}/MyBadPlugin.dll", true); + } + } + + private static IEnumerable GetTargetFrameworks(string projectPath) + { + XElement projectXml = XDocument.Load(projectPath).Root + ?? throw new Exception("Invalid csproj file"); + var frameworks = projectXml.Elements("PropertyGroup") + .Where(x => x.Element("TargetFrameworks") != null) + .SelectMany(x => x.Element("TargetFrameworks")!.Value.Split(';')) + .ToList(); + + string? singleFramework = projectXml.Elements("PropertyGroup") + .Select(x => x.Element("TargetFramework")?.Value) + .FirstOrDefault(); + if (singleFramework != null && !frameworks.Contains(singleFramework)) { + frameworks.Add(singleFramework); + } + + return frameworks; + } +} diff --git a/build/orchestrator/Program.cs b/build/orchestrator/Program.cs new file mode 100644 index 00000000..86ffe1a7 --- /dev/null +++ b/build/orchestrator/Program.cs @@ -0,0 +1,56 @@ +using Cake.Core; +using Cake.Frosting; +using Cake.Frosting.PleOps.Recipe; + +return new CakeHost() + .AddAssembly(typeof(PleOpsBuildContext).Assembly) + .UseContext() + .UseLifetime() + .Run(args); + +public sealed class BuildLifetime : FrostingLifetime +{ + public override void Setup(PleOpsBuildContext context, ISetupContext info) + { + context.DotNetContext.CoverageTarget = 100; + + // Update build parameters from command line arguments. + context.ReadArguments(); + + context.DotNetContext.PreviewNuGetFeed = "https://pkgs.dev.azure.com/SceneGate/SceneGate/_packaging/SceneGate-Preview/nuget/v3/index.json"; + + // Print the build info to use. + context.Print(); + } + + public override void Teardown(PleOpsBuildContext context, ITeardownContext info) + { + // Save the info from the existing artifacts for the next execution (e.g. deploy job) + context.DeliveriesContext.Save(); + } +} + +[TaskName("Default")] +[IsDependentOn(typeof(Cake.Frosting.PleOps.Recipe.Common.SetGitVersionTask))] +[IsDependentOn(typeof(Cake.Frosting.PleOps.Recipe.Common.CleanArtifactsTask))] +[IsDependentOn(typeof(Cake.Frosting.PleOps.Recipe.Dotnet.DotnetTasks.BuildProjectTask))] +public sealed class DefaultTask : FrostingTask +{ +} + +[TaskName("Bundle")] +[IsDependentOn(typeof(Cake.Frosting.PleOps.Recipe.Common.SetGitVersionTask))] +[IsDependentOn(typeof(Cake.Frosting.PleOps.Recipe.GitHub.ExportReleaseNotesTask))] +[IsDependentOn(typeof(Cake.Frosting.PleOps.Recipe.Dotnet.DotnetTasks.BundleProjectTask))] +[IsDependentOn(typeof(Cake.Frosting.PleOps.Recipe.DocFx.BuildTask))] +public sealed class BundleTask : FrostingTask +{ +} + +[TaskName("Deploy")] +[IsDependentOn(typeof(Cake.Frosting.PleOps.Recipe.Common.SetGitVersionTask))] +[IsDependentOn(typeof(Cake.Frosting.PleOps.Recipe.Dotnet.DotnetTasks.DeployProjectTask))] +[IsDependentOn(typeof(Cake.Frosting.PleOps.Recipe.GitHub.UploadReleaseBinariesTask))] +public sealed class DeployTask : FrostingTask +{ +} diff --git a/docs/toc.yml b/docs/toc.yml index f19f033e..8804245a 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -8,7 +8,7 @@ href: api/ - name: Changelog - href: articles/Changelog.md + href: articles/changelog.md - name: GitHub href: https://github.com/SceneGate/Yarhl diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 52160762..5dc771dc 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -5,7 +5,10 @@ Copyright (C) 2019 SceneGate true - NETSDK1179 + + + false @@ -19,19 +22,24 @@ - + true - true - snupkg + + true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + + embedded + + true true - - - diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 09376af9..517499f8 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -14,7 +14,6 @@ - diff --git a/Tests.runsettings b/src/Tests.runsettings similarity index 79% rename from Tests.runsettings rename to src/Tests.runsettings index 835d58b3..deed3dc7 100644 --- a/Tests.runsettings +++ b/src/Tests.runsettings @@ -1,10 +1,5 @@  - - - ./artifacts/test_results - - diff --git a/src/Yarhl.Media.Text/Yarhl.Media.Text.csproj b/src/Yarhl.Media.Text/Yarhl.Media.Text.csproj index 5a8371aa..d93f78de 100644 --- a/src/Yarhl.Media.Text/Yarhl.Media.Text.csproj +++ b/src/Yarhl.Media.Text/Yarhl.Media.Text.csproj @@ -2,19 +2,16 @@ - Yarhl library for text format and conversion support. + Library with Yarhl converters for text formats. + true + net6.0 + enable - - <_Parameter1>true - - - <_Parameter1>true - diff --git a/src/Yarhl.Plugins/Yarhl.Plugins.csproj b/src/Yarhl.Plugins/Yarhl.Plugins.csproj index 4f53ee9d..ca807c75 100644 --- a/src/Yarhl.Plugins/Yarhl.Plugins.csproj +++ b/src/Yarhl.Plugins/Yarhl.Plugins.csproj @@ -2,7 +2,10 @@ Assembly scaning for file formats and converters implemented with Yarhl. + true + net6.0 + enable enable diff --git a/src/Yarhl/Yarhl.csproj b/src/Yarhl/Yarhl.csproj index c576fe62..af86f6d8 100644 --- a/src/Yarhl/Yarhl.csproj +++ b/src/Yarhl/Yarhl.csproj @@ -2,8 +2,11 @@ - Library to translation projects. It provides features for implementing file formats, converters and a virtual file system. + Library with features for implementing file formats, converters and a virtual file system. + true + net6.0 + enable From 0d4a0c2d18cd65f8f16a3b0a8df0dcd789c4f9e2 Mon Sep 17 00:00:00 2001 From: Benito Palacios Sanchez Date: Thu, 23 Nov 2023 10:46:31 +0100 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=94=A7=20Fix=20using=20preview=20vers?= =?UTF-8?q?ions=20of=20PleOps.Cake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/orchestrator/nuget.config | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 build/orchestrator/nuget.config diff --git a/build/orchestrator/nuget.config b/build/orchestrator/nuget.config new file mode 100644 index 00000000..43bcb765 --- /dev/null +++ b/build/orchestrator/nuget.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file From 0223e5c215d13192d0c257ea7df4248604a5f938 Mon Sep 17 00:00:00 2001 From: Benito Palacios Sanchez Date: Thu, 23 Nov 2023 10:51:20 +0100 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=94=A7=20Revert=20code=20coverage=20g?= =?UTF-8?q?oal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/orchestrator/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/orchestrator/Program.cs b/build/orchestrator/Program.cs index 86ffe1a7..f6b9fae1 100644 --- a/build/orchestrator/Program.cs +++ b/build/orchestrator/Program.cs @@ -12,7 +12,7 @@ public sealed class BuildLifetime : FrostingLifetime { public override void Setup(PleOpsBuildContext context, ISetupContext info) { - context.DotNetContext.CoverageTarget = 100; + context.DotNetContext.CoverageTarget = 99; // due to platform-specific code // Update build parameters from command line arguments. context.ReadArguments(); From 14ddff9aeb2352ebaef0a8a2815058ddda9fb373 Mon Sep 17 00:00:00 2001 From: Benito Palacios Sanchez Date: Thu, 23 Nov 2023 11:36:07 +0100 Subject: [PATCH 5/5] =?UTF-8?q?=E2=8F=AB=20Improve=20nuget=20readmes=20and?= =?UTF-8?q?=20upgrade=20to=20v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-and-release.yml | 3 -- build/orchestrator/BuildSystem.csproj | 2 +- build/orchestrator/nuget.config | 16 -------- docs/index.md | 41 +------------------- src/Yarhl.Media.Text/Yarhl.Media.Text.csproj | 2 +- src/Yarhl.Plugins/Yarhl.Plugins.csproj | 2 +- src/Yarhl/Yarhl.csproj | 2 +- 7 files changed, 5 insertions(+), 63 deletions(-) delete mode 100644 build/orchestrator/nuget.config diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index ee9ed23a..34f8294a 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -9,9 +9,6 @@ on: branches: [ develop ] # Stable tags: [ "v*" ] - release: - types: - - published jobs: build: diff --git a/build/orchestrator/BuildSystem.csproj b/build/orchestrator/BuildSystem.csproj index ee528c14..ee8b40fb 100644 --- a/build/orchestrator/BuildSystem.csproj +++ b/build/orchestrator/BuildSystem.csproj @@ -11,7 +11,7 @@ - + diff --git a/build/orchestrator/nuget.config b/build/orchestrator/nuget.config deleted file mode 100644 index 43bcb765..00000000 --- a/build/orchestrator/nuget.config +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 3aeca610..8c982160 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,46 +1,7 @@ -# Yarhl, A format ResearcH Library ![SceneGate awesome](https://img.shields.io/badge/SceneGate-awesome%20%F0%9F%95%B6-blue?logo=csharp) +# Yarhl, A format ResearcH Library ![Yarhl logo](./images/logo-large.png) - -

- - Stable version - -   - - GitHub commits since latest release (by SemVer) - -   - - Build and release - -   - - CII Best Practices - -   - - MIT License - -   -

- _Yarhl_ is a set of libraries that helps to **implement and convert file formats** It empowers you with... diff --git a/src/Yarhl.Media.Text/Yarhl.Media.Text.csproj b/src/Yarhl.Media.Text/Yarhl.Media.Text.csproj index d93f78de..9132e5c2 100644 --- a/src/Yarhl.Media.Text/Yarhl.Media.Text.csproj +++ b/src/Yarhl.Media.Text/Yarhl.Media.Text.csproj @@ -16,7 +16,7 @@ - + diff --git a/src/Yarhl.Plugins/Yarhl.Plugins.csproj b/src/Yarhl.Plugins/Yarhl.Plugins.csproj index ca807c75..1d30aa68 100644 --- a/src/Yarhl.Plugins/Yarhl.Plugins.csproj +++ b/src/Yarhl.Plugins/Yarhl.Plugins.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Yarhl/Yarhl.csproj b/src/Yarhl/Yarhl.csproj index af86f6d8..ddb00255 100644 --- a/src/Yarhl/Yarhl.csproj +++ b/src/Yarhl/Yarhl.csproj @@ -12,7 +12,7 @@ - +