Skip to content

Commit

Permalink
condense & complete libarrow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Dec 10, 2022
1 parent 1223b5a commit 80eb635
Showing 1 changed file with 29 additions and 44 deletions.
73 changes: 29 additions & 44 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,55 +133,40 @@ outputs:

test:
commands:
{% set headers = [
"arrow/api.h", "arrow/flight/types.h", "arrow/flight/sql/api.h",
"gandiva/engine.h", "parquet/api/reader.h"
] %}
{% set headers = headers + ["plasma/client.h"] %} # [unix]
{% for each_header in headers %}
# headers
- test -f $PREFIX/include/arrow/api.h # [unix]
- test -f $PREFIX/include/arrow/flight/types.h # [unix]
- test -f $PREFIX/include/plasma/client.h # [unix]
- test -f $PREFIX/include/gandiva/engine.h # [unix]
- test -f $PREFIX/include/parquet/api/reader.h # [unix]
- if not exist %LIBRARY_INC%\\arrow\\api.h exit 1 # [win]
- if not exist %LIBRARY_INC%\\gandiva\\engine.h exit 1 # [win]
- if not exist %LIBRARY_INC%\\parquet\\api\\reader.h exit 1 # [win]
- test -f $PREFIX/include/{{ each_header }} || (echo "{{ each_header }} not found" && exit 1) # [unix]
- if not exist %LIBRARY_INC%\{{ "\\".join(each_header.split("/")) }} exit 1 # [win]
{% endfor %}

{% set libs = (cuda_compiler_version != "None") * ["arrow_cuda"] + [
"arrow", "arrow_dataset", "arrow_flight", "arrow_flight_sql",
"arrow_python", "arrow_substrait", "gandiva", "parquet"
] %}
{% set libs = libs + ["plasma"] %} # [unix]
{% for each_lib in libs %}
# shared
- test -f $PREFIX/lib/libarrow.so # [linux]
- test -f $PREFIX/lib/libarrow_dataset.so # [linux]
- test -f $PREFIX/lib/libarrow_flight.so # [linux]
- test -f $PREFIX/lib/libarrow_python.so # [linux]
- test -f $PREFIX/lib/libparquet.so # [linux]
- test -f $PREFIX/lib/libgandiva.so # [linux]
- test -f $PREFIX/lib/libplasma.so # [linux]
- test -f $PREFIX/lib/libarrow_cuda${SHLIB_EXT} # [(cuda_compiler_version != "None") and unix]
- test ! -f $PREFIX/lib/libarrow_cuda${SHLIB_EXT} # [(cuda_compiler_version == "None") and unix]
- if not exist %PREFIX%\\Library\\bin\\arrow_cuda.dll exit 1 # [(cuda_compiler_version != "None") and win]
- if exist %PREFIX%\\Library\\bin\\arrow_cuda.dll exit 1 # [(cuda_compiler_version == "None") and win]
- test -f $PREFIX/lib/libarrow.dylib # [osx]
- test -f $PREFIX/lib/libarrow_dataset.dylib # [osx]
- test -f $PREFIX/lib/libarrow_python.dylib # [osx]
- test -f $PREFIX/lib/libgandiva.dylib # [osx]
- test -f $PREFIX/lib/libparquet.dylib # [osx]
- test -f $PREFIX/lib/libplasma.dylib # [osx]
- if not exist %PREFIX%\\Library\\bin\\arrow.dll exit 1 # [win]
- if not exist %PREFIX%\\Library\\bin\\arrow_dataset.dll exit 1 # [win]
- if not exist %PREFIX%\\Library\\bin\\arrow_flight.dll exit 1 # [win]
- if not exist %PREFIX%\\Library\\bin\\arrow_python.dll exit 1 # [win]
- if not exist %PREFIX%\\Library\\bin\\parquet.dll exit 1 # [win]
- if not exist %PREFIX%\\Library\\bin\\gandiva.dll exit 1 # [win]
- test -f $PREFIX/lib/lib{{ each_lib }}.so # [linux]
- test -f $PREFIX/lib/lib{{ each_lib }}.dylib # [osx]
- if not exist %LIBRARY_BIN%\{{ each_lib }}.dll exit 1 # [win]
- if not exist %LIBRARY_LIB%\{{ each_lib }}.lib exit 1 # [win]

# absence of static libraries
- test ! -f $PREFIX/lib/libarrow.a # [unix]
- test ! -f $PREFIX/lib/libarrow_dataset.a # [unix]
- test ! -f $PREFIX/lib/libarrow_flight.a # [unix]
- test ! -f $PREFIX/lib/libarrow_python.a # [unix]
- test ! -f $PREFIX/lib/libplasma.a # [unix]
- test ! -f $PREFIX/lib/libparquet.a # [unix]
- test ! -f $PREFIX/lib/libgandiva.a # [unix]
- if exist %PREFIX%\\Library\\lib\\arrow_static.lib exit 1 # [win]
- if exist %PREFIX%\\Library\\lib\\arrow_dataset_static.lib exit 1 # [win]
- if exist %PREFIX%\\Library\\lib\\arrow_flight_static.lib exit 1 # [win]
- if exist %PREFIX%\\Library\\lib\\arrow_python_static.lib exit 1 # [win]
- if exist %PREFIX%\\Library\\lib\\parquet_static.lib exit 1 # [win]
- if exist %PREFIX%\\Library\\lib\\gandiva_static.lib exit 1 # [win]
- test ! -f $PREFIX/lib/lib{{ each_lib }}.a # [unix]
- if exist %LIBRARY_LIB%\{{ each_lib }}_static.lib exit 1 # [win]
{% endfor %}

# absence of arrow_cuda for CPU builds
- test ! -f $PREFIX/lib/libarrow_cuda.so # [(cuda_compiler_version == "None") and linux]
- test ! -f $PREFIX/lib/libarrow_cuda.a # [(cuda_compiler_version == "None") and linux]
- if exist %LIBRARY_BIN%\arrow_cuda.dll exit 1 # [(cuda_compiler_version == "None") and win]
- if exist %LIBRARY_LIB%\arrow_cuda.lib exit 1 # [(cuda_compiler_version == "None") and win]
- if exist %LIBRARY_LIB%\arrow_cuda_static.lib exit 1 # [(cuda_compiler_version == "None") and win]

- name: pyarrow
script: build-pyarrow.sh # [not win]
Expand Down

0 comments on commit 80eb635

Please sign in to comment.