Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github workflow for upstream zlib #13

Merged
merged 22 commits into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/alpine-32bit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

# regression test for https://github.com/pmqs/Compress-Raw-Zlib/issues/12
#
# needs the following combination to trigger the issue
# A 32-bit Alpine
# BUILD_ZLIB=0
# Z_SOLO set inn Makefile.PL
#
# Error is
#
# Failed test (t/02zlib.t at line 1097)
# # got: '1865561793'
# # expected: '2598427311'
# # Failed test (t/02zlib.t at line 1117)
# # got: '544801189'
# # expected: '121635237'
# # Looks like you failed 2 tests of 353.
# t/02zlib.t .........
# Dubious, test returned 2 (wstat 512, 0x200)
# Failed 2/353 subtests
#

name: Alpine 32-bit

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
container:
image: i386/alpine
steps:
- name: install the Perl, gcc, make & zlib
run: |
apk update
apk add build-base perl perl-dev zlib-dev
- uses: actions/checkout@v1
- name: perl -V
run: perl -V
- name: perl Makefile.PL
run: perl Makefile.PL
env:
BUILD_ZLIB: 0
- name: make
run: make
- name: make test
run: make test
26 changes: 26 additions & 0 deletions .github/workflows/linux-32bit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Linux 32-bit

on: [push, pull_request]


jobs:
build:
runs-on: ubuntu-latest
container:
image: i386/ubuntu:latest
steps:
- name: install the Perl header, core modules, building tools
run: |
apt update
apt install -y libperl-dev build-essential
- uses: actions/checkout@v1
- name: perl -V
run: perl -V
#- name: perl %Config
# run: perl -MConfig -MData::Dumper -e 'local $Data::Dumper::Sortkeys = 1;warn Dumper \%Config;'
- name: perl Makefile.PL
run: perl Makefile.PL
- name: make
run: make
- name: make test
run: make test
46 changes: 25 additions & 21 deletions .github/workflows/linux-upstream-zlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: Linux build with upstream zlib

on: [push, pull_request]

# upstream build derivbed from https://github.com/madler/zlib/pull/506
# upstream build derived from https://github.com/madler/zlib/pull/506



jobs:
build:
Expand All @@ -16,34 +15,36 @@ jobs:
perl:
- '5.36'
zlib-version:
- 1.2.12

#include:
# - zlib-source: ${HOME}/upstream-zlib-source
# zlib-install: ${HOME}/upstream-zlib-install

#env:
# zlib-source: ${HOME}/upstream-zlib-source
# zlib-install: ${HOME}/upstream-zlib-install

- v1.2.12
- v1.2.11
- develop


name: Perl ${{ matrix.perl }} with zlib :${{matrix.zlib-version}}
steps:
- uses: actions/checkout@v1

- name: Set Env
run: |
echo "zlib-source=${GITHUB_WORKSPACE}/upstream-zlib-source-${{ matrix.zlib-version }}" >> $GITHUB_ENV
echo "zlib-install=${HOME}/upstream-zlib-install-${{ matrix.zlib-version }}" >> $GITHUB_ENV
echo "ZLIB_LIB=${HOME}/upstream-zlib-install-${{ matrix.zlib-version }}/lib" >> $GITHUB_ENV
echo "ZLIB_INCLUDE=${HOME}/upstream-zlib-install-${{ matrix.zlib-version }}/include" >> $GITHUB_ENV

- name: Checkout upstream zlib ${{matrix.zlib-version}}
uses: actions/checkout@v2
with:
repository: madler/zlib
path: ${HOME}/upstream-zlib-source
ref: ${{ matrix.zlib-version }}
path: ${{ env.zlib-source }}

- name: Build zlib ${{matrix.zlib-version}}
run: |
./configure --prefix ${HOME}/upstream-zlib-install
./configure --prefix ${{ env.zlib-install }}
make
make test
make install
working-directory: ${HOME}/upstream-zlib-source
working-directory: ${{ env.zlib-source }}

- name: Setup perl
uses: shogo82148/actions-setup-perl@v1
Expand All @@ -53,20 +54,23 @@ jobs:
- name: Perl version
run: perl -V

- name: Install dependencies
run: cpanm --quiet --installdeps --notest .
#- name: Install dependencies
# run: |
# pwd
# ls
# cpanm --verbose --installdeps --notest .

- name: Build
run: |
echo HOME ${HOME}
echo BUILD_ZLIB ${BUILD_ZLIB}
echo ZLIB_LIB $ZLIB_LIB
echo ZLIB_INCLUDE $ZLIB_INCLUDE
find ${HOME}/upstream-zlib-install
#find ${HOME}/upstream-zlib-install
perl Makefile.PL && make
env:
BUILD_ZLIB: 0
ZLIB_LIB: ${HOME}/upstream-zlib-install/lib
ZLIB_INCLUDE: ${HOME}/upstream-zlib-install/include
#ZLIB_LIB: ${HOME}/upstream-zlib-install/lib
#ZLIB_INCLUDE: ${HOME}/upstream-zlib-install/include


- name: Test
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/macos-upstream-zlib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: MacOS build with upstream zlib

on: [push, pull_request]

# upstream build derived from https://github.com/madler/zlib/pull/506


jobs:
build:

runs-on: macos-latest

strategy:
matrix:
perl:
- '5.36'
zlib-version:
- v1.2.12
- v1.2.11
- develop


name: Perl ${{ matrix.perl }} with zlib :${{matrix.zlib-version}}
steps:
- uses: actions/checkout@v1

- name: Set Env
run: |
echo "zlib-source=${GITHUB_WORKSPACE}/upstream-zlib-source-${{ matrix.zlib-version }}" >> $GITHUB_ENV
echo "zlib-install=${HOME}/upstream-zlib-install-${{ matrix.zlib-version }}" >> $GITHUB_ENV
echo "ZLIB_LIB=${HOME}/upstream-zlib-install-${{ matrix.zlib-version }}/lib" >> $GITHUB_ENV
echo "ZLIB_INCLUDE=${HOME}/upstream-zlib-install-${{ matrix.zlib-version }}/include" >> $GITHUB_ENV

- name: Checkout upstream zlib ${{matrix.zlib-version}}
uses: actions/checkout@v2
with:
repository: madler/zlib
ref: ${{ matrix.zlib-version }}
path: ${{ env.zlib-source }}

- name: Build zlib ${{matrix.zlib-version}}
run: |
./configure --prefix ${{ env.zlib-install }}
make
make test
make install
working-directory: ${{ env.zlib-source }}

- name: Setup perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}

- name: Perl version
run: perl -V

#- name: Install dependencies
# run: |
# pwd
# ls
# cpanm --verbose --installdeps --notest .

- name: Build
run: |
echo BUILD_ZLIB ${BUILD_ZLIB}
echo ZLIB_LIB $ZLIB_LIB
echo ZLIB_INCLUDE $ZLIB_INCLUDE
#find ${HOME}/upstream-zlib-install
perl Makefile.PL && make
env:
BUILD_ZLIB: 0
#ZLIB_LIB: ${HOME}/upstream-zlib-install/lib
#ZLIB_INCLUDE: ${HOME}/upstream-zlib-install/include


- name: Test
run: make test