Debian Codegraph @

.github/workflows/test.yml

raw
1 name: CI
2
3 on:
4 push:
5 branches-ignore:
6 - '*travis*'
7 - '*appveyor*'
8 - '*doozer*'
9 pull_request:
10 workflow_dispatch:
11
12 jobs:
13 test:
14 name: ${{ matrix.os }}
15 runs-on: ${{ matrix.os }}
16 strategy:
17 matrix:
18 include:
19 - os: 'ubuntu-20.04'
20 - os: 'ubuntu-22.04'
21 - os: 'ubuntu-24.04'
22
23 steps:
24 - name: apt hacks
25 # removing non-needed apt repositories may speed up "apt-get update"
26 # also, 3rd party repositories might be unreliable
27 run: |
28 sudo rm -f /etc/apt/sources.list.d/*.list
29 sudo apt-get update -qq
30 if: "startsWith(matrix.os, 'ubuntu-')"
31 - uses: taiki-e/checkout-action@v1
32 - name: Preinstall, Configure, Build and Test
33 env:
34 HARNESS_TIMER: 1
35 HARNESS_OPTIONS: j8
36 run: |
37 sudo apt-get install -qq --no-install-recommends cpanminus
38 cpanm --sudo --quiet --installdeps --notest . || ( cat ~/.cpanm/work/*/build.log; false )
39 perl Makefile.PL
40 make -j8
41 make test
42 if: "!startsWith(matrix.os,'windows-')"
43
44 test_in_container:
45 name: Test with perl ${{ matrix.perlimage }} ${{ matrix.label }}
46 runs-on: ubuntu-latest
47 container: perl:${{ matrix.perlimage }}
48 strategy:
49 matrix:
50 include:
51 - perlimage: 5.8.9-threaded-stretch
52 - perlimage: 5.10.1-buster
53 - perlimage: 5.12.5-stretch
54 - perlimage: 5.14.4-stretch
55 - perlimage: 5.16.3-buster
56 - perlimage: 5.18.4-buster
57 - perlimage: 5.22.4-stretch
58 - perlimage: 5.24.4-threaded-buster
59 WITH_JSON_XS: 1
60 WITH_YAML_SYCK: 1
61 label: "with JSON::XS + YAML::Syck"
62 - perlimage: 5.26.3-buster
63 WITH_JSON_XS: 1
64 WITH_YAML_XS: 1
65 label: "with JSON::XS + YAML::XS"
66 - perlimage: 5.28.3-buster
67 WITH_JSON: 1
68 WITH_YAML: 1
69 label: "with JSON + YAML"
70 - perlimage: 5.30.3-bullseye
71 WITH_YAML_SYCK: 1
72 label: "with YAML::Syck"
73 - perlimage: 5.32.1-bullseye
74 WITH_YAML_XS: 1
75 label: "with YAML::XS"
76 - perlimage: 5.34.3-bullseye
77 WITH_YAML_PP: 1
78 label: "with YAML::PP"
79 - perlimage: 5.36.3-bookworm
80 WITH_YAML: 1
81 label: "with YAML"
82 - perlimage: 5.38.2-bookworm
83 WITH_JSON: 1
84 WITH_YAML: 1
85 WITH_IPC_RUN: 1
86 DO_COVERALLS: 1
87 label: "with JSON + YAML + IPC::Run + DO_COVERALLS"
88 - perlimage: 5.40.0-slim-bookworm
89
90 steps:
91 - name: apt hacks
92 run: |
93 set -e
94 CODENAME=$(perl -nle '/^VERSION_CODENAME="?([^"]+)/ and $codename=$1; /^VERSION="\d+ \((.*)\)/ and $maybe_codename=$1; END { print $codename || $maybe_codename }' /etc/os-release)
95 case "$CODENAME" in
96 wheezy|jessie|stretch)
97 echo "APT::Get::AllowUnauthenticated 1;" > /etc/apt/apt.conf.d/02allow-unsigned
98 echo "deb [check-valid-until=no] http://archive.debian.org/debian $CODENAME main" > /etc/apt/sources.list
99 echo "deb [check-valid-until=no] http://archive.debian.org/debian-security/ $CODENAME/updates main" >> /etc/apt/sources.list
100 ;;
101 esac
102 - uses: taiki-e/checkout-action@v1
103 - name: Preinstall, Configure, Build and Test
104 env:
105 HARNESS_TIMER: 1
106 HARNESS_OPTIONS: j8
107 DO_COVERALLS: ${{ matrix.DO_COVERALLS }}
108 WITH_JSON_XS: ${{ matrix.WITH_JSON_XS }}
109 WITH_JSON: ${{ matrix.WITH_JSON }}
110 WITH_YAML_SYCK: ${{ matrix.WITH_YAML_SYCK }}
111 WITH_YAML_XS: ${{ matrix.WITH_YAML_XS }}
112 WITH_YAML_PP: ${{ matrix.WITH_YAML_PP }}
113 WITH_YAML: ${{ matrix.WITH_YAML }}
114 WITH_IPC_RUN: ${{ matrix.WITH_IPC_RUN }}
115 run: |
116 [ "$DO_COVERALLS" = 1 ] && cpanm --quiet --notest Devel::Cover::Report::Coveralls || true
117 [ "$WITH_JSON_XS" = 1 ] && cpanm --quiet --notest JSON::XS || true
118 [ "$WITH_JSON" = 1 ] && cpanm --quiet --notest JSON || true
119 [ "$WITH_YAML_SYCK" = 1 ] && cpanm --quiet --notest YAML::Syck || true
120 [ "$WITH_YAML_XS" = 1 ] && cpanm --quiet --notest YAML::XS || true
121 [ "$WITH_YAML_PP" = 1 ] && cpanm --quiet --notest YAML::PP || true
122 [ "$WITH_YAML" = 1 ] && cpanm --quiet --notest YAML || true
123 [ "$WITH_IPC_RUN" = 1 ] && cpanm --quiet --notest IPC::Run || true
124 cpanm --quiet --installdeps --notest . || ( cat ~/.cpanm/work/*/build.log; false )
125 perl Makefile.PL
126 make -j8
127 make test
128 [ "$DO_COVERALLS" = 1 ] && cover -test -report coveralls || true