-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
126 lines (114 loc) · 4.16 KB
/
azure-pipelines.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
strategy:
matrix:
windows-perl530:
PERL_VERSION: '5.30.2.1'
IMAGE: 'windows-latest'
linux-perl530:
PERL_VERSION: '5.30.2'
IMAGE: 'ubuntu-latest'
linux-perl528:
PERL_VERSION: '5.28.2'
IMAGE: 'ubuntu-latest'
linux-perl526:
PERL_VERSION: '5.26.3'
IMAGE: 'ubuntu-latest'
linux-perl524:
PERL_VERSION: '5.24.4'
IMAGE: 'ubuntu-latest'
linux-perl522:
PERL_VERSION: '5.22.4'
IMAGE: 'ubuntu-latest'
macos-perl530:
PERL_VERSION: '5.30.2'
IMAGE: 'macos-latest'
macos-perl528:
PERL_VERSION: '5.28.2'
IMAGE: 'macos-latest'
macos-perl526:
PERL_VERSION: '5.26.3'
IMAGE: 'macos-latest'
macos-perl524:
PERL_VERSION: '5.24.4'
IMAGE: 'macos-latest'
macos-perl522:
PERL_VERSION: '5.22.4'
IMAGE: 'macos-latest'
pool:
vmImage: $(IMAGE)
steps:
- script: |
sudo apt-get install build-essential curl file git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
brew install libarchive
displayName: 'Install dependencies (Ubuntu)'
condition: startsWith(variables['IMAGE'], 'ubuntu')
- script: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install libarchive
displayName: 'Install macOS dependencies'
condition: startsWith(variables['IMAGE'], 'macos')
- script: |
mkdir \deps
cd \deps
unzip $(Build.SourcesDirectory)\libarchive-v3.4.3-win64.zip
cd $(Build.SourcesDirectory)
dir /s/b \deps
displayName: 'Install Windows dependencies'
condition: startsWith(variables['IMAGE'], 'windows')
- script: |
PATH=~/perl5/bin:~/perl5/perlbrew/bin:~/perl5/perlbrew/perls/perl-$(PERL_VERSION)/bin:$PATH
echo "##vso[task.setvariable variable=PATH]$PATH"
wget -O - https://install.perlbrew.pl | bash
perlbrew install --notest perl-$(PERL_VERSION)
perl -V
curl -L https://cpanmin.us | perl - App::cpanminus
condition: or(startsWith(variables['IMAGE'], 'ubuntu'), startsWith(variables['IMAGE'], 'macos'))
displayName: 'Install perl (Unix)'
- script: |
choco uninstall strawberryperl
choco install strawberryperl -y --version=$(PERL_VERSION)
perl -V
condition: startsWith(variables['IMAGE'], 'windows')
displayName: 'Install perl (Windows)'
- script: |
cpanm --quiet --notest Dist::Zilla Dist::Zilla::PluginBundle::Author::JACQUESG App::Ack
dzil authordeps --missing | ack -v "inc::" | cpanm --quiet --notest
dzil listdeps --missing | cpanm --quiet --notest
condition: or(startsWith(variables['IMAGE'], 'ubuntu'), startsWith(variables['IMAGE'], 'macos'))
displayName: 'Install CPAN dependencies (Unix)'
- script: |
call cpanm --quiet --notest Dist::Zilla Dist::Zilla::PluginBundle::Author::JACQUESG App::Ack
call dzil authordeps --missing | ack -v "inc::" | cpanm --quiet --notest
call dzil listdeps --missing | cpanm --quiet --notest
condition: startsWith(variables['IMAGE'], 'windows')
displayName: 'Install CPAN dependencies (Windows)'
- script: |
dzil cover -ignore_re ^deps -ignore_re CORE -ignore_re ^const -ignore_re usr -test -report coveralls
condition: startsWith(variables['IMAGE'], 'ubuntu')
env:
COVERALLS_REPO_TOKEN: $(COVERALLS_TOKEN)
RELEASE_TESTING: 1
AUTOMATED_TESTING: 1
displayName: 'Build/Test (Linux)'
- script: |
dzil test
condition: startsWith(variables['IMAGE'], 'macos')
env:
RELEASE_TESTING: 1
AUTOMATED_TESTING: 1
displayName: 'Build/Test (macOS)'
- script: |
call dzil build --in Archive-Raw
cd Archive-Raw
set PATH=C:\Strawberry\perl\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\c\bin;\deps\libarchive\bin
perl Makefile.PL --with-libarchive-include=\deps\libarchive\include --with-libarchive-lib=\deps\libarchive\lib\archive.lib
gmake test
condition: startsWith(variables['IMAGE'], 'windows')
env:
RELEASE_TESTING: 1
AUTOMATED_TESTING: 1
displayName: 'Build/Test (Windows)'