anki/.buildkite/mac/entrypoint

22 lines
488 B
Plaintext
Raw Normal View History

2020-12-07 12:26:52 +01:00
#!/bin/bash
set -e
2021-12-13 04:12:59 +01:00
STATE=$(pwd)/../state/anki-ci
mkdir -p $STATE
BAZEL="bazel --output_user_root=$STATE/bazel --output_base=$STATE/bazel/anki"
2020-12-07 12:26:52 +01:00
BUILDARGS="--config=ci --experimental_convenience_symlinks=ignore"
echo "+++ Building and testing"
2020-12-07 12:26:52 +01:00
# move existing node_modules into tree
2021-12-13 04:12:59 +01:00
test -e $STATE/node_modules && mv $STATE/node_modules .
2020-12-07 12:26:52 +01:00
$BAZEL test $BUILDARGS ...
echo "--- Building wheels"
$BAZEL build dist
2020-12-07 12:26:52 +01:00
# if tests succeed, back up node_modules folder
2021-12-13 04:12:59 +01:00
mv node_modules $STATE/