anki/.buildkite/linux/entrypoint
2021-12-20 17:41:13 +10:00

28 lines
733 B
Bash
Executable File

#!/bin/bash
set -e
# check author has added themselves to CONTRIBUTORS
echo "--- Checking CONTRIBUTORS"
.buildkite/linux/check_contributors
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"
echo "+++ Building and testing"
# move existing node_modules into tree
test -e /state/node_modules && mv /state/node_modules .
$BAZEL test $BUILDARGS ... //rslib/linkchecker
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 node_modules /state/