mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
skip superfluous build step in CI; it should be moderately faster
This commit is contained in:
parent
db804d9544
commit
c51b1c7180
3 changed files with 6 additions and 35 deletions
|
@ -6,16 +6,14 @@ set -e
|
|||
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"
|
||||
|
||||
echo "+++ Building and testing"
|
||||
|
||||
# move existing node_modules into tree
|
||||
test -e /state/node_modules && mv /state/node_modules .
|
||||
|
||||
$BAZEL build $BUILDARGS ...
|
||||
|
||||
echo "+++ Running tests"
|
||||
$BAZEL test $BUILDARGS ... //rslib:links
|
||||
|
||||
echo "--- Building wheels"
|
||||
|
|
|
@ -2,16 +2,14 @@
|
|||
|
||||
set -e
|
||||
|
||||
echo "--- Building"
|
||||
BAZEL="bazel --output_user_root=~/bazel --output_base=~/bazel/anki"
|
||||
BUILDARGS="--config=ci --experimental_convenience_symlinks=ignore"
|
||||
|
||||
echo "+++ Building and testing"
|
||||
|
||||
# move existing node_modules into tree
|
||||
test -e ~/node_modules && mv ~/node_modules .
|
||||
|
||||
$BAZEL build $BUILDARGS ...
|
||||
|
||||
echo "+++ Running tests"
|
||||
$BAZEL test $BUILDARGS ...
|
||||
|
||||
echo "--- Cleanup"
|
||||
|
|
|
@ -2,39 +2,14 @@ echo --- Building
|
|||
set BAZEL=\bazel\bazel.exe --output_user_root=\bazel\ankici --output_base=\bazel\ankici\base
|
||||
set BUILDARGS=--config=ci
|
||||
|
||||
echo +++ Building and testing
|
||||
|
||||
if exist \bazel\node_modules (
|
||||
move \bazel\node_modules .\node_modules
|
||||
)
|
||||
|
||||
:: rollup may fail on the first build, so we build once without checking return code
|
||||
call %BAZEL% build %BUILDARGS% ... -k
|
||||
|
||||
:: now build/test
|
||||
echo +++ Running tests
|
||||
call %BAZEL% test %BUILDARGS% ...
|
||||
IF %ERRORLEVEL% NEQ 0 exit /B 1
|
||||
|
||||
:: build the wheels
|
||||
@REM call %BAZEL% build %BUILDARGS% pylib/anki:wheel qt/aqt:wheel
|
||||
@REM IF %ERRORLEVEL% NEQ 0 exit /B 1
|
||||
|
||||
@REM :: install them into a new venv
|
||||
@REM echo Creating venv...
|
||||
@REM \python\python.exe -m venv venv
|
||||
@REM IF %ERRORLEVEL% NEQ 0 exit /B 1
|
||||
@REM call venv\scripts\activate
|
||||
|
||||
@REM :: expand wildcards
|
||||
@REM for %%i in (bazel-bin/pylib/anki/*.whl) do set "pylib=%%~i"
|
||||
@REM for %%i in (bazel-bin/qt/aqt/*.whl) do set "qt=%%~i"
|
||||
@REM echo Installing wheels...
|
||||
@REM venv\scripts\pip install bazel-bin/pylib/anki/%pylib% bazel-bin/qt/aqt/%qt%
|
||||
@REM IF %ERRORLEVEL% NEQ 0 exit /B 1
|
||||
|
||||
@REM echo Importing...
|
||||
@REM python -c "import aqt"
|
||||
@REM IF %ERRORLEVEL% NEQ 0 exit /B 1
|
||||
@REM echo Import succesful.
|
||||
|
||||
echo --- Cleanup
|
||||
move node_modules \bazel\node_modules
|
||||
|
|
Loading…
Reference in a new issue