Skip to content

Commit

Permalink
Add github workflow for upstream zlib (#13)
Browse files Browse the repository at this point in the history
* Update linux-upstream-zlib.yml

* Update linux-upstream-zlib.yml

* Update linux-upstream-zlib.yml

* Update linux-upstream-zlib.yml

* Update linux-upstream-zlib.yml

* Update linux-upstream-zlib.yml

* Create linux-32bit

* Rename linux-32bit to linux-32bit.yml

* Update linux-32bit.yml

* enable Z_SOLO to see what happens with 32-bit build

* Create alpine-32bit.yml

* Update alpine-32bit.yml

* Update alpine-32bit.yml

* Update alpine-32bit.yml

* Update alpine-32bit.yml

* Update alpine-32bit.yml

* Update alpine-32bit.yml

* Update alpine-32bit.yml

* Update alpine-32bit.yml

* Update Makefile.PL

* Update alpine-32bit.yml

* Create macos-upstream-zlib.yml
  • Loading branch information
pmqs authored Jun 13, 2022
1 parent c44e0b7 commit 5338226
Show file tree
Hide file tree
Showing 4 changed files with 175 additions and 21 deletions.
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

0 comments on commit 5338226

Please sign in to comment.