chore(ci): bump actions/checkout from 6 to 7 #533
This file contains hidden or 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
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/build-and-test.yaml' | |
| - 'src/geoarrow/**' | |
| - 'CMakeLists.txt' | |
| name: Build and Test | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| name: ${{ matrix.config.label }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {label: default-build, cmake_args: "-DCMAKE_BUILD_TYPE=Debug -DGEOARROW_CODE_COVERAGE=ON"} | |
| - {label: bundled-build, cmake_args: "-DGEOARROW_BUNDLE=ON -DGEOARROW_USE_FAST_FLOAT=OFF -DGEOARROW_USE_RYU=OFF"} | |
| - {label: namespaced-build, cmake_args: "-DGEOARROW_NAMESPACE=SomeNamespace"} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt install -y -V ca-certificates lsb-release wget cmake valgrind | |
| wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb | |
| sudo apt-get install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb | |
| sudo apt-get update | |
| sudo apt-get install -y -V libarrow-dev | |
| rm apache-arrow-apt-*.deb | |
| - name: Build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DGEOARROW_BUILD_TESTS=ON ${{ matrix.config.cmake_args }} | |
| cmake --build . | |
| - name: Test | |
| run: | | |
| cd build | |
| GEOARROW_TESTING_DIR=$GITHUB_WORKSPACE/testing ctest -T test --output-on-failure . | |
| - name: Check for non-namespaced symbols in namespaced build | |
| if: matrix.config.label == 'namespaced-build' | |
| run: | | |
| # Dump all symbols | |
| nm --extern-only build/libgeoarrow.a | |
| # Check for non-namespaced ones | |
| ARROW_SYMBOLS=`nm --extern-only build/libgeoarrow.a | grep "T GeoArrow" || true` | |
| if [ -z "$ARROW_SYMBOLS" ]; then | |
| exit 0 | |
| fi | |
| echo "Found the following non-namespaced extern symbols:" | |
| echo $ARROW_SYMBOLS | |
| exit 1 | |
| - name: Install lcov | |
| if: matrix.config.label == 'default-build' | |
| run: | | |
| sudo apt-get install lcov | |
| - name: Calculate coverage | |
| if: matrix.config.label == 'default-build' | |
| run: | | |
| cd build | |
| lcov --capture --directory . \ | |
| --exclude "*_test.cc" \ | |
| --exclude "/usr/*" \ | |
| --exclude "*/gtest/*" \ | |
| --exclude "*/ryu/*" \ | |
| --exclude "*/fast_float.h" \ | |
| --exclude "*/nanoarrow.*" \ | |
| --output-file coverage.info | |
| lcov --list coverage.info | |
| - name: Upload coverage | |
| if: success() && matrix.config.label == 'default-build' | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| files: build/coverage.info | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Test with memcheck | |
| if: matrix.config.label == 'default-build' | |
| run: | | |
| cd build | |
| ctest -T memcheck . | |
| - name: Upload memcheck results | |
| if: failure() && matrix.config.label == 'default-build' | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: geoarrow-memcheck | |
| path: build/Testing/Temporary/MemoryChecker.*.log |