gdal 0.14.0

GDAL bindings for Rust
Documentation
name: CI

on:
  push:
    branches: [master, trying, staging]
  pull_request:
    branches: [master, trying, staging]
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

env:
  RUST_BACKTRACE: 1

jobs:
  gdal_35:
    name: "ci gdal-35"
    runs-on: ubuntu-latest
    container:
      image: osgeo/gdal:ubuntu-full-3.5.0

    strategy:
      matrix:
        features: ["", "--all-features"]

    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Install build deps
        shell: bash
        run: |
          apt-get update -y
          apt-get install build-essential curl pkg-config libclang-dev -y
          curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
          echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH

      - name: Setup building
        run: |
          export CC="clang-9"
          export CXX="clang++-9"

      - name: Install stable
        run: |
          rustup install --no-self-update --profile minimal stable
          rustup component add rustfmt clippy

      - name: Check with Rustfmt
        run: cargo fmt --all --check
      - name: Check with Clippy
        run: cargo clippy --all-targets ${{ matrix.features }} -- -D warnings
      - name: Build
        run: cargo build ${{ matrix.features }} --verbose
      - name: Run tests
        run: cargo test ${{ matrix.features }} --verbose

  gdal_34:
    name: "ci gdal-34"
    runs-on: ubuntu-latest
    container:
      image: osgeo/gdal:ubuntu-full-3.4.0

    strategy:
      matrix:
        features: ["", "--all-features"]

    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Install build deps
        shell: bash
        run: |
          apt-get update -y
          apt-get install build-essential curl pkg-config libclang-dev -y
          curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
          echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH

      - name: Setup building
        run: |
          export CC="clang-9"
          export CXX="clang++-9"

      - name: Install stable
        run: |
          rustup install --no-self-update --profile minimal stable
          rustup component add rustfmt clippy

      - name: Check with Rustfmt
        run: cargo fmt --all --check
      - name: Check with Clippy
        run: cargo clippy --all-targets ${{ matrix.features }} -- -D warnings
      - name: Build
        run: cargo build ${{ matrix.features }} --verbose
      - name: Run tests
        run: cargo test ${{ matrix.features }} --verbose

  gdal_33:
    name: "ci gdal-33"
    runs-on: ubuntu-latest
    container:
      image: osgeo/gdal:ubuntu-full-3.3.0

    strategy:
      matrix:
        features: ["", "--all-features"]

    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Install build deps
        shell: bash
        run: |
          apt-get update -y
          apt-get install build-essential curl pkg-config libclang-dev -y
          curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
          echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH

      - name: Setup building
        run: |
          export CC="clang-9"
          export CXX="clang++-9"

      - name: Install stable
        run: |
          rustup install --no-self-update --profile minimal stable
          rustup component add rustfmt clippy

      - name: Check with Rustfmt
        run: cargo fmt --all --check
      - name: Check with Clippy
        run: cargo clippy --all-targets ${{ matrix.features }} -- -D warnings
      - name: Build
        run: cargo build ${{ matrix.features }} --verbose
      - name: Run tests
        run: cargo test ${{ matrix.features }} --verbose

  gdal_32:
    name: "ci gdal-32"
    runs-on: ubuntu-latest
    container:
      image: osgeo/gdal:ubuntu-full-3.2.0

    strategy:
      matrix:
        features: ["", "--all-features"]

    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Install build deps
        shell: bash
        run: |
          apt-get update -y
          apt-get install build-essential curl pkg-config libclang-dev -y
          curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
          echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH

      - name: Setup building
        run: |
          export CC="clang-9"
          export CXX="clang++-9"

      - name: Install stable
        run: |
          rustup install --no-self-update --profile minimal stable
          rustup component add rustfmt clippy

      - name: Check with Rustfmt
        run: cargo fmt --all --check
      - name: Check with Clippy
        run: cargo clippy --all-targets ${{ matrix.features }} -- -D warnings
      - name: Build
        run: cargo build ${{ matrix.features }} --verbose
      - name: Run tests
        run: cargo test ${{ matrix.features }} --verbose

  ubuntu_lts:
    name: "ci ubuntu-lts"
    runs-on: "ubuntu-20.04"

    strategy:
      matrix:
        features: ["", "--all-features"]

    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Install build deps
        shell: bash
        run: |
          sudo apt-get update -y
          sudo apt-get install libgdal-dev gdal-bin build-essential curl pkg-config libclang-dev -y
          export C_INCLUDE_PATH=/usr/include/gdal:$C_INCLUDE_PATH
          export CPLUS_INCLUDE_PATH=/usr/include/gdal:$CPLUS_INCLUDE_PATH
          sudo ldconfig
          curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
          echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH

      - name: Setup building
        run: |
          export CC="clang-9"
          export CXX="clang++-9"

      - name: Install stable
        run: |
          rustup install --no-self-update --profile minimal stable
          rustup component add rustfmt clippy

      - name: Check with Rustfmt
        run: cargo fmt --all --check
      - name: Check with Clippy
        run: cargo clippy --all-targets ${{ matrix.features }} -- -D warnings
      - name: Build
        run: cargo build ${{ matrix.features }} --verbose
      - name: Run tests
        run: cargo test ${{ matrix.features }} --verbose