Skip to content

Apache DataFusion SQL Query Engine

ARROW-2436: [Rust] Add windows CI

Paddy Horana7f5bb0d5c10
diff --git a/appveyor.yml b/appveyor.yml
index 42c0ae34c2..ad8b4de11d 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -19,17 +19,22 @@
os: Visual Studio 2015
only_commits:
- # Skip commits not related to Python or C++
+ # Skip commits not related to Python, C++ or Rust
files:
- appveyor.yml
- ci/
- cpp/
- python/
+ - rust/
cache:
- C:\Users\Appveyor\clcache
+ - C:\Users\Appveyor\.cargo\registry
environment:
+ global:
+ USE_CLCACHE: true
+
matrix:
# NOTE: clcache seems to work best with Ninja and worst with msbuild
# (as generated by cmake)
@@ -64,28 +69,27 @@ environment:
PYTHON: "3.6"
ARCH: "64"
CONFIGURATION: "Release"
+ BUILD_SCRIPT: "CMake_Build_Script"
- JOB: "Build"
GENERATOR: NMake Makefiles
PYTHON: "3.6"
ARCH: "64"
CONFIGURATION: "Release"
+ - JOB: "Rust_Stable"
+ RUST_VERSION: stable
+ TARGET: x86_64-pc-windows-msvc
+ USE_CLCACHE: false
MSVC_DEFAULT_OPTIONS: ON
BOOST_ROOT: C:\Libraries\boost_1_63_0
BOOST_LIBRARYDIR: C:\Libraries\boost_1_63_0\lib64-msvc-14.0
APPVEYOR_SAVE_CACHE_ON_ERROR: true
- USE_CLCACHE: true
install:
- - set MINICONDA=C:\Miniconda36-x64
- - set PATH=%MINICONDA%;%MINICONDA%/Scripts;%MINICONDA%/Library/bin;%PATH%
- - call ci\appveyor-setup.bat
+ - call ci\appveyor-install.bat
build_script:
- - git config core.symlinks true
- - git reset --hard
- - if "%JOB%"=="Cmake_Script_Tests" call ci\test-cmake-build-script.bat
- - if NOT "%JOB%"=="Cmake_Script_Tests" call ci\msvc-build.bat
+ - call ci\appveyor-build.bat
# Disable test discovery
test: off
diff --git a/ci/appveyor-build.bat b/ci/appveyor-build.bat
new file mode 100644
index 0000000000..4d6f04791c
--- /dev/null
+++ b/ci/appveyor-build.bat
@@ -0,0 +1,34 @@
+@rem Licensed to the Apache Software Foundation (ASF) under one
+@rem or more contributor license agreements. See the NOTICE file
+@rem distributed with this work for additional information
+@rem regarding copyright ownership. The ASF licenses this file
+@rem to you under the Apache License, Version 2.0 (the
+@rem "License"); you may not use this file except in compliance
+@rem with the License. You may obtain a copy of the License at
+@rem
+@rem http://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing,
+@rem software distributed under the License is distributed on an
+@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@rem KIND, either express or implied. See the License for the
+@rem specific language governing permissions and limitations
+@rem under the License.
+
+@echo on
+
+if "%JOB%" == "Rust_Stable" (
+ cd rust
+ cargo build --target %TARGET% || exit /B
+ cargo build --target %TARGET% --release || exit /B
+ cargo test --target %TARGET% || exit /B
+ cargo test --target %TARGET% --release || exit /B
+) else (
+ git config core.symlinks true
+ git reset --hard
+ if "%JOB%"=="Cmake_Script_Tests" (
+ call ci\test-cmake-build-script.bat
+ ) else (
+ call ci\cpp-python-msvc-build.bat
+ )
+)
diff --git a/ci/appveyor-install.bat b/ci/appveyor-install.bat
new file mode 100644
index 0000000000..6bfc62540d
--- /dev/null
+++ b/ci/appveyor-install.bat
@@ -0,0 +1,29 @@
+@rem Licensed to the Apache Software Foundation (ASF) under one
+@rem or more contributor license agreements. See the NOTICE file
+@rem distributed with this work for additional information
+@rem regarding copyright ownership. The ASF licenses this file
+@rem to you under the Apache License, Version 2.0 (the
+@rem "License"); you may not use this file except in compliance
+@rem with the License. You may obtain a copy of the License at
+@rem
+@rem http://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing,
+@rem software distributed under the License is distributed on an
+@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@rem KIND, either express or implied. See the License for the
+@rem specific language governing permissions and limitations
+@rem under the License.
+
+@echo on
+
+if "%JOB%" == "Rust_Stable" (
+ curl -sSf -o rustup-init.exe https://win.rustup.rs/
+ rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%
+ set "PATH=%PATH%;C:\Users\Appveyor\.cargo\bin"
+ rustc -Vv
+ cargo -V
+) else (
+ set "PATH=C:\Miniconda36-x64;C:\Miniconda36-x64\Scripts;C:\Miniconda36-x64\Library\bin;%PATH%"
+ call ci\appveyor-setup.bat
+)
diff --git a/ci/msvc-build.bat b/ci/cpp-python-msvc-build.bat
similarity index 100%
rename from ci/msvc-build.bat
rename to ci/cpp-python-msvc-build.bat