Skip to content
Closed
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
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/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point we will want to selectively disable some matrix builds based on the modified files, as we already do for Travis-CI. The ci/travis_detect_changes.py script does that, it can be extended for AppVeyor. The following logic (from CPython) is supposed to be able to detect changed files on AppVeyor PRs:
https://github.com/python/cpython/blob/master/.github/appveyor.yml#L12-L26

Builds already pile up quickly due to concurrency limitations on AppVeyor, ideally we should not make things worse.

Copy link
Contributor Author

@paddyhoran paddyhoran Apr 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, it's pretty annoying that all cpp builds would re-trigger on changes to the PR. I'll create a JIRA for it. It's probably something I could take a look at.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!


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.
4 changes: 2 additions & 2 deletions cpp/apidoc/Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,11 @@ cmake -G "Visual Studio 14 2015 Win64" ^
cmake --build . --config Debug
```

To get the latest build instructions, you can reference [msvc-build.bat][5], which is used by automated Appveyor builds.
To get the latest build instructions, you can reference [cpp-python-msvc-build.bat][5], which is used by automated Appveyor builds.


[1]: https://conda.io/miniconda.html
[2]: https://conda-forge.github.io/
[3]: http://cmder.net/
[4]: https://cmake.org/
[5]: https://github.com/apache/arrow/blob/master/ci/msvc-build.bat
[5]: https://github.com/apache/arrow/blob/master/ci/cpp-python-msvc-build.bat