-
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (83 loc) · 3.35 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
name: Linux
on:
push:
branches: "*"
pull_request:
branches: "*"
jobs:
install_perl:
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
perl:
- 5.36.0
#- 5.34.1
#- 5.32.1
#- 5.30.3
flags:
- --64int
- --thread
- --ld
- --multi
- ""
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' || '' }} ^
-f GNUMakefile -j2 install
popd
set PATH=C:\Users\runneradmin\perl5\perlbrew\bin;%PATH%
- 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 perl-${{ matrix.perl }} --as cache-${{ matrix.os }}${{ matrix.perl }}${{ matrix.flags }} -j 12 --notest --noman ${{ matrix.flags }}
perlbrew clean
- 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%
cpanm --test-only -v --mirror http://cpan.cpantesters.org/ .
- name: "Testing on chached perl ${{ matrix.os }}-${{ matrix.perl }}(${{ matrix.flags }})"
if: ${{ matrix.os != 'windows-latest' }}
shell: bash
run: |
source ~/perl5/perlbrew/etc/bashrc
cpanm --test-only -v --mirror http://cpan.cpantesters.org/ .