-
Notifications
You must be signed in to change notification settings - Fork 1
/
.appveyor.yml
executable file
·74 lines (60 loc) · 2.2 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
# Thanks to http://blogs.perl.org/users/mauke/2017/10/automated-testing-on-windows-with-appveyor.html
# by mauke
# === Build matrix ===
# Win is default; Ubuntu is override. See
# https://www.appveyor.com/blog/2018/04/25/specialized-build-matrix-configuration-in-appveyor/
image:
- Visual Studio 2013
- Ubuntu1604
# === Basics ===
# no install; it's platform-specific
build_script:
- cpanm --installdeps --notest --verbose .
- perl Build.PL
- cmd: perl Build
- sh: ./Build
test_script:
# - echo Use just this line to succeed and save the cache.
- cmd: perl Build test
- sh: ./Build test
# * Thanks to https://stackoverflow.com/a/21041546/2877364
# by https://stackoverflow.com/users/2964427/09stephenb and
# https://stackoverflow.com/users/3814740/alexander-gelbukh for the tip.
# === Platform-specific config ===
for:
# Platform-specific configuration for Windows
-
matrix:
only:
- image: Visual Studio 2013
skip_commits:
message: /\[ci-linux\]/
cache:
- C:\strawberry -> .appveyor.yml
# This tree also includes the installed CPAN modules.
install:
- if not exist C:\strawberry\ choco install strawberryperl -y
# Need the trailing \ on c:\strawberry\ in order to test the existence
# of the directory.*
- set PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
- cd %APPVEYOR_BUILD_FOLDER%
# Platform-specific configuration for Ubuntu
-
matrix:
only:
- image: Ubuntu1604
# Don't run Ubuntu if the commit message includes [ci-win]
skip_commits:
message: /\[ci-win\]/
cache:
- /home/appveyor/perl5 -> .appveyor.yml
install:
# First, manually do what local::lib does: set up Perl to
# install and use modules in ~/perl5.
- export PERL_MB_OPT="$(printf -- '--install_base %s' ~/perl5)"
- export PERL_MM_OPT="$(printf 'INSTALL_BASE=%s' ~/perl5)"
- export PERL5LIB=~/perl5/lib/perl5
- export PATH=~/perl5/bin:$PATH
- export PERL_LOCAL_LIB_ROOT=~/perl5:$PERL_LOCAL_LIB_ROOT
# Then, install cpanminus locally so it will be cached.
- which cpanm || (curl -L https://cpanmin.us | perl - App::cpanminus)