| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| name: Test C++ Cookbook |
| |
| on: |
| pull_request: |
| branches: |
| - main |
| paths: |
| - "cpp/**" |
| - ".github/workflows/test_cpp_cookbook.yml" |
| |
| concurrency: |
| group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }} |
| cancel-in-progress: true |
| |
| jobs: |
| test_cpp_stable: |
| name: "Test C++ Cookbook on Arrow stable" |
| runs-on: ubuntu-latest |
| defaults: |
| run: |
| shell: bash -l {0} |
| steps: |
| - uses: actions/checkout@v3 |
| - name: Cache conda |
| uses: actions/cache@v2 |
| env: |
| # Increase this value to reset cache if cpp/conda-linux-64.lock has not changed |
| CACHE_NUMBER: 0 |
| with: |
| path: ~/conda_pkgs_dir |
| key: |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('cpp/conda-linux-64.lock') }} |
| - name: Setup environment |
| uses: conda-incubator/setup-miniconda@v2 |
| with: |
| auto-update-conda: true |
| activate-environment: cookbook-cpp |
| environment-file: cpp/conda-linux-64.lock |
| auto-activate-base: false |
| - name: Test |
| run: |
| echo ${CONDA_PREFIX} |
| - name: Build cookbook |
| run: |
| make cpp |
| - name: Upload cpp book |
| uses: actions/upload-artifact@v3 |
| with: |
| name: cpp_book |
| path: build/cpp |