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

Updated internal zlib-ng to 2.2.2 #644

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
Next Next commit
Pristine zlib-ng 2.0.7 sources, from tarball
DimitriPapadopoulos committed Dec 6, 2024
commit 0acd4d8b5c887b0ca4d8ffbb17fc259c68df8ddd
6 changes: 6 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto
*.c text
*.h text
Makefile text
configure text eol=lf
testCVEinputs.sh text eol=lf
78 changes: 78 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.github/workflows/analyze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Static Analysis
on: [push, pull_request]
jobs:
static-analysis:
name: GCC
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Add ubuntu mirrors
run: |
# Github Actions caching proxy is at times unreliable
echo -e 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
sudo sed -i 's#http://azure.archive.ubuntu.com/ubuntu/#mirror+file:/etc/apt/mirrors.txt#' /etc/apt/sources.list

- name: Install packages (Ubuntu)
run: sudo apt-get install -y gcc-10

- name: Generate project files
run: |
cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DWITH_FUZZERS=OFF \
-DWITH_CODE_COVERAGE=OFF \
-DWITH_MAINTAINER_WARNINGS=OFF
env:
CC: gcc-10
CFLAGS:
-fanalyzer
-Werror
-Wanalyzer-double-fclose
-Wanalyzer-double-free
-Wanalyzer-exposure-through-output-file
-Wanalyzer-file-leak
-Wanalyzer-free-of-non-heap
-Wanalyzer-malloc-leak
-Wanalyzer-null-argument
-Wanalyzer-null-dereference
-Wanalyzer-possible-null-argument
-Wanalyzer-possible-null-dereference
-Wanalyzer-stale-setjmp-buffer
-Wanalyzer-tainted-array-index
-Wanalyzer-unsafe-call-within-signal-handler
-Wanalyzer-use-after-free
-Wanalyzer-use-of-pointer-in-stale-stack-frame
CI: true

- name: Compile source code
run: cmake --build . -j2 --config Release > /dev/null

Clang:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install packages (Ubuntu)
run: sudo apt-get install -y clang-tools

- name: Generate project files
run: |
scan-build --status-bugs \
cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DWITH_FUZZERS=OFF \
-DWITH_CODE_COVERAGE=OFF \
-DWITH_MAINTAINER_WARNINGS=OFF
env:
CI: true

- name: Compile source code
run: |
scan-build --status-bugs \
cmake --build . -j2 --config Release > /dev/null
508 changes: 508 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.github/workflows/cmake.yml

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
schedule:
- cron: "27 17 * * 0"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ cpp ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
192 changes: 192 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.github/workflows/configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
name: Configure
on: [push, pull_request]
jobs:
configure:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu GCC
os: ubuntu-latest
compiler: gcc
configure-args: --warn

- name: Ubuntu 20.04 GCC
os: ubuntu-20.04
compiler: gcc
configure-args: --warn

- name: Ubuntu GCC OSB
os: ubuntu-latest
compiler: gcc
configure-args: --warn
build-dir: ../build
build-src-dir: ../zlib-ng

- name: Ubuntu GCC Compat No Opt
os: ubuntu-latest
compiler: gcc
configure-args: --warn --zlib-compat --without-optimizations --without-new-strategies

- name: Ubuntu GCC ARM SF
os: ubuntu-latest
compiler: arm-linux-gnueabi-gcc
configure-args: --warn
chost: arm-linux-gnueabi
packages: qemu qemu-user gcc-arm-linux-gnueabi libc-dev-armel-cross

- name: Ubuntu GCC ARM SF Compat No Opt
os: ubuntu-latest
compiler: arm-linux-gnueabi-gcc
configure-args: --warn --zlib-compat --without-optimizations --without-new-strategies
chost: arm-linux-gnueabi
packages: qemu qemu-user gcc-arm-linux-gnueabi libc-dev-armel-cross

- name: Ubuntu GCC ARM HF No ACLE
os: ubuntu-latest
compiler: arm-linux-gnueabihf-gcc
configure-args: --warn --without-acle
chost: arm-linux-gnueabihf
packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armel-cross

- name: Ubuntu GCC ARM HF No NEON
os: ubuntu-latest
compiler: arm-linux-gnueabihf-gcc
configure-args: --warn --without-neon --without-acle
chost: arm-linux-gnueabihf
packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armel-cross

- name: Ubuntu GCC ARM HF Compat No Opt
os: ubuntu-latest
compiler: arm-linux-gnueabihf-gcc
configure-args: --warn --zlib-compat --without-optimizations --without-new-strategies
chost: arm-linux-gnueabihf
packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armel-cross

- name: Ubuntu GCC AARCH64
os: ubuntu-latest
compiler: aarch64-linux-gnu-gcc
configure-args: --warn
chost: aarch64-linux-gnu
packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross

- name: Ubuntu GCC AARCH64 No ACLE
os: ubuntu-latest
compiler: aarch64-linux-gnu-gcc
configure-args: --warn --without-acle
chost: aarch64-linux-gnu
packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross

- name: Ubuntu GCC AARCH64 No NEON
os: ubuntu-latest
compiler: aarch64-linux-gnu-gcc
configure-args: --warn --without-neon
chost: aarch64-linux-gnu
packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross

- name: Ubuntu GCC AARCH64 Compat No Opt
os: ubuntu-latest
compiler: aarch64-linux-gnu-gcc
configure-args: --warn --zlib-compat --without-optimizations --without-new-strategies
chost: aarch64-linux-gnu
packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross

- name: Ubuntu GCC PPC
os: ubuntu-latest
compiler: powerpc-linux-gnu-gcc
configure-args: --warn --static
chost: powerpc-linux-gnu
packages: qemu qemu-user gcc-powerpc-linux-gnu libc-dev-powerpc-cross
cflags: -static
ldflags: -static

- name: Ubuntu GCC PPC64
os: ubuntu-latest
compiler: powerpc64-linux-gnu-gcc
configure-args: --warn --static
chost: powerpc-linux-gnu
packages: qemu qemu-user gcc-powerpc64-linux-gnu libc-dev-ppc64-cross
cflags: -static
ldflags: -static

- name: Ubuntu GCC PPC64LE
os: ubuntu-latest
compiler: powerpc64le-linux-gnu-gcc
configure-args: --warn
chost: powerpc64le-linux-gnu
packages: qemu qemu-user gcc-powerpc64le-linux-gnu libc-dev-ppc64el-cross

- name: Ubuntu GCC S390X
os: ubuntu-latest
compiler: s390x-linux-gnu-gcc
configure-args: --warn --static
chost: s390x-linux-gnu
packages: qemu qemu-user gcc-s390x-linux-gnu libc-dev-s390x-cross
cflags: -static
ldflags: -static

- name: Ubuntu GCC S390X DFLTCC
os: z15
compiler: gcc
configure-args: --warn --static --with-dfltcc-deflate --with-dfltcc-inflate

- name: Ubuntu GCC S390X DFLTCC Compat
os: z15
compiler: gcc
configure-args: --warn --zlib-compat --static --with-dfltcc-deflate --with-dfltcc-inflate

- name: macOS GCC
os: macOS-latest
compiler: gcc-11
configure-args: --warn

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Add ubuntu mirrors
if: runner.os == 'Linux' && matrix.packages
run: |
# Github Actions caching proxy is at times unreliable
echo -e 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
sudo sed -i 's#http://azure.archive.ubuntu.com/ubuntu/#mirror+file:/etc/apt/mirrors.txt#' /etc/apt/sources.list
- name: Install packages (Ubuntu)
if: runner.os == 'Linux' && matrix.packages
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.packages }}
- name: Generate project files
run: |
mkdir ${{ matrix.build-dir || '.not-used' }}
cd ${{ matrix.build-dir || '.' }}
${{ matrix.configure-prefix }} ${{ matrix.build-src-dir || '.' }}/configure ${{ matrix.configure-args }}
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
LDFLAGS: ${{ matrix.ldflags }}
CHOST: ${{ matrix.chost }}
EMU_RUN: ${{ matrix.emu-run }}
CI: true

- name: Compile source code
run: make -j2
working-directory: ${{ matrix.build-dir }}

- name: Run test cases
run: make test
working-directory: ${{ matrix.build-dir }}

- name: Upload build errors
uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{ matrix.name }} (configure)
path: |
**/Makefile
${{ matrix.build-dir || '.' }}/configure.log
retention-days: 30
51 changes: 51 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.github/workflows/libpng.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Libpng
on: [push, pull_request]
jobs:
libpng:
name: Ubuntu Clang
runs-on: ubuntu-latest
steps:
- name: Checkout repository (zlib-ng)
uses: actions/checkout@v3

- name: Generate project files (zlib-ng)
run: |
cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DZLIB_COMPAT=ON \
-DZLIB_ENABLE_TESTS=OFF
env:
CC: clang
CFLAGS: -fPIC
CI: true

- name: Compile source code (zlib-ng)
run: cmake --build . -j2 --config Release

- name: Checkout repository (libpng)
uses: actions/checkout@v3
with:
repository: glennrp/libpng
path: libpng

- name: Generate project files (libpng)
run: |
cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DPNG_TESTS=ON \
-DPNG_STATIC=OFF \
-DZLIB_INCLUDE_DIR=.. \
-DZLIB_LIBRARY=$PWD/../libz.a
working-directory: libpng
env:
CC: clang
CI: true

- name: Compile source code (libpng)
run: cmake --build . -j2 --config Release
working-directory: libpng

- name: Run test cases (libpng)
run: ctest -j2 -C Release --output-on-failure --max-width 120
working-directory: libpng
68 changes: 68 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.github/workflows/nmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: NMake
on: [push, pull_request]
jobs:
nmake:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows NMake x86
os: windows-2022
makefile: win32/Makefile.msc
arch: x86

- name: Windows NMake x64 compat
os: windows-2022
makefile: win32/Makefile.msc
arch: x86_amd64
additional-args: ZLIB_COMPAT=yes

- name: Windows NMake x64 Symbol Prefix
os: windows-2022
makefile: win32/Makefile.msc
arch: x86_amd64
additional-args: SYMBOL_PREFIX=zTest_

- name: Windows NMake x64 Symbol Prefix Compat
os: windows-2022
makefile: win32/Makefile.msc
arch: x86_amd64
additional-args: ZLIB_COMPAT=yes SYMBOL_PREFIX=zTest_

- name: Windows NMake x64
os: windows-2022
makefile: win32/Makefile.msc
arch: x86_amd64

- name: Windows NMake ARM No Test
os: windows-2022
makefile: win32/Makefile.arm
arch: x86_arm

- name: Windows NMake ARM64 No Test
os: windows-2022
makefile: win32/Makefile.a64
arch: x86_arm64

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup development environment
uses: ilammy/msvc-dev-cmd@v1.12.1
with:
arch: ${{ matrix.arch }}

- name: Compile source code
shell: cmd
run: nmake -f ${{ matrix.makefile }} ${{ matrix.additional-args }}

- name: Run test cases
shell: cmd
# Don't run tests on Windows ARM
if: contains(matrix.arch, 'arm') == false
run: |
nmake -f ${{ matrix.makefile }} ${{ matrix.additional-args }} test
nmake -f ${{ matrix.makefile }} ${{ matrix.additional-args }} testdll
131 changes: 131 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.github/workflows/pigz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Pigz
on: [push, pull_request]
jobs:
pigz:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu GCC
os: ubuntu-latest
compiler: gcc
codecov: ubuntu_gcc_pigz

- name: Ubuntu GCC Symbol Prefix
os: ubuntu-latest
compiler: gcc
codecov: ubuntu_gcc_pigz
cmake-args: -DZLIB_SYMBOL_PREFIX=zTest_

- name: Ubuntu Clang
os: ubuntu-latest
compiler: clang
packages: llvm-11 llvm-11-tools
gcov-exec: llvm-cov-11 gcov
codecov: ubuntu_clang_pigz

- name: Ubuntu Clang No Optim
os: ubuntu-latest
compiler: clang
packages: llvm-11 llvm-11-tools
gcov-exec: llvm-cov-11 gcov
codecov: ubuntu_clang_pigz_no_optim
cmake-args: -DWITH_OPTIM=OFF

# Use v2.6 due to NOTHREADS bug https://github.com/madler/pigz/issues/97
- name: Ubuntu Clang No Threads
os: ubuntu-latest
compiler: clang
packages: llvm-11 llvm-11-tools
gcov-exec: llvm-cov-11 gcov
codecov: ubuntu_clang_pigz_no_threads
cmake-args: -DWITH_THREADS=OFF -DPIGZ_VERSION=v2.6

- name: Ubuntu GCC AARCH64
os: ubuntu-latest
cmake-args: -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain-aarch64.cmake
packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross
codecov: ubuntu_gcc_pigz_aarch64

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Checkout test corpora
uses: actions/checkout@v3
with:
repository: zlib-ng/corpora
path: test/data/corpora

- name: Add ubuntu mirrors
if: runner.os == 'Linux' && matrix.packages
run: |
# Github Actions caching proxy is at times unreliable
echo -e 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
sudo sed -i 's#http://azure.archive.ubuntu.com/ubuntu/#mirror+file:/etc/apt/mirrors.txt#' /etc/apt/sources.list
- name: Install packages (Ubuntu)
if: runner.os == 'Linux' && matrix.packages
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.packages }}
- name: Generate project files
run: |
cmake ${{ matrix.cmake-args }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} \
-DBUILD_SHARED_LIBS=OFF \
-DZLIB_ROOT=../.. \
-DWITH_CODE_COVERAGE=ON \
-DWITH_MAINTAINER_WARNINGS=ON
working-directory: test/pigz
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
LDFLAGS: ${{ matrix.ldflags }}
CI: true

- name: Compile source code
run: cmake --build . -j2 --config ${{ matrix.build-config || 'Release' }}
working-directory: test/pigz

- name: Run test cases
run: ctest --verbose -C Release --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '3' }}
working-directory: test/pigz

- name: Generate coverage report
if: matrix.codecov
run: |
python3 -u -m pip install --user gcovr==5.0
python3 -m gcovr -j 3 --verbose \
--exclude-unreachable-branches \
--gcov-executable "${{ matrix.gcov-exec || 'gcov' }}" \
--root . \
--xml --output coverage.xml
- name: Upload coverage report
uses: codecov/codecov-action@v3
if: matrix.codecov && (env.CODECOV_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng')
with:
token: ${{ secrets.CODECOV_TOKEN || 'e4fdf847-f541-4ab1-9d50-3d27e5913906' }}
flags: ${{ matrix.codecov }}
name: ${{ matrix.name }}
verbose: true
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}

- name: Upload build errors
uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{ matrix.name }} (cmake)
path: |
**/CMakeFiles/CMakeOutput.log
**/CMakeFiles/CMakeError.log
**/Testing/Temporary/*
coverage.xml
retention-days: 30
154 changes: 154 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.github/workflows/pkgcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
name: Package Check
on: [push, pull_request]
jobs:
pkgcheck:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu GCC
os: ubuntu-latest
compiler: gcc

- name: Ubuntu GCC -m32
os: ubuntu-latest
compiler: gcc
packages: gcc-multilib g++-multilib
cmake-args: -DCMAKE_C_FLAGS=-m32
cflags: -m32
ldflags: -m32

- name: Ubuntu GCC ARM SF
os: ubuntu-latest
chost: arm-linux-gnueabi
compiler: arm-linux-gnueabi-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm.cmake
packages: qemu gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libc-dev-armel-cross

- name: Ubuntu GCC AARCH64
os: ubuntu-latest
chost: aarch64-linux-gnu
compiler: aarch64-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-aarch64.cmake
packages: qemu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross

- name: Ubuntu GCC PPC
os: ubuntu-latest
chost: powerpc-linux-gnu
compiler: powerpc-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc.cmake
packages: qemu gcc-powerpc-linux-gnu g++-powerpc-linux-gnu libc6-dev-powerpc-cross

- name: Ubuntu GCC PPC64LE
os: ubuntu-latest
chost: powerpc64le-linux-gnu
compiler: powerpc64le-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc64le.cmake
packages: qemu gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu libc6-dev-ppc64el-cross

- name: macOS Clang
os: macOS-11
compiler: clang

- name: macOS Clang Native
os: macOS-11
compiler: clang
cmake-args: -DWITH_NATIVE_INSTRUCTIONS=ON
configure-args: --native

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Add ubuntu mirrors
if: runner.os == 'Linux' && matrix.packages
run: |
# Github Actions caching proxy is at times unreliable
echo -e 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
sudo sed -i 's#http://azure.archive.ubuntu.com/ubuntu/#mirror+file:/etc/apt/mirrors.txt#' /etc/apt/sources.list
- name: Install packages (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ${{ matrix.packages }} \
abigail-tools \
diffoscope \
ninja-build
- name: Install packages (macOS)
if: runner.os == 'macOS'
run: brew install ninja diffoscope ${{ matrix.packages }}
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1

- name: Select Xcode version (macOS)
# Use a version of Xcode that supports ZERO_AR_DATE until CMake supports
# AppleClang linking with libtool using -D argument
# https://gitlab.kitware.com/cmake/cmake/-/issues/19852
if: runner.os == 'macOS'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '11.7.0'

- name: Compare builds
run: sh test/pkgcheck.sh
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
CHOST: ${{ matrix.chost }}
CMAKE_ARGS: ${{ matrix.cmake-args }}
CONFIGURE_ARGS: ${{ matrix.configure-args }}
LDFLAGS: ${{ matrix.ldflags }}

- name: Compare builds (compat)
run: sh test/pkgcheck.sh --zlib-compat
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
CHOST: ${{ matrix.chost }}
CMAKE_ARGS: ${{ matrix.cmake-args }}
CONFIGURE_ARGS: ${{ matrix.configure-args }}
LDFLAGS: ${{ matrix.ldflags }}

- name: Check ABI
# macOS runner does not contain abigail
if: runner.os != 'macOS'
run: sh test/abicheck.sh --refresh-if
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
CHOST: ${{ matrix.chost }}
CMAKE_ARGS: ${{ matrix.cmake-args }}
CONFIGURE_ARGS: ${{ matrix.configure-args }}
LDFLAGS: ${{ matrix.ldflags }}

- name: Check ABI (compat)
# macOS runner does not contain abigail
if: runner.os != 'macOS'
run: sh test/abicheck.sh --zlib-compat --refresh-if
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
CHOST: ${{ matrix.chost }}
CMAKE_ARGS: ${{ matrix.cmake-args }}
CONFIGURE_ARGS: ${{ matrix.configure-args }}
LDFLAGS: ${{ matrix.ldflags }}

- name: Upload build errors
uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{ matrix.name }}
path: |
**/*.abi
btmp1/configure.log
btmp1/CMakeFiles/CMakeOutput.log
btmp1/CMakeFiles/CMakeError.log
btmp2/configure.log
btmp2/CMakeFiles/CMakeOutput.log
btmp2/CMakeFiles/CMakeError.log
retention-days: 30
100 changes: 100 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Release
on:
push:
tags:
- '*'
jobs:
release:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows MSVC Win32
os: windows-latest
compiler: cl
cmake-args: -A Win32
deploy-name: win-x86

- name: Windows MSVC Win32 Compat
os: windows-latest
compiler: cl
cmake-args: -A Win32 -DZLIB_COMPAT=ON
deploy-name: win-x86-compat

- name: Windows MSVC Win64
os: windows-latest
compiler: cl
cmake-args: -A x64
deploy-name: win-x86-64

- name: Windows MSVC Win64 Compat
os: windows-latest
compiler: cl
cmake-args: -A x64 -DZLIB_COMPAT=ON
deploy-name: win-x86-64-compat

- name: Windows MSVC ARM
os: windows-latest
compiler: cl
cmake-args: -A ARM
deploy-name: win-arm

- name: Windows MSVC ARM Compat
os: windows-latest
compiler: cl
cmake-args: -A ARM -DZLIB_COMPAT=ON
deploy-name: win-arm-compat

- name: Windows MSVC ARM64
os: windows-latest
compiler: cl
cmake-args: -A ARM64
deploy-name: win-arm64

- name: Windows MSVC ARM64 Compat
os: windows-latest
compiler: cl
cmake-args: -A ARM64 -DZLIB_COMPAT=ON
deploy-name: win-arm64-compat

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set environment variables
shell: bash
run: echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Generate project files
shell: bash
run: |
cmake . ${{ matrix.cmake-args }} \
-DCMAKE_BUILD_TYPE=Release \
-DZLIB_ENABLE_TESTS=ON \
-DCMAKE_INSTALL_PREFIX=out \
-DINSTALL_UTILS=ON
env:
CC: ${{ matrix.compiler }}
CI: true

- name: Compile source code
run: cmake --build . -j2 --config Release --target install

- name: Package release (Windows)
if: runner.os == 'Windows'
run: 7z a -tzip ../zlib-ng-${{ matrix.deploy-name }}.zip bin include lib ../LICENSE.md ../PORTING.md ../README.md
working-directory: out

- name: Upload release (Windows)
uses: svenstaro/upload-release-action@v2
if: runner.os == 'Windows'
with:
asset_name: zlib-ng-${{ matrix.deploy-name }}.zip
file: zlib-ng-${{ matrix.deploy-name }}.zip
tag: ${{env.tag}}
repo_token: ${{ secrets.GITHUB_TOKEN }}
overwrite: true
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
88 changes: 88 additions & 0 deletions internal-complibs/zlib-ng-2.0.7/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
*.diff
*.patch
*.orig
*.rej

*~
*.a
*.lo
*.o
*.dylib

*.gcda
*.gcno
*.gcov

/adler32_test
/adler32_testsh
/crc32_test
/crc32_testsh
/example
/example64
/examplesh
/libz.so*
/libz-ng.so*
/makefixed
/minigzip
/minigzip64
/minigzipsh
/switchlevels
/zlib.pc
/zlib-ng.pc
/CVE-2003-0107

.DS_Store
*_fuzzer
*.obj
*.exe
*.pdb
*.exp
*.lib
*.dll
*.res
foo.gz
*.manifest
*.opensdf
*.sln
*.sdf
*.vcxproj
*.vcxproj.filters
.vs

CMakeCache.txt
CMakeFiles
Testing
/*.cmake
*.stackdump
*._h
zconf.h
zconf.h.cmakein
zconf.h.included
zconf-ng.h
zconf-ng.h.cmakein
ztest*

configure.log
a.out

/Makefile
/arch/arm/Makefile
/arch/generic/Makefile
/arch/power/Makefile
/arch/x86/Makefile
.kdev4
*.kdev4

/Debug
/example.dir
/minigzip.dir
/zlib.dir
/zlibstatic.dir
/win32/Debug
/build/
/build[.-]*/
/btmp[12]/
/pkgtmp[12]/

/.idea
/cmake-build-debug
300 changes: 0 additions & 300 deletions internal-complibs/zlib-ng-2.0.7/crc32_comb_tbl._h

This file was deleted.

444 changes: 0 additions & 444 deletions internal-complibs/zlib-ng-2.0.7/crc32_tbl._h

This file was deleted.

94 changes: 0 additions & 94 deletions internal-complibs/zlib-ng-2.0.7/inffixed_tbl._h

This file was deleted.

132 changes: 0 additions & 132 deletions internal-complibs/zlib-ng-2.0.7/trees_tbl._h

This file was deleted.

201 changes: 0 additions & 201 deletions internal-complibs/zlib-ng-2.0.7/zconf.h

This file was deleted.

201 changes: 0 additions & 201 deletions internal-complibs/zlib-ng-2.0.7/zconf.h.included

This file was deleted.