Skip to content

Commit

Permalink
Skip scripts on macOS arm64 (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Nov 27, 2020
1 parent adfa5d3 commit 7625f7e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/onnx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ sync() {

install() {
bold "onnx install"
if [ "$(uname -ms)" = "Darwin arm64" ]; then
echo "- arm64 [skip]"
return
fi
case "${OSTYPE}" in
linux*)
[ -x "$(command -v cmake)" ] || sudo apt install -y cmake
Expand Down Expand Up @@ -88,6 +92,10 @@ schema() {

metadata() {
bold "onnx metadata"
if [ "$(uname -ms)" = "Darwin arm64" ]; then
echo "- arm64 [skip]"
return
fi
[[ $(grep -U $'\x0D' ./source/onnx-metadata.json) ]] && crlf=1
venv
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
Expand Down
8 changes: 8 additions & 0 deletions tools/pytorch
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ sync() {

install() {
bold "pytorch install"
if [ "$(uname -ms)" = "Darwin arm64" ]; then
echo "- arm64 [skip]"
return
fi
venv
${python} -m pip install --quiet --upgrade future protobuf scipy
${python} -m pip install --quiet --upgrade --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
Expand All @@ -57,6 +61,10 @@ schema() {

metadata() {
bold "pytorch metadata"
if [ "$(uname -ms)" = "Darwin arm64" ]; then
echo "- arm64 [skip]"
return
fi
venv
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
if [[ $(grep -U $'\x0D' ./source/pytorch-metadata.json) ]]; then crlf=1; else crlf=; fi
Expand Down
8 changes: 8 additions & 0 deletions tools/sklearn
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ sync() {

install() {
bold "sklearn install"
if [ "$(uname -ms)" = "Darwin arm64" ]; then
echo "- arm64 [skip]"
return
fi
venv
${python} -m pip install --quiet --use-feature=2020-resolver six cython pytest flake8 numpy scipy pylint astroid
${python} -m pip install --quiet --use-feature=2020-resolver --pre --extra-index https://pypi.anaconda.org/scipy-wheels-nightly/simple scikit-learn
Expand All @@ -48,6 +52,10 @@ install() {

metadata() {
bold "sklearn metadata"
if [ "$(uname -ms)" = "Darwin arm64" ]; then
echo "- arm64 [skip]"
return
fi
[[ $(grep -U $'\x0D' ./source/sklearn-metadata.json) ]] && crlf=1
venv
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
Expand Down
8 changes: 8 additions & 0 deletions tools/tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ sync() {

install() {
bold "tf install"
if [ "$(uname -ms)" = "Darwin arm64" ]; then
echo "- arm64 [skip]"
return
fi
venv
${python} -m pip install --quiet --upgrade --use-feature=2020-resolver wheel
${python} -m pip install --quiet --upgrade --use-feature=2020-resolver tf-nightly
Expand Down Expand Up @@ -73,6 +77,10 @@ schema() {

metadata() {
bold "tf metadata"
if [ "$(uname -ms)" = "Darwin arm64" ]; then
echo "- arm64 [skip]"
return
fi
venv
if [[ $(grep -U $'\x0D' ./source/tf-metadata.json) ]]; then crlf=1; else crlf=; fi
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
Expand Down

0 comments on commit 7625f7e

Please sign in to comment.