blob: f6fdf629f028850688f6078c852ca8148e5334ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# https://taskfile.dev
#Inlcuded taskfile for object cache server that is used to produce
#ci builds for standalone caching servers
version: "3"
vars:
SSL_DIR: "ssl"
DATA_DIR: "data"
DEFAULT_EC_CURVE: "secp384r1"
tasks:
default:
desc: "Runs the Simple-Bookmark server"
cmds:
- task: run
run:
desc: "Runs the Simple-Bookmark server"
silent: true
env:
#libraries intentionally do not have extensions, for cross-platform compatibility, the server will load them regardless
VNLIB_SHARED_HEAP_FILE_PATH: lib/vnlib_rpmalloc.dll
VNLIB_ARGON2_DLL_PATH: lib/argon2.dll
cmds:
- cmd: dotnet webserver/VNLib.WebServer.dll --config config/config.json {{.CLI_ARGS}}
setup-apt:
desc: "Performs initial setup on Debian apt amd64 based machines"
silent: true
cmds:
- apt update
- apt install -y dotnet-runtime-8.0 gcc cmake curl
- task: setup
- echo "Setup complete"
setup-dnf:
desc: "Performs initial setup on Fedora/Redhat amd (dnf) based machines"
silent: true
cmds:
- dnf update
- dnf install -y dotnet-runtime-8.0 gcc cmake curl
- task: setup
- echo "Setup complete"
setup-apk:
desc: "Performs initial setup using the APK package manager for amd64 based machines"
silent: true
cmds:
- apk update
- apk add --no-cache dotnet8-runtime build-base cmake curl
- task: setup
- echo "Setup complete"
setup:
desc: "Performs platform agnostic setup tasks without installing tools (no sudo needed)"
cmds:
#build rpmalloc lib
- task: build-rpmalloc
- task: build-argon2
- task: build-compress
#setup ssl dir
- cmd: mkdir ssl/
platforms: [ linux, darwin ]
ignore_error: true
- cmd: powershell -Command "mkdir ssl/"
platforms: [ windows/amd64 ]
ignore_error: true
create-cert:
desc: "Genereates a new self-signed TLS certificate"
cmds:
- openssl req -new -x509 -days 365 -keyout {{.SSL_DIR}}/key.pem -out {{.SSL_DIR}}/cert.pem -newkey ec -pkeyopt ec_paramgen_curve:{{.DEFAULT_EC_CURVE}} --nodes
build-rpmalloc:
internal: true
dir: 'lib/'
cmds:
#build rpmalloc library for linux/mac
- cmd: cd vnlib_rpmalloc/ && task && cp build/libvn_rpmalloc{{if eq OS "darwin"}}.dylib{{else}}.so{{end}} ../vnlib_rpmalloc.dll
platforms: [ linux, darwin ]
#for windows just copy the existing dll
- cmd: powershell -Command "cp vnlib_rpmalloc/vnlib_rpmalloc.dll vnlib_rpmalloc.dll"
platforms: [ windows/amd64 ]
build-argon2:
internal: true
dir: 'lib/'
cmds:
#build argon2 library for linux/mac
- cmd: cd argon2/ && task && cp build/libargon2{{if eq OS "darwin"}}.dylib{{else}}.so{{end}} ../argon2.dll
platforms: [ linux, darwin ]
#for windows just copy the existing dll
- cmd: powershell -Command "cp argon2/argon2.dll argon2.dll"
platforms: [ windows/amd64 ]
build-compress:
internal: true
dir: 'lib/'
cmds:
- cd vnlib_compress/ && task
#build the native compressor library for linux/mac
- cmd: cd vnlib_compress/ && cp build/libvn_compress{{if eq OS "darwin"}}.dylib{{else}}.so{{end}} ../vnlib_compress.dll
platforms: [ linux, darwin ]
- cmd: powershell -Command "cp vnlib_compress/build/Release/vnlib_compress.dll vnlib_compress.dll"
platforms: [ windows/amd64 ]
|