Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows CI job #218

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,37 @@ jobs:
with:
command: test
args: ${{ matrix.features }} --verbose

windows:
name: "ci windows-2019"
runs-on: windows-2019

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

steps:
- uses: actions/checkout@v2
- name: Install GDAL
shell: bash
run: |
curl -S -O https://download.gisinternals.com/sdk/downloads/release-1928-x64-dev.zip
7z x -aoa release-1928-x64-dev.zip
- name: Build and test
shell: bash
run: |
rustc -Vv
cargo -V
vswhere

export GDAL_HOME=$PWD/release-1928-x64
export PROJ_LIB=$GDAL_HOME/bin/proj7/share
export PATH=$GDAL_HOME/bin:$GDAL_HOME/bin/gdal/apps:$PATH
# Workaround for https://github.com/actions/virtual-environments/issues/3316
export PATH=/c/msys64/mingw64/bin:$PATH

gdalinfo --version
export GDAL_VERSION=$(gdalinfo --version | sed 's/GDAL \(.*\), .*/\1/')

cargo build ${{ matrix.features }} -j 1 --tests --verbose
cargo test ${{ matrix.features }} --verbose
1 change: 1 addition & 0 deletions src/raster/mdarray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ impl Attribute {
}

#[cfg(test)]
#[cfg(not(target_os = "windows"))] // https://github.com/georust/gdal/issues/219
mod tests {
use super::*;

Expand Down
1 change: 1 addition & 0 deletions src/raster/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ fn test_create_with_band_type() {
}

#[test]
#[cfg(not(target_os = "windows"))] // https://github.com/georust/gdal/issues/219
fn test_create_with_band_type_with_options() {
let driver = Driver::get_by_name("GTiff").unwrap();
let options = [
Expand Down
1 change: 1 addition & 0 deletions src/vector/vector_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ mod tests {
}

#[test]
#[cfg(not(target_os = "windows"))] // https://github.com/georust/gdal/issues/219
fn test_write_features() {
use std::fs;

Expand Down