aboutsummaryrefslogtreecommitdiff
path: root/lib/Net.Compression
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-08-01 21:13:04 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-08-01 21:13:04 -0400
commit904560a7b5eafd7580fb0a03e778d1751e72a503 (patch)
tree9ffc07d9f9dd6a9106b8cd695a6caa591aac8e95 /lib/Net.Compression
parent6af95e61212611908d39235222474d4038e10fcd (diff)
build(app): swallow vnlib.webserver into core & build updates
Diffstat (limited to 'lib/Net.Compression')
-rw-r--r--lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj2
-rw-r--r--lib/Net.Compression/vnlib_compress/Taskfile.yaml76
2 files changed, 62 insertions, 16 deletions
diff --git a/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj b/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj
index c5b428e..2f49dda 100644
--- a/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj
+++ b/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj
@@ -24,7 +24,7 @@
<Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<Description>.NET/8.0 dynamically loadable managed wrapper library for loading vnlib_compress native library. It provides an implementation of the IHttpCompressorManager interface for use with the VNLib.Net.Http library and servers wishing to support dynamic response compression.</Description>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
- <RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/main/lib/Net.Compression</RepositoryUrl>
+ <RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/master/lib/Net.Compression</RepositoryUrl>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
diff --git a/lib/Net.Compression/vnlib_compress/Taskfile.yaml b/lib/Net.Compression/vnlib_compress/Taskfile.yaml
index f1d594e..32636ee 100644
--- a/lib/Net.Compression/vnlib_compress/Taskfile.yaml
+++ b/lib/Net.Compression/vnlib_compress/Taskfile.yaml
@@ -31,33 +31,79 @@ tasks:
- cmake -B./build -DCI_PRECOMPILE=ON -DENABLE_RPMALLOC=ON
#build for platform
- - cmake --build build/ --config Debug
- - cmake --build build/ --config Release
+ - cmake --build build/ --config debug
+ - cmake --build build/ --config release
#when build succeeds, archive the output into a tgz
postbuild_success:
+ cmds:
+ - cmd: powershell mkdir -Force 'bin/'
+ - task: pack_parallel
+
+ pack_parallel:
+ internal: true
vars:
#required files to include in tar
- TAR_FILES: "{{.PROJECT_NAME}}.dll {{.PROJECT_NAME}}.pdb {{.PROJECT_NAME}}.lib license.txt"
+ REL_TAR_FILES:
+ "{{ .PROJECT_NAME }}.dll
+ {{ .PROJECT_NAME }}.lib
+ compression.h
+ license.txt"
+ DEBUG_TAR_FILES:
+ "{{ .PROJECT_NAME }}.dll
+ {{ .PROJECT_NAME }}.pdb
+ {{ .PROJECT_NAME }}.lib
+ compression.h
+ license.txt"
+
+ deps:
+ - task: pack_source
+
+ - task: pack_artifacts
+ vars: { BUILD_MODE: 'debug', TAR_FILES: '{{ .DEBUG_TAR_FILES }}' }
+ - task: pack_artifacts
+ vars: { BUILD_MODE: 'release', TAR_FILES: '{{ .REL_TAR_FILES }}' }
+
+ #packs up the binary artifacts for distribution
+ pack_artifacts:
+ internal: true
+ deps:
+ - task: embed
+ vars: { TARGET: './build/{{ .BUILD_MODE }}' }
cmds:
- - cmd: powershell mkdir -Force './bin'
- #copy source code to target
- - cmd: powershell -Command "tar --exclude build/* --exclude .vs/* --exclude bin/* --exclude third-party/* -czf bin/src.tgz ."
-
- #copy license file to debug and release output
- - cmd: powershell -Command "cp ../LICENSE build/Debug/license.txt"
- - cmd: powershell -Command "cp ../LICENSE build/Release/license.txt"
+ - cmd: cd build/{{ .BUILD_MODE }} && tar -czf '../../bin/msvc-x64-{{ .BUILD_MODE }}-{{ .PROJECT_NAME }}.tgz' {{ .TAR_FILES }}
+
+ #add embeded resources to the binary output for distribution
+ embed:
+ internal: true
+ cmds:
+ - powershell cp ../LICENSE '{{.TARGET}}/license.txt'
+ - powershell cp compression.h '{{.TARGET}}/compression.h'
+
+ #packages source code for distribution
+ pack_source:
+ internal: true
+ vars:
+ EXCLUDES:
+
+ INCLUDES:
+ "*.c
+ *.h
+ CMakeLists.txt
+ LICENSE
+ Taskfile.yaml"
+
+ cmds:
+ #just pack up current directory, excluding build, bin, and git directories
+ - tar {{ .EXCLUDES }} -czf 'bin/src.tgz' {{ .INCLUDES }}
- #create static-build archives
- - cd build/Debug && tar -czf ../../bin/msvc-x64-debug-{{.PROJECT_NAME}}.tgz {{.TAR_FILES}}
- - cd build/Release && tar -czf ../../bin/msvc-x64-release-{{.PROJECT_NAME}}.tgz {{.TAR_FILES}}
-#Remove the output dirs on clean
+ #Remove the output dirs on clean
clean:
ignore_error: true
cmds:
- for: [ bin/, build/ ]
- cmd: powershell Remove-Item -Recurse '{{.ITEM}}' -Force
+ cmd: powershell rm -Recurse '{{.ITEM}}' -Force
clean-third-party:
internal: false