forked from crlf0710/tectonic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
104 lines (92 loc) · 4.04 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Appveyor configuration template for Rust using rustup for Rust installation
# https://github.com/starkat99/appveyor-rust
## Operating System (VM environment) ##
# Rust needs at least Visual Studio 2013 Appveyor OS for MSVC targets.
os: Visual Studio 2017
## Build Matrix ##
environment:
matrix:
### MSVC Targets ###
# Stable 64-bit MSVC
- target: x86_64-pc-windows-msvc
channel: stable
toolchain: stable-x86_64-pc-windows-msvc
target_env: msvc
# Stable 32-bit MSVC
# - channel: stable
# toolchain: stable-i686-pc-windows-msvc
# target: i686-pc-windows-msvc
# target_env: msvc
# mingw_subdir: mingw32
# mingw_target: i686-w64-mingw32
# mingw_package_prefix: mingw-w64-i686
### GNU Targets ###
# Stable 64-bit GNU
- target: x86_64-pc-windows-gnu
channel: stable
toolchain: stable-x86_64-pc-windows-msvc
target_env: gnu
mingw_subdir: mingw64
mingw_target: x86_64-w64-mingw32
mingw_package_prefix: mingw-w64-x86_64
# Stable 32-bit GNU
# - channel: stable
# toolchain: stable-i686-pc-windows-msvc
# target: i686-pc-windows-gnu
# target_env: gnu
# mingw_subdir: mingw32
# mingw_target: i686-w64-mingw32
# mingw_package_prefix: mingw-w64-i686
# Don't CI branches besides master. Pull requests still get CI'd -- but
# when a PR comes in on a branch in the same repo, this prevents it from
# being CI'd twice.
branches:
only:
- master
cache:
- '%USERPROFILE%\.cargo\bin'
- '%USERPROFILE%\.cargo\config'
- '%USERPROFILE%\.cargo\env'
- '%USERPROFILE%\.cargo\.crates.toml'
- target
## Install Script ##
# This is the most important part of the Appveyor configuration. This installs the version of Rust
# specified by the 'channel' and 'target' environment variables from the build matrix. This uses
# rustup to install Rust.
#
# For simple configurations, instead of using the build matrix, you can simply set the
# default-toolchain and default-host manually here.
install:
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- rustup-init -yv --default-toolchain %channel%-msvc --default-host %target%
- set PATH=%PATH%;%USERPROFILE%\.cargo\bin
- if "%target_env%" == "gnu" set PATH=C:\msys64\%mingw_subdir%\bin;C:\msys64\usr\bin;%PATH%
- rustup target add %target%
- rustup component add rust-src
- if "%target_env%" == "gnu" pacman -S --noconfirm "%mingw_package_prefix%-fontconfig" "%mingw_package_prefix%-freetype" "%mingw_package_prefix%-icu"
- if "%target_env%" == "msvc" git clone https://github.com/microsoft/vcpkg %USERPROFILE%\vcpkg
- if "%target_env%" == "msvc" call %USERPROFILE%\vcpkg\bootstrap-vcpkg.bat
- if "%target_env%" == "msvc" %USERPROFILE%\vcpkg\vcpkg install --triplet x64-windows-static fontconfig freetype harfbuzz[icu,graphite2]
- if "%target_env%" == "msvc" set VCPKG_ROOT=%USERPROFILE%\vcpkg
- if "%target_env%" == "msvc" set TECTONIC_DEP_BACKEND=vcpkg
- if "%target_env%" == "msvc" set RUSTFLAGS=-Ctarget-feature=+crt-static
- rustc -vV
- cargo -vV
## Build Script ##
# 'cargo test' takes care of building for us, so disable Appveyor's build stage. This prevents
# the "directory does not contain a project or solution file" error.
build: false
before_test:
- set RUST_BACKTRACE=1
# Building on msvc toolchain is seen as cross compilation.
- set PKG_CONFIG_ALLOW_CROSS=1
# Workaround rust#53454
- if "%target_env%" == "gnu" copy /y "C:\msys64\%mingw_subdir%\%mingw_target%\lib\crt2.o" %USERPROFILE%\.rustup\toolchains\%toolchain%\lib\rustlib\%target%\lib\crt2.o"
- if "%target_env%" == "gnu" copy /y "C:\msys64\%mingw_subdir%\%mingw_target%\lib\dllcrt2.o" %USERPROFILE%\.rustup\toolchains\%toolchain%\lib\rustlib\%target%\lib\dllcrt2.o"
# Dodge format file locking issue in the test suite
- set RUST_TEST_THREADS=1
# Uses 'cargo test' to run tests and build. Alternatively, the project may call compiled programs
# directly or perform other testing commands. Rust will automatically be placed in the PATH
# environment variable.
test_script:
- cargo test --target %target%