[Library] Update zlibng (#1255)

* Update zlibng

* Set cmake path more directly in zlibng to hopefully fix an issue with the build on drone

* I'm dumb, missing / in path

* Mackal helps with a dumb gitignore issue

* Adding all the files, not sure what's ignoring them and im tired of looking

* Some tweaks to zlibng build to hopefully get it to build properly. works on msvc now
This commit is contained in:
Alex
2021-02-23 17:00:26 -08:00
committed by GitHub
parent e6dee96266
commit 2957f5084d
184 changed files with 22029 additions and 11703 deletions
+39
View File
@@ -0,0 +1,39 @@
name: CI Static Analysis
on: [push, pull_request]
jobs:
GCC-10:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install packages (Ubuntu)
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
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 . --config Release > /dev/null
Clang-12:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install packages (Ubuntu)
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" -y
sudo apt install clang-tools-12 -y
- name: Generate project files
run: |
scan-build-12 --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-12 --status-bugs cmake --build . --config Release > /dev/null
+381
View File
@@ -0,0 +1,381 @@
name: CI CMake
on: [push, pull_request]
jobs:
ci-cmake:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu GCC
os: ubuntu-latest
compiler: gcc
cmake-args: -DWITH_SANITIZER=Address
codecov: ubuntu_gcc
- name: Ubuntu GCC OSB -O1 No Unaligned64
os: ubuntu-latest
compiler: gcc
cmake-args: -DWITH_UNALIGNED=ON -DUNALIGNED64_OK=OFF -DWITH_SANITIZER=Undefined
build-dir: ../build
build-src-dir: ../zlib-ng
codecov: ubuntu_gcc_osb
cflags: -O1 -g3
- name: Ubuntu GCC -O3 No Unaligned
os: ubuntu-latest
compiler: gcc
cmake-args: -DWITH_UNALIGNED=OFF
codecov: ubuntu_gcc_o3
cflags: -O3
- name: Ubuntu GCC Link Zlib
os: ubuntu-latest
compiler: gcc
cmake-args: -DZLIB_DUAL_LINK=ON
- name: Ubuntu GCC No AVX2
os: ubuntu-latest
compiler: gcc
cmake-args: -DWITH_AVX2=OFF -DWITH_SANITIZER=Undefined
codecov: ubuntu_gcc_no_avx2
- name: Ubuntu GCC No SSE2
os: ubuntu-latest
compiler: gcc
cmake-args: -DWITH_SSE2=OFF -DWITH_SANITIZER=Undefined
codecov: ubuntu_gcc_no_sse2
- name: Ubuntu GCC No SSE4
os: ubuntu-latest
compiler: gcc
cmake-args: -DWITH_SSE4=OFF -DWITH_SANITIZER=Undefined
codecov: ubuntu_gcc_no_sse4
- name: Ubuntu GCC No PCLMULQDQ
os: ubuntu-latest
compiler: gcc
cmake-args: -DWITH_PCLMULQDQ=OFF -DWITH_SANITIZER=Undefined
codecov: ubuntu_gcc_no_pclmulqdq
- name: Ubuntu GCC Compat No Opt
os: ubuntu-latest
compiler: gcc
cmake-args: -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF -DWITH_OPTIM=OFF -DWITH_SANITIZER=Address
codecov: ubuntu_gcc_compat_no_opt
cflags: -DNOT_TWEAK_COMPILER
- name: Ubuntu GCC ARM SF
os: ubuntu-latest
compiler: arm-linux-gnueabi-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm.cmake -DCMAKE_C_COMPILER_TARGET=arm-linux-gnueabi -DWITH_SANITIZER=Address
packages: qemu gcc-arm-linux-gnueabi libc-dev-armel-cross
codecov: ubuntu_gcc_armsf
- name: Ubuntu GCC ARM SF Compat No Opt
os: ubuntu-latest
compiler: arm-linux-gnueabi-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm.cmake -DCMAKE_C_COMPILER_TARGET=arm-linux-gnueabi -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF -DWITH_OPTIM=OFF -DWITH_SANITIZER=Undefined
packages: qemu gcc-arm-linux-gnueabi libc-dev-armel-cross
codecov: ubuntu_gcc_armsf_compat_no_opt
- name: Ubuntu GCC ARM HF
os: ubuntu-latest
compiler: arm-linux-gnueabihf-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm.cmake -DCMAKE_C_COMPILER_TARGET=arm-linux-gnueabihf -DWITH_SANITIZER=Address
packages: qemu gcc-arm-linux-gnueabihf libc-dev-armel-cross
codecov: ubuntu_gcc_armhf
- name: Ubuntu GCC ARM HF No ACLE
os: ubuntu-latest
compiler: arm-linux-gnueabihf-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm.cmake -DCMAKE_C_COMPILER_TARGET=arm-linux-gnueabihf -DWITH_ACLE=OFF -DWITH_SANITIZER=Address
packages: qemu gcc-arm-linux-gnueabihf libc-dev-armel-cross
codecov: ubuntu_gcc_armhf_no_acle
- name: Ubuntu GCC ARM HF No NEON
os: ubuntu-latest
compiler: arm-linux-gnueabihf-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm.cmake -DCMAKE_C_COMPILER_TARGET=arm-linux-gnueabihf -DWITH_NEON=OFF -DWITH_SANITIZER=Address
packages: qemu gcc-arm-linux-gnueabihf libc-dev-armel-cross
codecov: ubuntu_gcc_armhf_no_neon
- name: Ubuntu GCC ARM HF Compat No Opt
os: ubuntu-latest
compiler: arm-linux-gnueabihf-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm.cmake -DCMAKE_C_COMPILER_TARGET=arm-linux-gnueabihf -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF -DWITH_OPTIM=OFF -DWITH_SANITIZER=Undefined
packages: qemu gcc-arm-linux-gnueabihf libc-dev-armel-cross
codecov: ubuntu_gcc_armhf_compat_no_opt
- name: Ubuntu GCC AARCH64
os: ubuntu-latest
compiler: aarch64-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-aarch64.cmake -DWITH_SANITIZER=Address
asan-options: detect_leaks=0
packages: qemu gcc-aarch64-linux-gnu libc-dev-arm64-cross
codecov: ubuntu_gcc_aarch64
- name: Ubuntu GCC AARCH64 No ACLE
os: ubuntu-latest
compiler: aarch64-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-aarch64.cmake -DWITH_ACLE=OFF -DWITH_SANITIZER=Undefined
asan-options: detect_leaks=0
packages: qemu gcc-aarch64-linux-gnu libc-dev-arm64-cross
codecov: ubuntu_gcc_aarch64_no_acle
- name: Ubuntu GCC AARCH64 No NEON
os: ubuntu-latest
compiler: aarch64-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-aarch64.cmake -DWITH_NEON=OFF -DWITH_SANITIZER=Undefined
asan-options: detect_leaks=0
packages: qemu gcc-aarch64-linux-gnu libc-dev-arm64-cross
codecov: ubuntu_gcc_aarch64_no_neon
- name: Ubuntu GCC AARCH64 Compat No Opt
os: ubuntu-latest
compiler: aarch64-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-aarch64.cmake -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF -DWITH_OPTIM=OFF -DWITH_SANITIZER=Undefined
asan-options: detect_leaks=0
packages: qemu gcc-aarch64-linux-gnu libc-dev-arm64-cross
codecov: ubuntu_gcc_aarch64_compat_no_opt
- name: Ubuntu GCC PPC
os: ubuntu-latest
compiler: powerpc-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc.cmake
packages: qemu gcc-powerpc-linux-gnu libc-dev-powerpc-cross
ldflags: -static
codecov: ubuntu_gcc_ppc
- name: Ubuntu GCC PPC64
os: ubuntu-latest
compiler: powerpc64-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc64.cmake
packages: qemu gcc-powerpc64-linux-gnu libc-dev-ppc64-cross
ldflags: -static
codecov: ubuntu_gcc_ppc64
- name: Ubuntu GCC PPC64LE
os: ubuntu-latest
compiler: powerpc64le-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-powerpc64le.cmake
packages: qemu gcc-powerpc64le-linux-gnu libc-dev-ppc64el-cross
codecov: ubuntu_gcc_ppc64le
- name: Ubuntu GCC SPARC64
os: ubuntu-latest
compiler: sparc64-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-sparc64.cmake
packages: qemu gcc-sparc64-linux-gnu libc-dev-sparc64-cross
ldflags: -static
codecov: ubuntu_gcc_sparc64
- name: Ubuntu GCC S390X
os: ubuntu-latest
compiler: s390x-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-s390x.cmake -DWITH_SANITIZER=Address
packages: qemu gcc-s390x-linux-gnu libc-dev-s390x-cross
ldflags: -static
codecov: ubuntu_gcc_s390x
- name: Ubuntu GCC S390X DFLTCC
os: ubuntu-latest
compiler: s390x-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-s390x.cmake -DWITH_DFLTCC_DEFLATE=ON -DWITH_DFLTCC_INFLATE=ON -DWITH_SANITIZER=Address
packages: qemu gcc-s390x-linux-gnu libc-dev-s390x-cross
ldflags: -static
codecov: ubuntu_gcc_s390x
- name: Ubuntu GCC S390X DFLTCC Compat
os: ubuntu-latest
compiler: s390x-linux-gnu-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-s390x.cmake -DZLIB_COMPAT=ON -DWITH_DFLTCC_DEFLATE=ON -DWITH_DFLTCC_INFLATE=ON -DWITH_SANITIZER=Undefined
packages: qemu gcc-s390x-linux-gnu libc-dev-s390x-cross
ldflags: -static
codecov: ubuntu_gcc_s390x
- name: Ubuntu MinGW i686
os: ubuntu-latest
compiler: i686-w64-mingw32-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mingw-i686.cmake
packages: wine32 gcc-mingw-w64
# Codecov disabled due to gcov locking issue error
- name: Ubuntu MinGW x86_64
os: ubuntu-latest
compiler: x86_64-w64-mingw32-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-mingw-x86_64.cmake
packages: wine-stable gcc-mingw-w64
codecov: ubuntu_gcc_mingw_x86_64
- name: Ubuntu Clang
os: ubuntu-latest
compiler: clang
packages: llvm-6.0
gcov-exec: llvm-cov-6.0 gcov
codecov: ubuntu_clang
- name: Ubuntu Clang Inflate Strict
os: ubuntu-latest
compiler: clang
cmake-args: -DWITH_INFLATE_STRICT=ON
packages: llvm-6.0
gcov-exec: llvm-cov-6.0 gcov
codecov: ubuntu_clang_inflate_strict
- name: Ubuntu Clang Inflate Allow Invalid Dist
os: ubuntu-latest
compiler: clang
cmake-args: -DWITH_INFLATE_ALLOW_INVALID_DIST=ON
packages: llvm-6.0
gcov-exec: llvm-cov-6.0 gcov
codecov: ubuntu_clang_inflate_allow_invalid_dist
- name: Ubuntu Clang Memory Map
os: ubuntu-latest
compiler: clang
cflags: -DUSE_MMAP
packages: llvm-6.0
gcov-exec: llvm-cov-6.0 gcov
codecov: ubuntu_clang_mmap
- name: Ubuntu Clang Debug
os: ubuntu-latest
compiler: clang
packages: llvm-6.0
gcov-exec: llvm-cov-6.0 gcov
codecov: ubuntu_clang_debug
build-config: Debug
- name: Ubuntu Clang MSAN
os: ubuntu-latest
compiler: clang
cmake-args: -GNinja -DWITH_SANITIZER=Memory
packages: ninja-build llvm-6.0
gcov-exec: llvm-cov-6.0 gcov
cflags: -g3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize-memory-track-origins
codecov: ubuntu_clang_msan
- name: Windows MSVC Win32
os: windows-latest
compiler: cl
cmake-args: -A Win32
- name: Windows MSVC Win64
os: windows-latest
compiler: cl
cmake-args: -A x64
- name: Windows MSVC ARM No Test
os: windows-latest
compiler: cl
cmake-args: -A ARM
- name: Windows MSVC ARM64 No Test
os: windows-latest
compiler: cl
cmake-args: -A ARM64
- name: Windows GCC
os: windows-latest
compiler: gcc
cmake-args: -G Ninja
codecov: win64_gcc
- name: Windows GCC Compat No Opt
os: windows-latest
compiler: gcc
cmake-args: -G Ninja -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF -DWITH_OPTIM=OFF
codecov: win64_gcc_compat_no_opt
- name: macOS Clang
os: macos-latest
compiler: clang
cmake-args: -DWITH_SANITIZER=Address
codecov: macos_clang
- name: macOS GCC
os: macos-latest
compiler: gcc-10
cmake-args: -DWITH_SANITIZER=Undefined
packages: gcc@10
gcov-exec: gcov-10
codecov: macos_gcc
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout test corpora
uses: actions/checkout@v2
with:
repository: nmoinvaz/corpora
path: test/data/corpora
- name: Install packages (Ubuntu)
if: runner.os == 'Linux' && matrix.packages
run: |
sudo dpkg --add-architecture i386 # Required for wine32
sudo apt-get update
sudo apt-get install -y ${{ matrix.packages }}
- name: Install packages (Windows)
if: runner.os == 'Windows'
run: |
choco install ninja ${{ matrix.packages }} --no-progress
- name: Install packages (macOS)
if: runner.os == 'macOS'
run: |
brew install ninja ${{ matrix.packages }}
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Install codecov.io tools
if: matrix.codecov
run: |
python -u -m pip install codecov
- name: Generate project files
# Shared libaries turned off for qemu ppc* and sparc & reduce code coverage sources
run: |
mkdir ${{ matrix.build-dir || '.not-used' }}
cd ${{ matrix.build-dir || '.' }}
cmake ${{ matrix.build-src-dir || '.' }} ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} -DBUILD_SHARED_LIBS=OFF -DWITH_FUZZERS=ON -DWITH_CODE_COVERAGE=ON -DWITH_MAINTAINER_WARNINGS=ON
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
LDFLAGS: ${{ matrix.ldflags }}
CI: true
- name: Compile source code
run: |
cd ${{ matrix.build-dir || '.' }}
cmake --build . --config ${{ matrix.build-config || 'Release' }}
- name: Run test cases
# Don't run tests on Windows ARM
if: runner.os != 'Windows' || contains(matrix.name, 'ARM') == false
run: |
cd ${{ matrix.build-dir || '.' }}
ctest --verbose -C Release --output-on-failure --max-width 120 -j 6
env:
ASAN_OPTIONS: ${{ matrix.asan-options || 'verbosity=0' }}:abort_on_error=1
MSAN_OPTIONS: ${{ matrix.msan-options || 'verbosity=0' }}:abort_on_error=1
TSAN_OPTIONS: ${{ matrix.tsan-options || 'verbosity=0' }}:abort_on_error=1
LSAN_OPTIONS: ${{ matrix.lsan-options || 'verbosity=0' }}:abort_on_error=1
- name: Upload coverage report
if: matrix.codecov && ( env.CODECOV_TOKEN_SECRET != '' || github.repository == 'zlib-ng/zlib-ng' )
shell: bash
run: |
bash tools/codecov-upload.sh
env:
# Codecov does not yet support GitHub Actions
CODECOV_TOKEN_SECRET: "${{secrets.CODECOV_TOKEN}}"
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN || 'e4fdf847-f541-4ab1-9d50-3d27e5913906' }}"
CODECOV_FLAGS: "${{ matrix.codecov }}"
CODECOV_NAME: "${{ matrix.name }}"
CODECOV_EXEC: "${{ matrix.gcov-exec || 'gcov' }}"
CODECOV_DIR: "${{ matrix.build-dir || '.' }}"
+185
View File
@@ -0,0 +1,185 @@
name: CI Configure
on: [push, pull_request]
jobs:
ci-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 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 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 gcc-arm-linux-gnueabi libc-dev-armel-cross
- name: Ubuntu GCC ARM HF
os: ubuntu-latest
compiler: arm-linux-gnueabihf-gcc
configure-args: --warn
chost: arm-linux-gnueabihf
packages: qemu gcc-arm-linux-gnueabihf 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 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
chost: arm-linux-gnueabihf
packages: qemu 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 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 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 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 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 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 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 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 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 gcc-s390x-linux-gnu libc-dev-s390x-cross
cflags: -static
ldflags: -static
- name: Ubuntu GCC S390X DFLTCC
os: ubuntu-latest
compiler: s390x-linux-gnu-gcc
configure-args: --warn --static --with-dfltcc-deflate --with-dfltcc-inflate
chost: s390x-linux-gnu
packages: qemu gcc-s390x-linux-gnu libc-dev-s390x-cross
cflags: -static
ldflags: -static
- name: Ubuntu GCC S390X DFLTCC Compat
os: ubuntu-latest
compiler: s390x-linux-gnu-gcc
configure-args: --warn --zlib-compat --static --with-dfltcc-deflate --with-dfltcc-inflate
chost: s390x-linux-gnu
packages: qemu gcc-s390x-linux-gnu libc-dev-s390x-cross
cflags: -static
ldflags: -static
- name: macOS GCC
os: macOS-latest
compiler: gcc
configure-args: --warn
steps:
- name: Checkout repository
uses: actions/checkout@v1
- 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.build-src-dir || '.' }}/configure ${{ matrix.configure-args }}
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
LDFLAGS: ${{ matrix.ldflags }}
CHOST: ${{ matrix.chost }}
CI: true
- name: Compile source code
run: |
cd ${{ matrix.build-dir || '.' }}
make -j2
- name: Run test cases
run: |
cd ${{ matrix.build-dir || '.' }}
make test
+23
View File
@@ -0,0 +1,23 @@
name: CI Fuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'zlib-ng'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'zlib-ng'
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v1
if: failure()
with:
name: artifacts
path: ./out/artifacts
+46
View File
@@ -0,0 +1,46 @@
name: CI Libpng
on: [pull_request]
jobs:
pngtest:
name: Ubuntu Clang
runs-on: ubuntu-latest
steps:
- name: Checkout repository (zlib-ng)
uses: actions/checkout@v1
- 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 . --config Release
- name: Checkout repository (libpng)
uses: actions/checkout@v2
with:
repository: glennrp/libpng
path: libpng
- name: Generate project files (libpng)
run: |
cd libpng
cmake . -DCMAKE_BUILD_TYPE=Release -DPNG_TESTS=ON -DPNG_STATIC=OFF -DZLIB_INCLUDE_DIR=.. -DZLIB_LIBRARY=$PWD/../libz.a
env:
CC: clang
CI: true
- name: Compile source code (libpng)
run: |
cd libpng
cmake --build . --config Release
- name: Run test cases (libpng)
run: |
cd libpng
ctest -C Release --output-on-failure --max-width 120
+48
View File
@@ -0,0 +1,48 @@
name: CI NMake
on: [push, pull_request]
jobs:
ci-cmake:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows NMake x86
os: windows-latest
makefile: win32/Makefile.msc
vc-vars: x86
- name: Windows NMake x64
os: windows-latest
makefile: win32/Makefile.msc
vc-vars: x86_amd64
- name: Windows NMake ARM No Test
os: windows-latest
makefile: win32/Makefile.arm
vc-vars: x86_arm
- name: Windows NMake ARM64 No Test
os: windows-latest
makefile: win32/Makefile.a64
vc-vars: x86_arm64
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Compile source code
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.vc-vars }}
nmake -f ${{ matrix.makefile }}
- name: Run test cases
shell: cmd
# Don't run tests on Windows ARM
if: contains(matrix.vc-vars, 'arm') == false
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.vc-vars }}
nmake -f ${{ matrix.makefile }} test
nmake -f ${{ matrix.makefile }} testdll
+121
View File
@@ -0,0 +1,121 @@
name: CI Pkgcheck
on: [push, pull_request]
jobs:
ci-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
cmake-args: -DCMAKE_C_FLAGS=-m32
cflags: -m32
ldflags: -m32
- name: Ubuntu GCC ARM HF
os: ubuntu-latest
chost: arm-linux-gnueabihf
compiler: arm-linux-gnueabihf-gcc
cmake-args: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-arm.cmake -DCMAKE_C_COMPILER_TARGET=arm-linux-gnueabihf
packages: qemu gcc-arm-linux-gnueabihf libc6-dev-armhf-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 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 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 libc6-dev-ppc64el-cross
- name: macOS Clang
os: macOS-latest
compiler: clang
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install packages (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends abigail-tools ninja-build diffoscope ${{ matrix.packages }}
- 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: '12.1.1'
- name: Compare builds
run: |
sh test/pkgcheck.sh
env:
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.cflags }}
CHOST: ${{ matrix.chost }}
CMAKE_ARGS: ${{ matrix.cmake-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 }}
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 }}
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 }}
LDFLAGS: ${{ matrix.ldflags }}
+73
View File
@@ -0,0 +1,73 @@
name: CI Release
on:
push:
tags:
- '*'
jobs:
ci-cmake:
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: win32
- name: Windows MSVC Win32 Compat
os: windows-latest
compiler: cl
cmake-args: -A Win32 -DZLIB_COMPAT=ON
deploy-name: win32-compat
- name: Windows MSVC Win64
os: windows-latest
compiler: cl
cmake-args: -A x64
deploy-name: win64
- name: Windows MSVC Win64 Compat
os: windows-latest
compiler: cl
cmake-args: -A x64 -DZLIB_COMPAT=ON
deploy-name: win64-compat
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Set environment variables
shell: bash
run: echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Generate project files
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 . --config Release --target install
- name: Package release (Windows)
if: runner.os == 'Windows'
run: |
cd out
7z a -tzip ../zlib-ng-${{ matrix.deploy-name }}.zip bin include lib ../LICENSE.md ../README.md
- name: Upload release (Windows)
uses: svenstaro/upload-release-action@v1-release
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 }}"