aboutsummaryrefslogtreecommitdiff
path: root/Module.Taskfile.yaml
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-09-14 15:54:30 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-09-14 15:54:30 -0400
commitbb706bbfa7519c8b5c506e76a787b9b016acfb75 (patch)
tree12abc5835dc6df87c3aaf7d39dfd541fa26b6529 /Module.Taskfile.yaml
parenta19807f7f73ffb023e4ffe93071fe91525fd2c8d (diff)
Squashed commit of the following:HEADmaster
commit 322bbe00f77772ba6b0e25759de95dd517b6014c Author: vnugent <public@vaughnnugent.com> Date: Sat Sep 14 15:43:45 2024 -0400 build: Testing updates and easier dev-testing commit abcd0e0d6cb5532c8a19a8cd8c7dd83e7f143442 Author: vnugent <public@vaughnnugent.com> Date: Wed Sep 11 16:43:20 2024 -0400 Managed library & package updates commit 2ae018af277b808786cf398c689910bc016e7ef0 Author: vnugent <public@vaughnnugent.com> Date: Tue Sep 10 18:59:06 2024 -0400 fix: zero/unsafezero with data types > sizeof(byte) commit 17c646a619eaa101d66871faa8f57c76500a8ad2 Merge: 97d0c46 a19807f Author: vnugent <public@vaughnnugent.com> Date: Sat Sep 7 15:31:01 2024 -0400 Merge branch 'master' into develop
Diffstat (limited to 'Module.Taskfile.yaml')
-rw-r--r--Module.Taskfile.yaml54
1 files changed, 40 insertions, 14 deletions
diff --git a/Module.Taskfile.yaml b/Module.Taskfile.yaml
index 6ec8fc6..99ea9b2 100644
--- a/Module.Taskfile.yaml
+++ b/Module.Taskfile.yaml
@@ -10,42 +10,68 @@
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 /p:ErrorOnDuplicatePublishOutputFiles=false'
+vars:
+ MS_ARGS: '/p:RunAnalyzersDuringBuild=false /p:UseCommonOutputDirectory=true /p:BuildInParallel=true /p:MultiProcessorCompilation=true /p:ErrorOnDuplicatePublishOutputFiles=false'
PACK_OUT: '{{ .OUTPUT_DIR }}/{{ .HEAD_SHA }}/pkg'
tasks:
+ default:
+ desc: 'Builds the managed libraries in this module for development'
+ cmds:
+ - dotnet build -c debug {{ .MS_ARGS }}
+
+
#called by build pipeline to sync repo
update:
cmds:
- git reset --hard #clean up any local changes
- - git remote update
+ - git remote update
- git pull origin {{ .BRANCH_NAME }} --verify-signatures
#re-write semver after hard reset
- dotnet-gitversion.exe /updateprojectfiles
#called by build pipeline to build module
build:
+ desc: "Used by vnbuild to build the entire module at CI time"
+ vars:
+ INT_DIR: '{{ .SCRATCH_DIR }}/obj/{{ .MODULE_NAME }}/'
+ MS_ARGS: '{{ .MS_ARGS }} /p:IntermediateOutputPath="{{ .INT_DIR }}"'
cmds:
- - echo "building module {{.MODULE_NAME}}"
-
+ - cmd: echo "building module {{ .MODULE_NAME }}"
+ silent: true
+
#build debug mode first
- task: build_debug
+ vars: { MS_ARGS: '{{ .MS_ARGS }}'}
- task: build_release
+ vars: { MS_ARGS: '{{ .MS_ARGS }}'}
publish:
+ desc: "Used by vnbuild to prepare the packages for build servers"
cmds:
#git archive in the module directory
- - git archive --format {{.ARCHIVE_FILE_FORMAT}} --output {{.ARCHIVE_FILE_NAME}} HEAD
+ - git archive --format {{ .ARCHIVE_FILE_FORMAT }} --output {{ .ARCHIVE_FILE_NAME }} HEAD
#push packages to the sleet feed (feed path is vnbuild global)
- - sleet push "{{.PACK_OUT}}/debug/" --source debug --config "{{.SLEET_CONFIG_PATH}}" --force
- - sleet push "{{.PACK_OUT}}/release/" --source release --config "{{.SLEET_CONFIG_PATH}}" --force
+ - sleet push "{{ .PACK_OUT }}/debug/" --source debug --config "{{ .SLEET_CONFIG_PATH }}" --force
+ - sleet push "{{ .PACK_OUT }}/release/" --source release --config "{{ .SLEET_CONFIG_PATH }}" --force
test:
+ desc: "Runs managed tests against the entire solution and all loaded test projects"
+ vars:
+ RPMALLOC_LIB_PATH: '{{ .USER_WORKING_DIR }}/lib/Utils.Memory/vnlib_rpmalloc/build/Debug/vnlib_rpmalloc'
+ MIMALLOC_LIB_PATH: '{{ .USER_WORKING_DIR }}/lib/Utils.Memory/vnlib_mimalloc/build/Debug/vnlib_mimalloc'
cmds:
- - cmd: dotnet test --verbosity normal
+ - cmd: echo "Ensure you have run 'task dev-init' before running tests to build native libraries"
+ silent: true
+ - cmd: dotnet test
+ {{ .CLI_ARGS }}
+ --verbosity normal
+ --framework {{ .FRAMEWORK | default "net8.0" }}
+ --environment VNLIB_SHARED_HEAP_DIAGNOSTICS="1"
+ --environment TEST_RPMALLOC_LIB_PATH="{{ .RPMALLOC_LIB_PATH }}"
+ --environment TEST_MIMALLOC_LIB_PATH="{{ .MIMALLOC_LIB_PATH }}"
+
#called by build pipeline to clean module
clean:
@@ -72,12 +98,12 @@ tasks:
build_debug:
internal: true
cmds:
- - dotnet publish -c debug {{.MS_ARGS}}
- - dotnet pack -c debug {{.MS_ARGS}} -o "{{.PACK_OUT}}/debug/" -p:PackageVersion={{.BUILD_VERSION}}
+ - dotnet publish -c debug {{ .MS_ARGS }}
+ - dotnet pack -c debug {{ .MS_ARGS }} -o "{{ .PACK_OUT }}/debug/" -p:PackageVersion={{ .BUILD_VERSION }}
build_release:
internal: true
cmds:
- - dotnet publish -c release {{.MS_ARGS}}
- - dotnet pack -c release {{.MS_ARGS}} -o "{{.PACK_OUT}}/release/" -p:PackageVersion={{.BUILD_VERSION}}
+ - dotnet publish -c release {{ .MS_ARGS }}
+ - dotnet pack -c release {{ .MS_ARGS }} -o "{{ .PACK_OUT }}/release/" -p:PackageVersion={{ .BUILD_VERSION }}
\ No newline at end of file