mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 18:24:58 +00:00
Fix build scripts
This commit is contained in:
4 files changed
+46
-13
No files matched your search
@@ -39,7 +39,8 @@ jobs:
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
context: scripts/
|
||||
context: .
|
||||
file: scripts/Dockerfile
|
||||
tags: tindy2013/subconverter:latest
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
@@ -60,7 +61,8 @@ jobs:
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
context: scripts/
|
||||
context: .
|
||||
file: scripts/Dockerfile
|
||||
tags: tindy2013/subconverter:${{steps.version.outputs.result}}
|
||||
outputs: type=image,push=true
|
||||
|
||||
@@ -106,7 +108,8 @@ jobs:
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/386
|
||||
context: scripts/
|
||||
context: .
|
||||
file: scripts/Dockerfile
|
||||
tags: tindy2013/subconverter:latest
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
@@ -127,7 +130,8 @@ jobs:
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/386
|
||||
context: scripts/
|
||||
context: .
|
||||
file: scripts/Dockerfile
|
||||
tags: tindy2013/subconverter:${{steps.version.outputs.result}}
|
||||
outputs: type=image,push=true
|
||||
|
||||
@@ -173,7 +177,8 @@ jobs:
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm/v7
|
||||
context: scripts/
|
||||
context: .
|
||||
file: scripts/Dockerfile
|
||||
tags: tindy2013/subconverter:latest
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
@@ -195,7 +200,8 @@ jobs:
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm/v7
|
||||
context: scripts/
|
||||
context: .
|
||||
file: scripts/Dockerfile
|
||||
tags: tindy2013/subconverter:${{steps.version.outputs.result}}
|
||||
build-args: |
|
||||
THREADS=4
|
||||
@@ -243,7 +249,8 @@ jobs:
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
context: scripts/
|
||||
context: .
|
||||
file: scripts/Dockerfile
|
||||
tags: tindy2013/subconverter:latest
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
@@ -265,7 +272,8 @@ jobs:
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
context: scripts/
|
||||
context: .
|
||||
file: scripts/Dockerfile
|
||||
tags: tindy2013/subconverter:${{steps.version.outputs.result}}
|
||||
build-args: |
|
||||
THREADS=4
|
||||
|
||||
+3
-2
@@ -42,9 +42,10 @@ RUN set -xe && \
|
||||
# [ -n "$SHA" ] && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h;\
|
||||
# cmake -DCMAKE_BUILD_TYPE=Release -DUSE_EXTERNAL_CURL=ON -DUSE_EXTERNAL_RAPIDJSON=ON -DUSE_EXTERNAL_YAML_CPP=ON . && \
|
||||
# make -j $THREADS && \
|
||||
ls -alh && \
|
||||
source "$HOME/.xmake/profile" && \
|
||||
xmake f --root --static=false -m release && \
|
||||
xmake --root subconverter --build release && \
|
||||
xmake f --root --static=false -m release -y -v && \
|
||||
xmake --root -v subconverter && \
|
||||
python3 -m ensurepip && \
|
||||
python3 -m pip install gitpython && \
|
||||
python3 scripts/update_rules.py -c scripts/rules_config.conf
|
||||
|
||||
@@ -8,14 +8,18 @@ option("static")
|
||||
option_end()
|
||||
|
||||
add_requires("pcre2", "yaml-cpp", "rapidjson", "toml11")
|
||||
add_requires("libcurl >=8.4.0")
|
||||
add_requires("xmake::libcurl >=8.4.0", {configs = {shared = not has_config("static"), mbedtls = is_plat("linux"), openssl = false}})
|
||||
includes("xmake/libcron.lua")
|
||||
includes("xmake/yaml-cpp-static.lua")
|
||||
includes("xmake/quickjspp.lua")
|
||||
includes("xmake/curl-static.lua")
|
||||
add_requires("libcron", {system = false})
|
||||
add_requires("yaml-cpp-static", {system = false})
|
||||
add_requires("quickjspp", {system = false})
|
||||
if not is_plat("macosx") and has_config("static") then
|
||||
add_requires("curl-static", {system = false})
|
||||
else
|
||||
add_requires("libcurl")
|
||||
end
|
||||
|
||||
target("subconverter")
|
||||
set_kind("binary")
|
||||
@@ -32,7 +36,7 @@ target("subconverter")
|
||||
if is_plat("macosx") then
|
||||
add_packages("libcurl")
|
||||
else
|
||||
add_packages("xmake::libcurl")
|
||||
add_packages("curl-static")
|
||||
end
|
||||
if has_config("static") then
|
||||
add_packages("yaml-cpp-static")
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package("curl-static")
|
||||
add_deps("cmake")
|
||||
add_versions("8.5.0", "7161cb17c01dcff1dc5bf89a18437d9d729f1ecd")
|
||||
set_urls("https://github.com/curl/curl.git")
|
||||
on_install(function (package)
|
||||
local configs = {}
|
||||
table.insert(configs, "-DCURL_USE_LIBSSH2=OFF")
|
||||
table.insert(configs, "-DHAVE_LIBIDN2=OFF")
|
||||
table.insert(configs, "-DCURL_USE_LIBPSL=OFF")
|
||||
table.insert(configs, "-DBUILD_CURL_EXE=OFF")
|
||||
table.insert(configs, "-DBUILD_TESTING=OFF")
|
||||
table.insert(configs, "-DCURL_USE_MBEDTLS=" .. (package:is_plat("linux") and "ON" or "OFF"))
|
||||
table.insert(configs, "-DCURL_USE_SCHANNEL=" .. (package:is_plat("windows") and "ON" or "OFF"))
|
||||
table.insert(configs, "-DHTTP_ONLY=ON")
|
||||
table.insert(configs, "-DCURL_USE_LIBSSH2=OFF")
|
||||
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
||||
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
|
||||
import("package.tools.cmake").install(package, configs)
|
||||
end)
|
||||
package_end()
|
||||
Reference in new issue
Block a user