just: Update targets for static builds

This commit is contained in:
2022-06-15 20:38:55 +02:00
parent d0cbc2f985
commit 4b79b6dd1d

View File

@@ -1,6 +1,6 @@
set positional-arguments set positional-arguments
target := "x86_64-unknown-linux-musl" static_target := "x86_64-unknown-linux-musl"
check: fmt-check lint test check: fmt-check lint test
cargo check cargo check
@@ -22,25 +22,28 @@ lint-fix:
cargo clippy --no-deps --fix cargo clippy --no-deps --fix
release: release:
cargo build --release --target {{target}} cargo build --release
release-static:
cargo build --release --target {{static_target}} --features=static-build
test-binary: test-binary:
env \ env \
GITHUB_API_BASEURL=http://rest:5000/github \ GITHUB_API_BASEURL=http://rest:5000/github \
GITLAB_API_BASEURL=http://rest:5000/gitlab \ GITLAB_API_BASEURL=http://rest:5000/gitlab \
cargo build --target {{target}} --profile e2e-tests --features=static-build cargo build --target {{static_target}} --profile e2e-tests --features=static-build
install: install:
cargo install --path . cargo install --path .
install-static: install-static:
cargo install --target {{target}} --features=static-build --path . cargo install --target {{static_target}} --features=static-build --path .
build: build:
cargo build cargo build
build-static: build-static:
cargo build --target {{target}} --features=static-build cargo build --target {{static_target}} --features=static-build
test: test-unit test-integration test-e2e test: test-unit test-integration test-e2e
@@ -56,7 +59,7 @@ test-e2e +tests=".": test-binary
&& docker-compose build \ && docker-compose build \
&& docker-compose run \ && docker-compose run \
--rm \ --rm \
-v $PWD/../target/{{target}}/e2e-tests/grm:/grm \ -v $PWD/../target/{{static_target}}/e2e-tests/grm:/grm \
pytest \ pytest \
"GRM_BINARY=/grm ALTERNATE_DOMAIN=alternate-rest python3 -m pytest -p no:cacheprovider --color=yes "$@"" \ "GRM_BINARY=/grm ALTERNATE_DOMAIN=alternate-rest python3 -m pytest -p no:cacheprovider --color=yes "$@"" \
&& docker-compose rm --stop -f && docker-compose rm --stop -f