-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (106 loc) · 3.86 KB
/
container.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
name: Run Tests in swipl containers
on:
push:
branches:
- '*'
pull_request:
jobs:
dist:
name: Make distribution using Dist::Zilla
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: 'build-dzil-dist'
uses: PDLPorters/devops/github-actions/build-dzil-dist@master
ci-container:
runs-on: ubuntu-latest
needs: [ dist ]
container: ${{ matrix.container }}
env:
AUTHOR_TESTING: 1
strategy:
fail-fast: false
matrix:
perl: [ '5' ]
thread: [ 'true' ]
container:
- swipl:7.5.15
- swipl:7.6.4
- swipl:7.7.25
- swipl:8.0.3
- swipl:8.1.0
- swipl:8.1.15
# The following containers have the conflicting symbol
# PL_version. See alienfile for more information.
# START
- swipl:8.1.30
- swipl:8.2.4
- swipl:8.3.29
- swipl:8.4.0
# END
# First release with patch for PL_version bug is 8.5.3.
- swipl:8.5.3
- swipl:8.5.20
- swipl:9.0.4
- swipl:stable
include:
# Include a version that would usually be a system install, but the
# threading of SWI-Prolog and Perl does not match so must build a share
# install.
- { perl: '5', thread: false, container: 'swipl:stable' }
name: Perl ${{ matrix.perl }},thr-${{ matrix.thread }} with swipl container ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Get dist artifact
uses: actions/download-artifact@v3
with:
name: dist
path: build-dir
- name: Get pre-reqs for steps
run: |
grep -q stretch /etc/apt/sources.list \
&& echo "deb http://archive.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --allow-downgrades --no-install-recommends libssl1.1=1.1.0l-1~deb9u1
apt-get update && apt-get install -y --no-install-recommends \
build-essential xz-utils curl \
zlib1g-dev libarchive-dev libssl-dev openssl \
libgmp-dev
- name: Set up perl (default from deb repo)
if: matrix.container != 'swipl:stable'
run: |
apt-get install -y perl cpanminus
- name: Set up perl (zstd for actions-setup-perl)
if: matrix.container == 'swipl:stable'
run: |
# Install newer zstd needed for actions-setup-perl.
# From <https://github.com/horta/zstd.install>.
# This needs cmake.
apt-get install -y cmake
bash -c "$(curl -fsSL https://raw.githubusercontent.com/horta/zstd.install/main/install)"
# Now uninstall cmake system package for the following steps since it
# is too old for building SWI-Prolog from source. Will use
# Alien::cmake3 to get newer version.
apt-get remove -y cmake
- name: Set up perl (via actions-setup-perl)
if: matrix.container == 'swipl:stable'
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
multi-thread: ${{ matrix.thread }}
- name: Move openssl binary that is part of actions-setup-perl
if: matrix.container == 'swipl:stable'
run: |
which -a openssl | grep /hostedtoolcache/perl/ | xargs -I{} mv {} {}~
- run: perl -V
- name: Install Perl deps
run: |
cpanm --verbose --notest --installdeps ./build-dir
- name: Install Perl author deps
run: |
cpanm --notest --installdeps --with-develop ./build-dir
- name: Run tests
run: |
cpanm --verbose --test-only ./build-dir