anki/.buildkite/linux/entrypoint

24 lines
651 B
Plaintext
Raw Normal View History

2020-12-07 12:26:52 +01:00
#!/bin/bash
set -e
# check author has added themselves to CONTRIBUTORS
2020-12-16 02:59:07 +01:00
echo "--- Checking CONTRIBUTORS"
.buildkite/linux/check_contributors
2020-12-16 02:59:07 +01:00
echo "--- Building"
2020-12-07 12:26:52 +01:00
BAZEL="bazel --output_user_root=/state/bazel --output_base=/state/bazel/anki"
2020-12-09 23:49:37 +01:00
BUILDARGS="--config=ci --experimental_convenience_symlinks=ignore --disk_cache=/state/bazel/disk --repository_cache=/state/bazel/repo"
2020-12-07 12:26:52 +01:00
# move existing node_modules into tree
test -e /state/node_modules && mv /state/node_modules ts/
$BAZEL build $BUILDARGS ...
2020-12-16 02:59:07 +01:00
echo "+++ Running tests"
2020-12-07 12:26:52 +01:00
$BAZEL test $BUILDARGS ...
2020-12-16 02:59:07 +01:00
echo "--- Cleanup"
2020-12-07 12:26:52 +01:00
# if tests succeed, back up node_modules folder
mv ts/node_modules /state/