2020-12-07 12:26:52 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-12-09 12:15:38 +01:00
|
|
|
# check author has added themselves to CONTRIBUTORS
|
2020-12-16 02:59:07 +01:00
|
|
|
echo "--- Checking CONTRIBUTORS"
|
2020-12-09 12:15:38 +01:00
|
|
|
.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
|
2021-10-07 03:34:00 +02:00
|
|
|
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"
|
2021-07-24 02:12:25 +02:00
|
|
|
$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
|
2021-10-07 03:34:00 +02:00
|
|
|
mv node_modules /state/
|