Linux + Upstream Sourceware Bzip2 1.0 #161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.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@v4 | |
# with: | |
# repository: https://sourceware.org/git/bzip2.git | |
# ref: ${{matrix.upstream-branch-name}} | |
# path: ${{ env.bzip2-source }} | |
- uses: actions/checkout@v4 | |
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; | |
' |