anki/.buildkite/linux/entrypoint

30 lines
768 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 .
2020-12-07 12:26:52 +01:00
$BAZEL build $BUILDARGS ...
2020-12-16 02:59:07 +01:00
echo "+++ Running tests"
$BAZEL test $BUILDARGS ... //rslib:links
2020-12-07 12:26:52 +01:00
2020-12-21 10:31:15 +01:00
echo "--- Building wheels"
$BAZEL build dist
2021-04-13 15:08:57 +02:00
echo "--- Running lints"
python scripts/copyright_headers.py
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 node_modules /state/