aboutsummaryrefslogtreecommitdiff
path: root/Taskfile.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'Taskfile.yaml')
-rw-r--r--Taskfile.yaml52
1 files changed, 20 insertions, 32 deletions
diff --git a/Taskfile.yaml b/Taskfile.yaml
index 0d73872..ad0e837 100644
--- a/Taskfile.yaml
+++ b/Taskfile.yaml
@@ -10,65 +10,53 @@
version: '3'
vars:
- TARGET: '{{.USER_WORKING_DIR}}/bin'
+ BINARY_DIR: 'bin'
RELEASE_DIR: "./bin/release/{{.TARGET_FRAMEWORK}}/publish"
+ TARGET_DIR: '{{ .USER_WORKING_DIR }}/{{ .BINARY_DIR }}'
tasks:
- dev-setup:
- desc: 'Sets up all native libraries for local development'
- cmds:
- #build native libs for development
- - cd lib/Utils.Memory/vnlib_rpmalloc && task build
- - cd lib/Utils.Memory/vnlib_mimalloc && task build
- - cd lib/Utils.Cryptography/monocypher && task build
- - cd lib/Utils.Cryptography/argon2 && task build
- - cd lib/Net.Compression/vnlib_compress && task build
- - echo "dev setup complete"
-
#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: []
+ - task: post_parallel
+ post_parallel:
+ internal: true
+ deps:
+ - task: packsource
+ - task: postbuild
+ vars: { BUILD_MODE: debug }
+ - task: postbuild
+ vars: { BUILD_MODE: release }
postbuild:
- dir: '{{.USER_WORKING_DIR}}'
+ dir: '{{.USER_WORKING_DIR}}'
internal: true
vars:
#the build output directory
- BUILD_OUT: "{{.USER_WORKING_DIR}}/bin/{{.BUILD_MODE}}/{{.TARGET_FRAMEWORK}}/publish"
+ BUILD_OUT: "{{ .BINARY_DIR }}/{{ .BUILD_MODE }}/{{ .TARGET_FRAMEWORK }}/publish"
cmds:
- - cd .. && powershell -Command "Copy-Item -Path ./build.readme.txt -Destination '{{.BUILD_OUT}}/readme.txt'"
+ - powershell cp ../build.readme.txt '{{.BUILD_OUT}}/readme.txt'
#tar outputs
- - cd "{{.BUILD_OUT}}" && tar -czf "{{.TARGET}}/{{.BUILD_MODE}}.tgz" .
+ - cd "{{ .BUILD_OUT }}" && tar -czf "{{ .TARGET_DIR }}/{{ .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'"
+ -
+ powershell -Command "Get-ChildItem -Include *.cs,*.csproj -Recurse
+ | Where { \$_.FullName -notlike '*\obj\*' -and \$_.FullName -notlike '*\bin\*' }
+ | Resolve-Path -Relative
+ | tar --files-from - -czf '{{ .TARGET_DIR }}/src.tgz'"
#Remove the output dirs on clean