anki/.buildkite/linux/entrypoint
Damien Elmes d73852f272 use separate integration test for links
If we run into issues with unreliable network connections in the future,
we'll be able to mark the test as flaky so Bazel can retry it multiple
times.
2021-07-24 10:12:25 +10:00

30 lines
773 B
Bash
Executable File

#!/bin/bash
set -e
# check author has added themselves to CONTRIBUTORS
echo "--- Checking CONTRIBUTORS"
.buildkite/linux/check_contributors
echo "--- Building"
BAZEL="bazel --output_user_root=/state/bazel --output_base=/state/bazel/anki"
BUILDARGS="--config=ci --experimental_convenience_symlinks=ignore --disk_cache=/state/bazel/disk --repository_cache=/state/bazel/repo"
# move existing node_modules into tree
test -e /state/node_modules && mv /state/node_modules ts/
$BAZEL build $BUILDARGS ...
echo "+++ Running tests"
$BAZEL test $BUILDARGS ... //rslib:links
echo "--- Building wheels"
$BAZEL build dist
echo "--- Running lints"
python scripts/copyright_headers.py
echo "--- Cleanup"
# if tests succeed, back up node_modules folder
mv ts/node_modules /state/