File: azure-pipelines.yml

package info (click to toggle)
libgit-raw-perl 0.90%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,540 kB
  • sloc: perl: 5,432; ansic: 182; makefile: 6
file content (122 lines) | stat: -rw-r--r-- 3,939 bytes parent folder | download | duplicates (2)
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
# 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:
    linux-perl530:
        PERL_VERSION: '5.30.0'
        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.0'
        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 -qq install libssl-dev libssh2-1-dev openssh-client openssh-server
    sudo mkdir -p -m0755 /var/run/sshd
  condition: startsWith(variables['IMAGE'], 'ubuntu')
  displayName: 'Install dependencies'

- script: |
    # Setup an SSH server
    TMPDIR=${TMPDIR:-/tmp}
    SSHD_DIR=`mktemp -d ${TMPDIR}/sshd.XXXXXXXX`

    cat >"${SSHD_DIR}/sshd_config" <<-EOF
    Port 2222
    ListenAddress 0.0.0.0
    Protocol 2
    HostKey ${SSHD_DIR}/id_rsa
    PidFile ${SSHD_DIR}/pid
    AuthorizedKeysFile ${HOME}/.ssh/authorized_keys
    LogLevel DEBUG
    RSAAuthentication yes
    PasswordAuthentication yes
    PubkeyAuthentication yes
    ChallengeResponseAuthentication yes
    StrictModes no
    UsePAM no
    EOF

    ssh-keygen -t rsa -f "${SSHD_DIR}/id_rsa" -N "" -q
    /usr/sbin/sshd -f "${SSHD_DIR}/sshd_config" -E "${SSHD_DIR}/log"

    # Set up keys
    mkdir -p "${HOME}/.ssh"
    ssh-keygen -t rsa -m PEM -b 2048 -f "${HOME}/.ssh/id_rsa" -N "" -q
    cat "${HOME}/.ssh/id_rsa.pub" >>"${HOME}/.ssh/authorized_keys"
    while read algorithm key comment; do
        echo "[localhost]:2222 $algorithm $key" >>"${HOME}/.ssh/known_hosts"
    done <"${SSHD_DIR}/id_rsa.pub"
  condition: or(startsWith(variables['IMAGE'], 'ubuntu'), startsWith(variables['IMAGE'], 'macos'))
  displayName: 'Setup SSH server'

- 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: |
    git config --global init.defaultBranch master
    git config --global user.name "p5-Git-Raw"
    git config --global user.email "jacquesg@cpan.org"
    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: |
    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_REPO_TOKEN)
    RELEASE_TESTING: 1
    NETWORK_TESTING: 1
    AUTOMATED_TESTING: 1
    SSH_TESTING: 1
  displayName: 'Build/Test (Linux)'

- script: |
    dzil test
  condition: startsWith(variables['IMAGE'], 'macos')
  env:
    RELEASE_TESTING: 1
    NETWORK_TESTING: 1
    AUTOMATED_TESTING: 1
    SSH_TESTING: 0
  displayName: 'Build/Test (macOS)'