-
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (79 loc) · 3.41 KB
/
Copy pathunix.yml
File metadata and controls
82 lines (79 loc) · 3.41 KB
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
---
jobs:
build:
name: "${{ inputs.flags == '-Dusethreads' && 'Threads' || inputs.flags == '-Duselongdouble' && 'Long Double' || inputs.flags == '-Dusequadmath' && 'Quad Math' || inputs.flags == '--debug' && 'Debugging' || inputs.flags == '' && 'Default' || inputs.flags }}"
runs-on: '${{ inputs.os }}'
steps:
- name: Checkout source
uses: actions/checkout@v5.0.0
with:
submodules: true
- id: cache-perl
name: Check perl Cache
uses: actions/cache@v4.3.0
with:
key: '${{ inputs.os }}-perl-v${{ inputs.perl }}${{ inputs.flags }}'
path: '~/perl5/'
- if: "${{ steps.cache-perl.outputs.cache-hit != 'true' }}"
name: 'Build perl ${{ inputs.perl }} from source'
run: |
\curl -L https://install.perlbrew.pl | bash
source ~/perl5/perlbrew/etc/bashrc
perlbrew self-upgrade
perlbrew install-patchperl
perlbrew available
perlbrew install-cpanm
cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
cpanm -n -v Devel::PatchPerl
perlbrew install --switch --verbose --as cache-${{ inputs.os }}-${{ inputs.perl }}${{ inputs.flags }} -j 12 --notest --noman ${{ inputs.flags }} perl-${{ inputs.perl }}
- name: Install prereqs
run: |
if [[ $(uname -o) == GNU/Linux ]]; then
sudo apt-get update -y
sudo apt-get install -y valgrind libatomic1 libwayland-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev libxkbcommon-dev libxtst-dev libxv-dev libxxf86vm-dev libdbus-1-dev libudev-dev libgles2-mesa-dev libegl1-mesa-dev libgl1-mesa-dev libibus-1.0-dev libpulse-dev libsamplerate0-dev libsndio-dev libpipewire-0.3-dev libdecor-0-dev libxcursor-dev
fi
source ~/perl5/perlbrew/etc/bashrc
perlbrew switch cache-${{ inputs.os }}-${{ inputs.perl }}${{ inputs.flags }}
cpanm --installdeps --notest --with-suggests --with-recommends --with-configure -v .
shell: bash
- env:
AUTHOR_TESTING: 0
AUTOMATED_TESTING: 1
id: test
name: Run test suite
run: |
source ~/perl5/perlbrew/etc/bashrc
perlbrew switch cache-${{ inputs.os }}-${{ inputs.perl }}${{ inputs.flags }}
perl -V
perl Build.PL
./Build
./Build test --v
command1_exit_code=$?
if [ $command1_exit_code -eq 0 ]; then
~/perl5/perlbrew/perls/cache-${{ inputs.os }}-${{ inputs.perl }}${{ inputs.flags }}/bin/perl -V > test-output-${{ inputs.os }}-${{ inputs.perl }}${{ inputs.flags }}.txt
command2_exit_code=$?
else
echo "Error!" > test-output-${{ inputs.os }}-${{ inputs.perl }}${{ inputs.flags }}.txt
exit $command1_exit_code
fi
shell: bash
- name: Upload results as artifact
uses: actions/upload-artifact@v5.0.0
with:
if-no-files-found: error
name: 'test-output-${{ inputs.os }}-${{ inputs.perl }}${{ inputs.flags }}'
path: 'test-output-${{ inputs.os }}-${{ inputs.perl }}${{ inputs.flags }}.txt'
retention-days: 1
name: inputs module
on:
workflow_call:
inputs:
flags:
required: false
type: string
os:
required: true
type: string
perl:
required: true
type: string