Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Add initial AppVeyor configuration. #68

Merged
merged 7 commits into from
Feb 28, 2018
Merged
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
20 changes: 20 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Without this "Update next build number or change version format."
version: "{build}"

environment:
global:
BAZEL_ROOT: c:\bazel_root\
INSTALL_CACHE: c:\install_cache\
APPVEYOR_SAVE_CACHE_ON_ERROR: true
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017

install:
- set PATH=%PATH%;%INSTALL_CACHE%
- cmd: tools\appveyor\install.bat

build_script:
- cmd: tools\appveyor\build.bat

test_script:
- cmd: tools\appveyor\test.bat
22 changes: 22 additions & 0 deletions tools/appveyor/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
REM Copyright 2018, OpenCensus Authors
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM 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, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.

REM TODO: Get everything to build on Windows:
REM bazel build //...

REM TODO: Remove --output_user_root after https://github.com/bazelbuild/bazel/issues/4149 is fixed.
bazel --output_user_root=c:/t/ build //opencensus/trace

IF %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
EXIT /b 0
27 changes: 27 additions & 0 deletions tools/appveyor/install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
REM Copyright 2018, OpenCensus Authors
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM 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, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.

REM This script is based on:
REM https://github.com/google/xrtl/blob/master/tools/ci/appveyor/install.bat

IF NOT EXIST %INSTALL_CACHE% (MKDIR %INSTALL_CACHE%)

REM Download bazel into install cache, which is on the path.
IF NOT EXIST %INSTALL_CACHE%\bazel.exe (
appveyor DownloadFile https://github.com/bazelbuild/bazel/releases/download/0.10.1/bazel-0.10.1-without-jdk-windows-x86_64.exe -FileName %INSTALL_CACHE%\bazel.exe
)

REM Temporary directory for bazel.
REM TODO: Remove this after https://github.com/bazelbuild/bazel/issues/4149 is fixed.
IF NOT EXIST C:\T (MKDIR C:\T)
23 changes: 23 additions & 0 deletions tools/appveyor/test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
REM Copyright 2018, OpenCensus Authors
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM 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, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.

REM TODO: Make all tests pass on Windows:
REM bazel test //...

REM TODO: Remove --output_user_root after https://github.com/bazelbuild/bazel/issues/4149 is fixed.
REM bazel --output_user_root=c:/t/ test //opencensus/trace:all
echo TODO: Make all tests pass on Windows.

IF %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
EXIT /b 0