DecimalArray #2097
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: OSX | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -e -l {0} | |
jobs: | |
build: | |
runs-on: macos-${{ matrix.os }} | |
name: ${{ matrix.os }} / ${{ matrix.config.name }} / ${{ matrix.compiler }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- 13 | |
- 14 | |
- 15 | |
config: | |
- { name: Debug } | |
- { name: Release } | |
compiler: | |
- clang | |
- apple-clang | |
exclude: | |
- os: 13 | |
compiler: apple-clang | |
- os: 14 | |
compiler: apple-clang | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Checkout nanoarrow | |
uses: actions/checkout@v4 | |
with: | |
repository: apache/arrow-nanoarrow | |
path: dependencies/tests/nanoarrow | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ matrix.os }}_${{ matrix.config.name }}_${{ matrix.compiler }}_ccache | |
- name: Add specification of clang++ in the conda environment specification | |
if: matrix.compiler == 'clang' | |
run: | | |
echo " - clangxx==18.1.8" >> environment-dev.yml | |
- name: Set conda environment | |
uses: mamba-org/setup-micromamba@main | |
with: | |
environment-name: myenv | |
environment-file: environment-dev.yml | |
init-shell: bash | |
cache-downloads: true | |
- name: Use clang++ from conda-forge | |
if: matrix.compiler == 'clang' | |
run: | | |
echo "CXX=$CONDA_PREFIX/bin/clang++" >> $GITHUB_ENV | |
echo "CMAKE_CXX_COMPILER=$CONDA_PREFIX/bin/clang++" >> $GITHUB_ENV | |
- name: Use Apple Clang (i.e. clang++ from Xcode) | |
if: matrix.compiler == 'apple-clang' | |
run: | | |
echo "CXX=/usr/bin/clang++" >> $GITHUB_ENV | |
echo "CMAKE_CXX_COMPILER=/usr/bin/clang++" >> $GITHUB_ENV | |
- name: Configure nanoarrow | |
working-directory: dependencies/tests/nanoarrow | |
run: cmake -Bbuild -DCMAKE_BUILD_TYPE:STRING=${{matrix.config.name}} -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX | |
- name: Build nanoarrow | |
working-directory: dependencies/tests/nanoarrow/build | |
run: cmake --build . --config ${{matrix.config.name}} --target install | |
- name: Configure using CMake | |
run: | | |
cmake -Bbuild \ | |
-DCMAKE_BUILD_TYPE:STRING=${{matrix.config.name}} \ | |
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ | |
-DBUILD_TESTS=ON \ | |
-DBUILD_EXAMPLES=ON \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-Dnanoarrow_DIR=dependencies/tests/nanoarrow/build | |
- name: Build | |
working-directory: build | |
run: cmake --build . --config ${{matrix.config.name}} --target sparrow --parallel 8 | |
- name: Install | |
working-directory: build | |
run: cmake --install . --config ${{matrix.config.name}} | |
- name: Build tests | |
working-directory: build | |
run: cmake --build . --config ${{matrix.config.name}} --target test_sparrow_lib --parallel 8 | |
- name: Run tests | |
working-directory: build | |
run: cmake --build . --config ${{matrix.config.name}} --target run_tests_with_junit_report | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: test_sparrow_lib_report_OSX_${{ matrix.os }}_${{ matrix.config.name }}_${{ matrix.compiler }} | |
path: '**/test_sparrow_lib_report.xml' | |
- name: Run all examples | |
working-directory: build | |
run: cmake --build . --config ${{matrix.config.name}} --target run_examples | |