Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_properties = true:warning
csharp_style_expression_bodied_indexers = true:warning
csharp_style_expression_bodied_accessors = true:warning
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_throw_expression = true:suggestion
Expand Down Expand Up @@ -45,6 +45,8 @@ csharp_style_prefer_extended_property_pattern = true:suggestion
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = false:silent
csharp_style_var_elsewhere = false:silent
csharp_style_prefer_primary_constructors = true:suggestion
csharp_prefer_system_threading_lock = true:suggestion

[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/Automatic_release_generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ on:

jobs:
macos-latest:
name: macos-13
runs-on: macos-13
name: macos-15
runs-on: macos-15
env:
ACTION_NAME: macos-13
ACTION_NAME: macos-15
CONFIGURATION: Release
steps:
- uses: actions/checkout@v3
Expand All @@ -37,14 +37,6 @@ jobs:
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}

# see https://github.com/actions/runner-images/issues/6771#issuecomment-1354713617
# remove once all workflow VMs use Xcode 14.3
- name: Set Xcode Version
shell: bash
run: |
sudo xcode-select -s "/Applications/Xcode_14.3.app"
echo "MD_APPLE_SDK_ROOT=/Applications/Xcode_14.3.app" >> $GITHUB_ENV

- name: 'Run: Pack'
run: ./build.cmd Pack
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/Desktop_test_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
name: TestResults-${{env.ACTION_NAME}}
path: PasswordManager.Tests/TestResults/TestResults-${{env.ACTION_NAME}}.trx
macos-latest:
name: macos-13
runs-on: macos-13
name: macos-15
runs-on: macos-15
env:
ACTION_NAME: macos-13
ACTION_NAME: macos-15
steps:
- uses: actions/checkout@v3
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
Expand All @@ -62,14 +62,6 @@ jobs:
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}

# see https://github.com/actions/runner-images/issues/6771#issuecomment-1354713617
# remove once all workflow VMs use Xcode 14.3
- name: Set Xcode Version
shell: bash
run: |
sudo xcode-select -s "/Applications/Xcode_14.3.app"
echo "MD_APPLE_SDK_ROOT=/Applications/Xcode_14.3.app" >> $GITHUB_ENV

- name: 'Run: UnitTest'
run: ./build.cmd UnitTest
- name: 'Publish: TestResults-local'
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/Mobile_test_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
jobs:
macos-latest:
name: Android (api-${{ matrix.api-level }})
runs-on: macos-13
runs-on: macos-15
strategy:
matrix:
api-level: [21, 23, 29]
Expand All @@ -43,14 +43,6 @@ jobs:
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}

# see https://github.com/actions/runner-images/issues/6771#issuecomment-1354713617
# remove once all workflow VMs use Xcode 14.3
- name: Set Xcode Version
shell: bash
run: |
sudo xcode-select -s "/Applications/Xcode_14.3.app"
echo "MD_APPLE_SDK_ROOT=/Applications/Xcode_14.3.app" >> $GITHUB_ENV

- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ jobs:
- name: Install dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.x'
dotnet-version: '9.0.x'

- name: Install MAUI
run: dotnet workload install maui

- name: Build app
run: dotnet build -c Debug -warnaserror -f:net7.0-windows10.0.19041.0 ${{github.workspace}}/PasswordManager/PasswordManager.csproj
run: dotnet build -c Debug -warnaserror -f:net9.0-windows10.0.19041.0 ${{github.workspace}}/PasswordManager/PasswordManager.csproj

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand Down
130 changes: 69 additions & 61 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,49 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Pack",
"Restore",
"UITest",
"UnitTest"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"ActionName": {
"type": "string"
},
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
Expand All @@ -26,25 +53,8 @@
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
Expand Down Expand Up @@ -73,47 +83,45 @@
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Pack",
"Restore",
"UITest",
"UnitTest"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Pack",
"Restore",
"UITest",
"UnitTest"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
}
}
}
},
"allOf": [
{
"properties": {
"ActionName": {
"type": "string"
},
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
"Debug",
"Release"
]
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
}
]
}
38 changes: 19 additions & 19 deletions PasswordManager.Build/Build.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.IO;
using System.Linq;
using Nuke.Common;
using Nuke.Common.CI.GitHubActions;
using Nuke.Common.IO;
Expand All @@ -8,35 +6,37 @@
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.PowerShell;
using Nuke.Common.Utilities.Collections;
using static Nuke.Common.Tools.PowerShell.PowerShellTasks;
using System.IO;
using System.Linq;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.PowerShell.PowerShellTasks;

[GitHubActions("Desktop test runner",
GitHubActionsImage.WindowsLatest, GitHubActionsImage.MacOsLatest,
OnPushBranches = new[] { "main" },
OnPullRequestBranches = new[] { "main" },
CacheIncludePatterns = new[]
{
".nuke/temp",
OnPushBranches = ["main"],
OnPullRequestBranches = ["main"],
CacheIncludePatterns =
[
".nuke/temp",
"~/.nuget/packages"
},
InvokedTargets = new[] { nameof(UnitTest) },
],
InvokedTargets = [nameof(UnitTest)],
AutoGenerate = false)]
[GitHubActions("Mobile test runner",
GitHubActionsImage.MacOsLatest,
OnPushBranches = new[] { "main" },
OnPullRequestBranches = new[] { "main" },
InvokedTargets = new[] { nameof(UITest) },
OnPushBranches = ["main"],
OnPullRequestBranches = ["main"],
InvokedTargets = [nameof(UITest)],
AutoGenerate = false)]
[GitHubActions("Automatic release generation",
GitHubActionsImage.MacOsLatest,
GitHubActionsImage.WindowsLatest,
OnPushBranches = new[] { "Release" },
InvokedTargets = new[] { nameof(Pack) },
OnPushBranches = ["Release"],
InvokedTargets = [nameof(Pack)],
AutoGenerate = false)]
class Build : NukeBuild
{
public static int Main () => Execute<Build>(x => x.Compile);
public static int Main() => Execute<Build>(x => x.Compile);

[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
public readonly Configuration Configuration = Configuration.Debug;
Expand All @@ -47,7 +47,7 @@ class Build : NukeBuild
public readonly Solution Solution;

[LatestGitHubRelease(Build.repository_identifier)] public readonly string LatestGitHubRelease = repository_identifier;

const string repository_identifier = @"Cootz/PasswordManager";

const string win_release_file_name = "win_x64.zip";
Expand Down Expand Up @@ -93,7 +93,7 @@ public Build()
foreach (var project in Solution.AllProjects)
{
PowerShell(p => p
.SetCommand($"dotnet workload restore { Path.GetFileName(project.Path) }")
.SetCommand($"dotnet workload restore {Path.GetFileName(project.Path)}")
.SetProcessWorkingDirectory(project.Directory));
}

Expand Down Expand Up @@ -175,7 +175,7 @@ public Build()
SourceDirectory / @"bin\Release\net7.0-maccatalyst\maccatalyst-arm64";
AbsolutePath macIntelPublishDirectory =
SourceDirectory / @"bin\Release\net7.0-maccatalyst\maccatalyst-x64";
AbsolutePath androidPublishDirectory =
AbsolutePath androidPublishDirectory =
SourceDirectory / @"bin\Release\net7.0-android\publish\com.companyname.passwordmanager-Signed.apk";

zipHelper.ZipToPublish(winPublishDirectory, win_release_file_name);
Expand Down
2 changes: 1 addition & 1 deletion PasswordManager.Build/Configuration.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.ComponentModel;
using Nuke.Common.Tooling;
using System.ComponentModel;

[TypeConverter(typeof(TypeConverter<Configuration>))]
public class Configuration : Enumeration
Expand Down
Loading
Loading