summaryrefslogtreecommitdiffstats
path: root/appveyor.yml
blob: b039c19bdcaebff043df12c2dfef7db51f829d4d (plain)
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
# Based on the "trust" template v0.1.1
# https://github.com/japaric/trust/tree/v0.1.1

environment:
  global:
    CRATE_NAME: alacritty
    RUST_BACKTRACE: 1
    APPVEYOR_SAVE_CACHE_ON_ERROR: true

  matrix:
    - platform: x86_64
      TARGET: x86_64-pc-windows-msvc
      RUST_VERSION: stable
      CLIPPY: false

    - platform: x86_64
      TARGET: x86_64-pc-windows-msvc
      RUST_VERSION: nightly
      CLIPPY: true

matrix:
  allow_failures:
    - CLIPPY: true

shallow_clone: true

install:
  - 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

build_script:
  # Only build once per architecture
  - if [%CLIPPY%]==[false] (
      cargo +%RUST_TOOLCHAIN% build --release
    )

before_test:
  - If [%CLIPPY%]==[true] (
      rustup component add clippy-preview
    )

test_script:
  - if [%CLIPPY%]==[true] (
      cargo +%RUST_TOOLCHAIN% clippy
    )
    else (
      cargo +%RUST_TOOLCHAIN% test &
      copy target\debug\winpty-agent.exe target\debug\deps &
      cargo +%RUST_TOOLCHAIN% test -p winpty
    )

cache:
  # Ideally we'd also cache the toolchain but it's too large to fit in the free cache.
  # Building alacritty takes significantly longer than downloading the toolchain.
  - target

artifacts:
  - path: target\release\alacritty.exe
    name: Alacritty
  - path: target\release\winpty-agent.exe
    name: Winpty agent