diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7d452e4e..bea6cd80c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,10 +9,215 @@ on: workflow_dispatch: + jobs: + 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@v2 + - name: Install build deps + run: | + apt-get update -y + apt-get install build-essential pkg-config libclang-dev -y + - name: Setup building + run: | + export CC="clang-9" + export CXX="clang++-9" + + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + + + - name: Check with Rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Check with Clippy + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-targets ${{ matrix.features }} -- -D warnings + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: ${{ matrix.features }} --verbose + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: ${{ 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@v2 + - name: Install build deps + run: | + apt-get update -y + apt-get install build-essential pkg-config libclang-dev -y + - name: Setup building + run: | + export CC="clang-9" + export CXX="clang++-9" + + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + + + - name: Check with Rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Check with Clippy + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-targets ${{ matrix.features }} -- -D warnings + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: ${{ matrix.features }} --verbose + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: ${{ 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@v2 + - name: Install build deps + run: | + apt-get update -y + apt-get install build-essential pkg-config libclang-dev -y + - name: Setup building + run: | + export CC="clang-9" + export CXX="clang++-9" + + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + + + - name: Check with Rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Check with Clippy + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-targets ${{ matrix.features }} -- -D warnings + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: ${{ matrix.features }} --verbose + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: ${{ matrix.features }} --verbose + + gdal_31: + name: "ci gdal-31" + runs-on: ubuntu-latest + container: + image: osgeo/gdal:ubuntu-full-3.1.0 + + strategy: + matrix: + features: ["", "--all-features"] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Install build deps + run: | + apt-get update -y + apt-get install build-essential pkg-config libclang-dev -y + - name: Setup building + run: | + export CC="clang-9" + export CXX="clang++-9" + + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + components: rustfmt, clippy + + + - name: Check with Rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Check with Clippy + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-targets ${{ matrix.features }} -- -D warnings + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: ${{ matrix.features }} --verbose + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: ${{ matrix.features }} --verbose - ubuntu_20_04: - name: "ci ubuntu-20.04" + gdal_30: + name: "ci gdal-30" runs-on: "ubuntu-20.04" strategy: diff --git a/src/spatial_ref/tests.rs b/src/spatial_ref/tests.rs index 0079920c1..03e723731 100644 --- a/src/spatial_ref/tests.rs +++ b/src/spatial_ref/tests.rs @@ -185,21 +185,30 @@ fn failing_transformation() { #[test] fn auto_identify() { + // retreived from https://epsg.io/32632, but deleted the `AUTHORITY["EPSG","32632"]` let mut spatial_ref = SpatialRef::from_wkt( r#" - PROJCS["WGS_1984_UTM_Zone_32N", - GEOGCS["GCS_WGS_1984", - DATUM["D_WGS_1984", - SPHEROID["WGS_1984",6378137,298.257223563]], - PRIMEM["Greenwich",0], - UNIT["Degree",0.017453292519943295]], + PROJCS["WGS 84 / UTM zone 32N", + GEOGCS["WGS 84", + DATUM["WGS_1984", + SPHEROID["WGS 84",6378137,298.257223563, + AUTHORITY["EPSG","7030"]], + AUTHORITY["EPSG","6326"]], + PRIMEM["Greenwich",0, + AUTHORITY["EPSG","8901"]], + UNIT["degree",0.0174532925199433, + AUTHORITY["EPSG","9122"]], + AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",9], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], - UNIT["Meter",1]] + UNIT["metre",1, + AUTHORITY["EPSG","9001"]], + AXIS["Easting",EAST], + AXIS["Northing",NORTH]] "#, ) .unwrap();