Skip to content

Commit

Permalink
ARROW-2436: [Rust] Add windows CI
Browse files Browse the repository at this point in the history
Author: Paddy Horan <paddyhoran@hotmail.com>
Author: Paddy <paddyhoran@hotmail.com>
Author: Antoine Pitrou <pitrou@free.fr>

Closes #1949 from paddyhoran/ARROW-2436 and squashes the following commits:

bad1f18 <Paddy Horan> Restoring order of %PATH%
82f68d8 <Paddy Horan> Trying to confirm source of error
7f8b050 <Paddy Horan> Wrapping MINICONDA in double quotes
2405086 <Antoine Pitrou> Try adding quotes when setting PATH
c26100f <Paddy Horan> Restoring quotes.
25d3747 <Paddy Horan> Testing variable change.
7a3ef5a <Paddy Horan> Testing branches of if statement.
3c94bdf <Paddy Horan> Updating scripts to assume root directory.
9e8574c <Paddy Horan> Moving Rust build to end.
c6723d3 <Paddy Horan> Cleaned up build and install scripts.
e976fa9 <Paddy Horan> Cleaned up appveyor.yml
0b5099f <Paddy> Removed `BUILD_SCRIPT` variable
e94ff0e <Paddy> Testing multi-line if block
68c183b <Paddy> Temporarily disabling other build jobs.
9ec5d57 <Paddy Horan> Added license
f00d517 <Paddy Horan> Disable CLCACHE for Rust builds
17adfad <Paddy> Move into rust folder before testing
24e839c <Paddy> Updated install section.
6233c96 <Paddy> Updated windows ci to include Rust
  • Loading branch information
paddyhoran authored and pitrou committed May 1, 2018
1 parent 5761370 commit a7f5bb0
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 9 deletions.
22 changes: 13 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
34 changes: 34 additions & 0 deletions ci/appveyor-build.bat
Original file line number Diff line number Diff line change
@@ -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
)
)
29 changes: 29 additions & 0 deletions ci/appveyor-install.bat
Original file line number Diff line number Diff line change
@@ -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
)
File renamed without changes.

0 comments on commit a7f5bb0

Please sign in to comment.