|
|
|
[config]
|
|
|
|
default_to_workspace = false
|
|
|
|
|
|
|
|
[env]
|
|
|
|
TARGET = "x86_64-unknown-linux-musl"
|
|
|
|
CARGO = "cargo"
|
|
|
|
PREFIX = "${CARGO_MAKE_WORKING_DIRECTORY}/static"
|
|
|
|
PQ_LIB_STATIC_X86_64_UNKNOWN_LINUX_MUSL = "true"
|
|
|
|
PG_CONFIG_X86_64_UNKNOWN_LINUX_GNU = "${PREFIX}/bin/pg_config"
|
|
|
|
OPENSSL_STATIC = "true"
|
|
|
|
OPENSSL_DIR = "${PREFIX}"
|
|
|
|
|
|
|
|
[tasks.build_static_libs]
|
|
|
|
script = "./scripts/build_musl_libs.sh"
|
|
|
|
|
|
|
|
[tasks.clean]
|
|
|
|
command = "${CARGO}"
|
|
|
|
args = ["clean"]
|
|
|
|
|
|
|
|
[tasks.build]
|
|
|
|
dependencies = ["build_static_libs"]
|
|
|
|
command = "${CARGO}"
|
|
|
|
args = ["build", "--target", "${TARGET}", "${@}"]
|
|
|
|
|
|
|
|
[tasks.run]
|
|
|
|
script = '''
|
|
|
|
echo "Only integration tests are supported."
|
|
|
|
exit 1
|
|
|
|
'''
|
|
|
|
|
|
|
|
[tasks.unit]
|
|
|
|
command = "${CARGO}"
|
|
|
|
args = ["test", "--target", "${TARGET}", "--lib", "--", "${@}"]
|
|
|
|
|
|
|
|
[tasks.integration]
|
|
|
|
script = '''
|
|
|
|
cd ./integration
|
|
|
|
bash integration_tests.sh
|
|
|
|
'''
|
|
|
|
|
|
|
|
[tasks.gen_schema]
|
|
|
|
script = '''
|
|
|
|
cd ./integration
|
|
|
|
docker-compose up -d u_server
|
|
|
|
docker-compose down
|
|
|
|
'''
|
|
|
|
|
|
|
|
[tasks.test]
|
|
|
|
dependencies = ["unit", "integration"]
|