-
-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (106 loc) · 4.22 KB
/
linux.yaml
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
127
128
129
130
131
132
133
134
135
name: Linux
on:
push:
branches: '*'
pull_request:
branches: '*'
schedule:
- cron: '42 5 * * 0'
jobs:
install_perl:
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
exclude:
- os: macos-latest
flags: -Dusequadmath
os:
- ubuntu-latest
perl:
- 5.38.0
flags:
- --64int
- --thread
- --ld
- --multi
- -Dusequadmath
- ""
name: "${{ matrix.os }}-${{ matrix.perl }}${{ matrix.flags }}"
steps:
- uses: actions/checkout@v3
- name: Cache perl
uses: actions/cache@v3
id: cache-perl
with:
path: ~/perl5/perlbrew/
key: ${{ matrix.os }}-perl-v${{ matrix.perl }}${{ matrix.flags }}
- name: "Init dev env on Windows"
if: ${{ steps.cache-perl.outputs.cache-hit != 'true' && matrix.os == 'windows-latest' }}
run: |
# skip installing perl if it is already installed.
if (!(Test-Path "C:\strawberry\perl\bin")) {
choco install strawberryperl
}
echo @"
C:\strawberry\c\bin
C:\strawberry\perl\site\bin
C:\strawberry\perl\bin
"@ |
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: "Build perl ${{ matrix.perl }} directly on Windows"
if: ${{ steps.cache-perl.outputs.cache-hit != 'true' && matrix.os == 'windows-latest' }}
shell: cmd
run: >
git clone --depth 1 --branch v${{matrix.perl}} https://github.com/Perl/perl5.git
pushd perl5\win32
gmake CCHOME=C:\strawberry\c INST_TOP="C:\Users\runneradmin\perl5\perlbrew" ^
${{ matrix.flags == '--64int' && 'USE_64_BIT_INT=define' || '' }} ^
${{ matrix.flags == '--thread' && 'USE_ITHREADS=define USE_MULTI=define' || '' }} ^
${{ matrix.flags == '--ld' && 'USE_LONG_DOUBLE=define' || '' }} ^
${{ matrix.flags == '--multi' && 'USE_MULTI=define' || '' }} ^
${{ matrix.flags == '-Dusequadmath' && 'USE_QUADMATH=define' || '' }} ^
-f GNUMakefile -j2 install
popd
set PATH=C:\Users\runneradmin\perl5\perlbrew\bin;%PATH%
- name: "Install deps"
if: ${{ matrix.os == 'windows-latest' }}
shell: cmd
run: |
set PATH=C:\Users\runneradmin\perl5\perlbrew\bin;%PATH%
perl -V
cpanm --installdeps --notest .
- name: "Testing on chached perl ${{ matrix.os }}-${{ matrix.perl }}(${{ matrix.flags }})"
if: ${{ matrix.os == 'windows-latest' }}
shell: cmd
run: |
set PATH=C:\Users\runneradmin\perl5\perlbrew\bin;%PATH%
perl -V
cpanm --test-only -v .
- name: "Build perl ${{ matrix.perl }} with perlbrew"
if: ${{ steps.cache-perl.outputs.cache-hit != 'true' && matrix.os != 'windows-latest' }}
shell: bash
run: >
\curl -L https://install.perlbrew.pl | bash
source ~/perl5/perlbrew/etc/bashrc
perlbrew available
perlbrew install-cpanm
perlbrew install --switch --verbose --as cache-${{ matrix.os }}${{ matrix.perl }}${{ matrix.flags }} -j 12 --notest --noman ${{ matrix.flags }} perl-${{ matrix.perl }}
- name: "Install deps"
if: ${{ matrix.os != 'windows-latest' }}
shell: bash
run: |
source ~/perl5/perlbrew/etc/bashrc
perlbrew list
perlbrew switch cache-${{ matrix.os }}${{ matrix.perl }}${{ matrix.flags }}
perl -V
cpanm --installdeps --notest .
- name: "Testing on chached perl ${{ matrix.os }}-${{ matrix.perl }}(${{ matrix.flags }})"
if: ${{ matrix.os != 'windows-latest' }}
shell: bash
run: |
source ~/perl5/perlbrew/etc/bashrc
perlbrew list
perlbrew switch cache-${{ matrix.os }}${{ matrix.perl }}${{ matrix.flags }}
perl -V
cpanm --test-only -v .