diff options
author | vnugent <public@vaughnnugent.com> | 2024-02-25 01:11:06 -0500 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-02-25 01:11:06 -0500 |
commit | bd3a7a25792b837c5f28c7580adf132abc6f35e7 (patch) | |
tree | 2a3ec046f8f76f115e648f2bc6d1576cfa0a6c6f /ci/container/Taskfile.yaml | |
parent | 52645b724834e669788a45edb9d135f243432540 (diff) |
Squashed commit of the following:
commit 069f81fc3c87c437eceff756ddca7a4c1b58044d
Author: vnugent <public@vaughnnugent.com>
Date: Sat Feb 24 22:33:34 2024 -0500
feat: #3 setup mode, admin signup, fixes, and contianerize!
commit 97ffede9eb312fca0257afa06969d47a12703f3b
Author: vnugent <public@vaughnnugent.com>
Date: Mon Feb 19 22:26:03 2024 -0500
feat: new account setup and invitation links
commit 1c8f59bc0a1b25ce5013b0f1fc7fa73c0de415d6
Author: vnugent <public@vaughnnugent.com>
Date: Thu Feb 15 16:49:59 2024 -0500
feat: update packages, drag/drop link, and fix some button padding
Diffstat (limited to 'ci/container/Taskfile.yaml')
-rw-r--r-- | ci/container/Taskfile.yaml | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/ci/container/Taskfile.yaml b/ci/container/Taskfile.yaml new file mode 100644 index 0000000..19ce71c --- /dev/null +++ b/ci/container/Taskfile.yaml @@ -0,0 +1,91 @@ +# https://taskfile.dev + +#Called by the vnbuild system to produce builds for my website +#https://www.vaughnnugent.com/resources/software + +version: "3" + +vars: + BUILDS_URL: https://www.vaughnnugent.com/public/resources/software/builds + PACKAGE_FILE_NAME: "sb-alpine3.19-oci.tgz" + INCLUDE_FILES: "Dockerfile, docker-compose.yaml" + +includes: + install: + taskfile: ../install.taskfile.yaml + optional: true #not needed for inside container build + +tasks: + + #called from inside the container to build native libraries + build-libs: + vars: + OUT_DIR: "{{.USER_WORKING_DIR}}/out" + + #build stage generates the following libraries + generates: + - "{{.USER_WORKING_DIR}}/out/libargon2.so" + - "{{.USER_WORKING_DIR}}/out/libvn_rpmalloc.so" + - "{{.USER_WORKING_DIR}}/out/libvn_compress.so" + + cmds: + #build argon2 lib + - cd lib/argon2/ && task && cp build/libargon2.so {{.OUT_DIR}}/libargon2.so + #build rpmalloc library + - cd lib/vnlib_rpmalloc/ && task && cp build/libvn_rpmalloc.so {{.OUT_DIR}}/libvn_rpmalloc.so + #install zlib and brotli native libraries from the source repos (they dont have active releases anymore :() + - mkdir -p lib/third-party + - cd lib/third-party && git clone https://github.com/cloudflare/zlib.git + - cd lib/third-party && git clone https://github.com/google/brotli.git + #build native compression lib and put in lib dir + - cd lib/vnlib_compress && cmake -B./build && cmake --build build/ --config Release && cp build/libvn_compress.so {{.OUT_DIR}}/libvn_compress.so + + + #called from ci pipline to build the package + build: + vars: + SQLITE_RUNTIMES: 'build/app/plugins/assets/VNLib.Plugins.Extensions.Loading.Sql.SQLite/runtimes' + cmds: + - cmd: wsl dos2unix ./run.sh + #make build directory + - cmd: powershell -Command "mkdir build, build/app, build/app/config-templates/, build/app/static/ -Force" + #copy the existing linux-x64 build to the build folder + - cmd: powershell -Command "cp -Recurse -Force ../build/linux-x64/* build/app/" + #copy local scripts into the build folder + - cmd: powershell -Command "cp -Force run.sh, Taskfile.yaml build/app/" + - cmd: powershell -Command "cp -Force Dockerfile, docker-compose.yaml build/" + - cmd: powershell -Command "cp -Force static/* build/app/static/" + - cmd: powershell -Command "cp -Force config-templates/* build/app/config-templates/" + #remove the default config file as it's not needed in the container + - cmd: powershell -Command "rm -Force build/app/config.json" + - cmd: powershell -Command "rm -Force -Recurse build/app/config/" + + #move the linux-musl-x64 directory out of assets before removing the rest of the runtimes and then move it back + - cmd: powershell -Command "mv {{.SQLITE_RUNTIMES}}/linux-musl-x64 build/linux-musl-x64" + - cmd: powershell -Command "rm -Recurse -Force {{.SQLITE_RUNTIMES}}" && powershell -Command "mkdir {{.SQLITE_RUNTIMES}}" + - cmd: powershell -Command "mv build/linux-musl-x64 {{.SQLITE_RUNTIMES}}/linux-musl-x64 " + + #install rpmalloc + - task: install-rpmalloc-lib + + postbuild_success: + cmds: + #tar up the build directory and move it to the output bin directory + - cmd: cd build/ && tar -czf ../../bin/{{.PACKAGE_FILE_NAME}} . + + clean: + ignore_error: true + cmds: + - cmd: powershell -Command "rm -Recurse -Force ./build" + + + install-rpmalloc-lib: + internal: true + cmds: + #install compressor plugin + - task: install:install + vars: + PROJECT_NAME: 'vnlib_rpmalloc' + MODULE_NAME: "VNLib.Core" + FILE_NAME: "src.tgz" + DIR: './build/app/lib/vnlib_rpmalloc'
\ No newline at end of file |