Skip to content

Commit

Permalink
Add GDAL 3.7 and refactor CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Jun 1, 2023
1 parent 35ef82c commit f1cb687
Showing 1 changed file with 17 additions and 164 deletions.
181 changes: 17 additions & 164 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,55 +12,22 @@ env:
RUST_BACKTRACE: 1

jobs:
gdal_36:
name: "ci gdal-36"
runs-on: ubuntu-latest
container:
image: ghcr.io/osgeo/gdal:ubuntu-full-3.6.0

gdal:
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
version:
- 3.7
- 3.6
- 3.5
- 3.4
- 3.3
- 3.2

- 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_35:
name: "ci gdal-35"
runs-on: ubuntu-latest
container:
image: ghcr.io/osgeo/gdal:ubuntu-full-3.5.0
image: ghcr.io/osgeo/gdal:ubuntu-full-${{ matrix.version }}.0

strategy:
matrix:
features: ["", "--all-features"]
name: "ci gdal-${{ matrix.version }}"

steps:
- name: Checkout code
Expand All @@ -86,131 +53,17 @@ jobs:
- name: Check with Rustfmt
run: cargo fmt --all --check
- name: Check with Clippy
run: cargo clippy --all-targets ${{ matrix.features }} -- -D warnings
run: cargo clippy --all-targets -- -D warnings
- name: Check with Clippy (--all-features)
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: cargo build ${{ matrix.features }} --verbose
run: cargo build --verbose
- name: Run tests
run: cargo test ${{ matrix.features }} --verbose

gdal_34:
name: "ci gdal-34"
runs-on: ubuntu-latest
container:
image: ghcr.io/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
run: cargo test --verbose
- name: Build
run: cargo build ${{ matrix.features }} --verbose
run: cargo build --all-features --verbose
- name: Run tests
run: cargo test ${{ matrix.features }} --verbose

gdal_33:
name: "ci gdal-33"
runs-on: ubuntu-latest
container:
image: ghcr.io/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: ghcr.io/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
run: cargo test --all-features --verbose

ubuntu_lts:
name: "ci ubuntu-lts"
Expand Down

0 comments on commit f1cb687

Please sign in to comment.