aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-08-01 17:59:22 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2023-08-01 17:59:22 -0400
commitb27a734a56f07c2e15518364c4cc3cef0b13a1e2 (patch)
tree2df5797b34339b95743f983ba74c5eddf2865c99
parentf0c2337358fc43ad9c79294c539c4ddec4280011 (diff)
build config added
-rw-r--r--.gitignore2
-rw-r--r--Module.Taskfile.yaml68
-rw-r--r--Taskfile.yaml75
-rw-r--r--lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj4
-rw-r--r--lib/Net.Http/src/VNLib.Net.Http.csproj4
-rw-r--r--lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj4
-rw-r--r--lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj4
-rw-r--r--lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj4
-rw-r--r--lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj4
-rw-r--r--lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj4
-rw-r--r--lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj4
-rw-r--r--lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj4
-rw-r--r--lib/Plugins/src/VNLib.Plugins.csproj4
-rw-r--r--lib/Utils/src/VNLib.Utils.csproj4
-rw-r--r--lib/WinRpMalloc/Taskfile.yaml73
-rw-r--r--lib/WinRpMalloc/src/package.json14
16 files changed, 267 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 0a9160d..3a794dc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -349,8 +349,6 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
-#Task build files
-**/[Tt]askfile*
#no build dlls in source
*.dll
diff --git a/Module.Taskfile.yaml b/Module.Taskfile.yaml
new file mode 100644
index 0000000..88565f9
--- /dev/null
+++ b/Module.Taskfile.yaml
@@ -0,0 +1,68 @@
+# https://taskfile.dev
+
+#Called by the vnbuild system to produce builds for my website
+#https://www.vaughnnugent.com/resources/software
+
+#This taskfile performs the build operations for a module, it handles
+#git code updates, msbuild on solutions, and sleet NuGet feed pushes.
+
+#this file must be in the same directory as the solution file
+
+version: '3'
+
+vars:
+ INT_DIR: '{{.SCRATCH_DIR}}/obj/{{.MODULE_NAME}}/'
+ MS_ARGS: '/p:RunAnalyzersDuringBuild=false /p:IntermediateOutputPath="{{.INT_DIR}}" /p:UseCommonOutputDirectory=true /p:BuildInParallel=true /p:MultiProcessorCompilation=true'
+ PACK_OUT: '{{.OUTPUT_DIR}}/{{.HEAD_SHA}}/pkg'
+
+tasks:
+
+#called by build pipeline to sync repo
+ update:
+ cmds:
+ - git remote update
+ - git reset --hard
+ - git pull origin {{.BRANCH_NAME}} --verify-signatures
+
+#called by build pipeline to build module
+ build:
+ cmds:
+ - echo "building module {{.MODULE_NAME}}"
+
+ #re-write semver after hard reset, before build
+ - dotnet-gitversion.exe /updateprojectfiles
+
+ #build debug mode first
+ - task: build_debug
+ - task: build_release
+
+ postbuild_success:
+ cmds:
+ #push packages to the sleet feed (feed path is vnbuild global)
+ - powershell -Command 'sleet push "{{.PACK_OUT}}/debug/" --source debug --config "{{.SLEET_CONFIG_PATH}}" --force'
+ - powershell -Command 'sleet push "{{.PACK_OUT}}/release/" --source release --config "{{.SLEET_CONFIG_PATH}}" --force'
+
+ postbuild_failed:
+ cmds:
+ - echo "postbuild failed {{.MODULE_NAME}}"
+
+#called by build pipeline to clean module
+ clean:
+ cmds:
+ #clean solution
+ - dotnet clean /p:BuildInParallel=true /p:MultiProcessorCompilation=true
+
+
+#Internal tasks
+ build_debug:
+ internal: true
+ cmds:
+ - powershell -Command 'dotnet publish -c debug {{.MS_ARGS}}'
+ - powershell -Command 'dotnet pack -c debug {{.MS_ARGS}} -o "{{.PACK_OUT}}/debug/"'
+
+ build_release:
+ internal: true
+ cmds:
+ - powershell -Command 'dotnet publish -c release {{.MS_ARGS}}'
+ - powershell -Command 'dotnet pack -c release {{.MS_ARGS}} -o "{{.PACK_OUT}}/release/"'
+ \ No newline at end of file
diff --git a/Taskfile.yaml b/Taskfile.yaml
new file mode 100644
index 0000000..b16b082
--- /dev/null
+++ b/Taskfile.yaml
@@ -0,0 +1,75 @@
+# https://taskfile.dev
+
+#Called by the vnbuild system to produce builds for my website
+#https://www.vaughnnugent.com/resources/software
+
+#This taskfile is called from the root of a project that is being built
+#and the purpose of this taskfile is to package up the output of a build
+#from the solution file, and package it up into a tgz files for distribution
+
+version: '3'
+
+vars:
+ TARGET: '{{.USER_WORKING_DIR}}/bin'
+ RELEASE_DIR: "./bin/release/{{.TARGET_FRAMEWORK}}/publish"
+ SOURCE_OUT: "{{.USER_WORKING_DIR}}/bin/source"
+
+tasks:
+
+ #when build succeeds, archive the output into a tgz
+ postbuild_success:
+ dir: '{{.USER_WORKING_DIR}}'
+ cmds:
+ #pack up source code
+ - task: packsource
+
+ #run post in debug mode
+ - task: postbuild
+ vars: { BUILD_MODE: debug }
+
+ #remove uncessary files from the release dir
+ - powershell -Command "Get-ChildItem -Recurse '{{.RELEASE_DIR}}/' -Include *.pdb,*.xml | Remove-Item"
+
+ #run post in release mode
+ - task: postbuild
+ vars: { BUILD_MODE: release }
+
+
+ postbuild_failed:
+ dir: '{{.USER_WORKING_DIR}}'
+ cmds:
+ - echo "postbuild failed {{.PROJECT_NAME}}"
+
+
+ postbuild:
+ dir: '{{.USER_WORKING_DIR}}'
+ internal: true
+ vars:
+ #the build output directory
+ BUILD_OUT: "{{.USER_WORKING_DIR}}/bin/{{.BUILD_MODE}}/{{.TARGET_FRAMEWORK}}/publish"
+
+ cmds:
+
+ #copy license and readme to target
+ - cd .. && powershell -Command "Copy-Item -Path ./LICENSE.txt -Destination '{{.BUILD_OUT}}/license.txt'"
+ - cd .. && powershell -Command "Copy-Item -Path ./build.readme.md -Destination '{{.BUILD_OUT}}/readme.md'"
+
+ #tar outputs
+ - cd "{{.BUILD_OUT}}" && tar -czf "{{.TARGET}}/{{.BUILD_MODE}}.tgz" .
+
+ packsource:
+ dir: '{{.USER_WORKING_DIR}}'
+ internal: true
+ cmds:
+ #copy source code to target
+ - powershell -Command "Get-ChildItem -Include *.cs,*.csproj -Recurse | Where { \$_.FullName -notlike '*\obj\*' -and \$_.FullName -notlike '*\bin\*' } | Resolve-Path -Relative | tar --files-from - -czf '{{.TARGET}}/src.tgz'"
+
+
+#Remove the output dirs on clean
+ clean:
+ dir: '{{.USER_WORKING_DIR}}'
+ cmds:
+ - cmd: powershell Remove-Item -Recurse './bin'
+ ignore_error: true
+ - cmd: powershell Remove-Item -Recurse './obj'
+ ignore_error: true
diff --git a/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj b/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj
index 676861c..a1000c9 100644
--- a/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj
+++ b/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj
@@ -38,6 +38,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
<ItemGroup>
diff --git a/lib/Net.Http/src/VNLib.Net.Http.csproj b/lib/Net.Http/src/VNLib.Net.Http.csproj
index b0c7b56..30f0439 100644
--- a/lib/Net.Http/src/VNLib.Net.Http.csproj
+++ b/lib/Net.Http/src/VNLib.Net.Http.csproj
@@ -58,6 +58,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
</Project>
diff --git a/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj b/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj
index d87f3dd..38fb8c5 100644
--- a/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj
+++ b/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj
@@ -46,6 +46,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
</Project>
diff --git a/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj b/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj
index b6b2bd5..fb626db 100644
--- a/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj
+++ b/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj
@@ -58,6 +58,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
</Project>
diff --git a/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj b/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj
index 5b116a0..8c9ef84 100644
--- a/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj
+++ b/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj
@@ -44,6 +44,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
</Project>
diff --git a/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj b/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj
index c05974f..b3ba43a 100644
--- a/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj
+++ b/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj
@@ -37,6 +37,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
<ItemGroup>
diff --git a/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj b/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj
index 167d147..6a42c92 100644
--- a/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj
+++ b/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj
@@ -48,6 +48,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
<ItemGroup>
diff --git a/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj b/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj
index d53cc7d..cd91185 100644
--- a/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj
+++ b/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj
@@ -56,6 +56,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
diff --git a/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj b/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj
index 80ccdc7..362e1f1 100644
--- a/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj
+++ b/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj
@@ -51,6 +51,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
</Project>
diff --git a/lib/Plugins/src/VNLib.Plugins.csproj b/lib/Plugins/src/VNLib.Plugins.csproj
index 1aad214..5b05caf 100644
--- a/lib/Plugins/src/VNLib.Plugins.csproj
+++ b/lib/Plugins/src/VNLib.Plugins.csproj
@@ -42,6 +42,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
<ItemGroup>
diff --git a/lib/Utils/src/VNLib.Utils.csproj b/lib/Utils/src/VNLib.Utils.csproj
index fbd3d5d..90a809d 100644
--- a/lib/Utils/src/VNLib.Utils.csproj
+++ b/lib/Utils/src/VNLib.Utils.csproj
@@ -35,6 +35,10 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
+ <None Include="..\LICENSE.txt">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
diff --git a/lib/WinRpMalloc/Taskfile.yaml b/lib/WinRpMalloc/Taskfile.yaml
new file mode 100644
index 0000000..90a0898
--- /dev/null
+++ b/lib/WinRpMalloc/Taskfile.yaml
@@ -0,0 +1,73 @@
+# https://taskfile.dev
+
+#Called by the vnbuild system to produce builds for my website
+#https://www.vaughnnugent.com/resources/software
+
+#This taskfile is called in this directory and is specific to the WinRpMalloc project
+#that handles the MSBuild outside of the solution file
+
+version: '3'
+
+vars:
+ RPMALLOC_LICENSE: 'https://raw.githubusercontent.com/mjansson/rpmalloc/develop/LICENSE'
+ INT_DIR: '{{.SCRATCH_DIR}}/obj/{{.MODULE_NAME}}/'
+ MS_ARGS: '/p:Platform=x64 /p:RunAnalyzersDuringBuild=false /p:IntermediateOutputPath="{{.INT_DIR}}" /p:UseCommonOutputDirectory=true /p:BuildInParallel=true /p:MultiProcessorCompilation=true'
+
+tasks:
+
+ build:
+ #build from the src directory
+ dir: '{{.USER_WORKING_DIR}}/src'
+ cmds:
+ #build in debug mode
+ - msbuild /p:Configuration=debug {{.BUILD_FLAGS}} {{.MS_ARGS}}
+ #build in release
+ - msbuild /p:Configuration=release {{.BUILD_FLAGS}} {{.MS_ARGS}}
+
+ postbuild_success:
+ vars:
+ TARGET: '{{.USER_WORKING_DIR}}/bin'
+
+ cmds:
+ #create the target directory
+ - powershell -Command "New-Item -Type Directory -Force -Path '{{.TARGET}}'"
+
+ #remove uncessary files from outputs
+ - powershell -Command "Get-ChildItem -Recurse './src/x64/*' -Include *.log,*.recipe,*.CopyComplete,*.json,*.FileListAbsolute.txt | Remove-Item"
+ - powershell -Command "Get-ChildItem '*.tlog' -Recurse * | Remove-Item"
+
+ #run debug and release post
+ - task: postbuild
+ vars: { BUILD_MODE: debug }
+
+ - task: postbuild
+ vars: { BUILD_MODE: release }
+
+ #tar input and output
+ - cd ./src/x64/debug && tar -czf "{{.TARGET}}/debug.tgz" .
+
+ #capture only dll, license, + readme files on release
+ - cd ./src/x64/release && tar --include='*.dll' --include='license.txt' --include='readme.md' --include='rpmalloc_license.txt' -czf "{{.TARGET}}/release.tgz" *
+
+
+ postbuild:
+ vars:
+ TARGET: './src/x64/{{.BUILD_MODE}}'
+
+ cmds:
+ #add rpmalloc license to binary output
+ - powershell -Command "Invoke-WebRequest '{{.RPMALLOC_LICENSE}}' -Outfile '{{.TARGET}}/rpmalloc_license.txt'"
+
+ #add my license file
+ - powershell -Command "Copy-Item -Path ./LICENSE.txt -Destination '{{.TARGET}}/license.txt'"
+
+ #add readme file
+ - powershell -Command "Copy-Item -Path ./build.readme.md -Destination '{{.TARGET}}/readme.md'"
+
+
+ clean:
+ cmds:
+ - cmd: powershell -Command "Remove-Item -Recurse './src/x64' -ErrorAction SilentlyContinue"
+ ignore_error: true
+ - cmd: powershell -Command "Remove-Item -Recurse './src/bin' -ErrorAction SilentlyContinue"
+ ignore_error: true \ No newline at end of file
diff --git a/lib/WinRpMalloc/src/package.json b/lib/WinRpMalloc/src/package.json
index 7ee361e..6470e01 100644
--- a/lib/WinRpMalloc/src/package.json
+++ b/lib/WinRpMalloc/src/package.json
@@ -1,9 +1,9 @@
{
- "Description": "A project to maintain an x64 Windows dll for RpMalloc by Mattias Jansson with some basic defaults for .NET loading. The debug output contains the debug MVCR libs and debug symbols.",
- "Authors": "Vaughn Nugent",
- "Copyright": "Copyright &copy; 2023 Vaughn Nugent",
- "Version": "0.1.2",
- "Company": "Vaughn Nugent",
- "Product": "WinRpMalloc",
- "RepositoryUrl": "https://github.com/VnUgE/VNLib.Core/tree/main/lib/WinRpMalloc"
+ "name": "WinRpMalloc",
+ "version": "0.1.2",
+ "author": "Vaughn Nugent",
+ "description": "A project to maintain an x64 Windows dll for RpMalloc by Mattias Jansson with some basic defaults for .NET loading. The debug output contains the debug MVCR libs and debug symbols.",
+ "copyright": "Copyright \u00A9 2023 Vaughn Nugent",
+ "company": "Vaughn Nugent",
+ "repository": "https://github.com/VnUgE/VNLib.Core/tree/main/lib/WinRpMalloc"
} \ No newline at end of file