-
Notifications
You must be signed in to change notification settings - Fork 5
124 lines (105 loc) · 3.4 KB
/
linux-upstream-sourceware.yml
File metadata and controls
124 lines (105 loc) · 3.4 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
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
name: Linux + Upstream Sourceware Bzip2 1.0
on:
workflow_dispatch:
push:
pull_request:
schedule:
- cron: '02 02 * * 6' # Run every Saturday
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
perl:
- '5.42'
# - '5.40'
# - '5.38'
# - '5.36'
# - '5.34'
# - '5.32'
# - '5.30'
# - '5.28'
# - '5.26'
# - '5.24'
# - '5.22'
# - '5.20'
# - '5.18'
# - '5.16'
# - '5.14'
# - '5.12'
# - '5.10'
# - '5.8'
# - '5.6'
upstream-branch-name:
- master
upstream-dummy-version:
- '1.0.999'
env:
bzip2-source: ${{ github.workspace }}/upstream-bzip2-source
bzip2-install: ${{ github.workspace }}/upstream-bzip2-install
BZIP2_LIB: ${{ github.workspace }}/upstream-bzip2-install/lib
BZIP2_INCLUDE: ${{ github.workspace }}/upstream-bzip2-install/include
BZIP2_VERSION: ${{ matrix.upstream-dummy-version }}
BUILD_BZIP2: 0
defaults:
run:
working-directory: repo
name: Perl ${{ matrix.perl }} + Upstream Sourceware '${{ matrix.upstream-bzip2-version }}'
steps:
# - name: Checkout upstream bzip2 '${{matrix.upstream-branch-name}}'
# uses: actions/checkout@v6
# with:
# repository: https://sourceware.org/git/bzip2.git
# ref: ${{matrix.upstream-branch-name}}
# path: ${{ env.bzip2-source }}
- uses: actions/checkout@v6
with:
path: repo
- name: Make Paths
run: |
mkdir -p ${{ env.bzip2-source }}
mkdir -p ${{ env.bzip2-install }}
mkdir -p ${{ env.bzip2-install }}/lib
mkdir -p ${{ env.bzip2-install }}/include
mkdir -p ${{ github.workspace }}/repo
- name: Checkout upstream bzip2 '${{matrix.upstream-bzip2-version}}''
run: |
git clone --depth 1 https://sourceware.org/git/bzip2.git .
sed -i -e s'/BZ_VERSION "1.0.8.*"/BZ_VERSION "${{ env.BZIP2_VERSION }}"/' bzlib_private.h
working-directory: ${{ env.bzip2-source }}
- name: Build upstream bzip2 '${{matrix.upstream-bzip2-version}}''
run: |
make -f Makefile-libbz2_so
cp bzlib.h ${{ env.bzip2-install }}/include
cp libbz2.so* ${{ env.bzip2-install }}/lib
make clean
rm libbz2.so*
working-directory: ${{ env.bzip2-source }}
- name: Show Installed Bzip2 files in ${{ env.bzip2-install }}
run: |
find .
working-directory: ${{ env.bzip2-install }}
- name: Setup perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- name: Perl version
run: perl -V
- name: Install dependencies
run: cpanm --quiet --installdeps --notest .
- name: Build
run: |
flags=$( perl -MConfig -e 'print $Config::Config{ccflags}' )
perl Makefile.PL CCFLAGS="$flags -Werror" && make
- name: Test
run: make test
- name: Check Bzip2 Version
run: |
perl -Mblib -MCompress::Raw::Bzip2 -e '
my $expected = "${{ env.BZIP2_VERSION }}";
my $got = Compress::Raw::Bzip2::bzlibversion() ;
print "Expected: $expected\n" ;
print "Got: $got\n";
die "Unexpected Bzip2 version\n"
if $expected ne $got;
'