forked from madler/zlib
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '04f42ceca40f73e2978b50e93806c2a18c1281fc'
- Loading branch information
Showing
95 changed files
with
925 additions
and
969 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: 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 | ||
|
||
# Test out of source builds | ||
- name: Ubuntu GCC OSB | ||
os: ubuntu-latest | ||
compiler: gcc | ||
build-dir: ../build | ||
src-dir: ../zlib | ||
|
||
- name: Ubuntu GCC -O3 | ||
os: ubuntu-latest | ||
compiler: gcc | ||
cflags: -O3 | ||
|
||
- name: Ubuntu Clang | ||
os: ubuntu-latest | ||
compiler: clang | ||
|
||
- name: Ubuntu Clang Debug | ||
os: ubuntu-latest | ||
compiler: clang | ||
build-config: Debug | ||
|
||
- 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 GCC | ||
os: windows-latest | ||
compiler: gcc | ||
cmake-args: -G Ninja | ||
|
||
- name: macOS Clang | ||
os: macos-latest | ||
compiler: clang | ||
|
||
- name: macOS GCC | ||
os: macos-latest | ||
compiler: gcc-9 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install packages (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
choco install --no-progress ninja ${{ matrix.packages }} | ||
- name: Generate project files | ||
run: cmake -S ${{ matrix.src-dir || '.' }} -B ${{ matrix.build-dir || '.' }} ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} | ||
env: | ||
CC: ${{ matrix.compiler }} | ||
CFLAGS: ${{ matrix.cflags }} | ||
|
||
- name: Compile source code | ||
run: cmake --build ${{ matrix.build-dir || '.' }} --config ${{ matrix.build-config || 'Release' }} | ||
|
||
- name: Run test cases | ||
run: ctest -C Release --output-on-failure --max-width 120 | ||
working-directory: ${{ matrix.build-dir || '.' }} | ||
|
||
- name: Upload build errors | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: ${{ matrix.name }} (cmake) | ||
path: | | ||
**/CMakeFiles/CMakeOutput.log | ||
**/CMakeFiles/CMakeError.log | ||
retention-days: 7 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
name: 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 | ||
|
||
# Test out of source builds | ||
- name: Ubuntu GCC OSB | ||
os: ubuntu-latest | ||
compiler: gcc | ||
configure-args: --warn | ||
build-dir: ../build | ||
src-dir: ../zlib | ||
|
||
- 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 | ||
qemu-run: qemu-arm -L /usr/arm-linux-gnueabi | ||
|
||
- name: Ubuntu GCC ARM HF | ||
os: ubuntu-latest | ||
compiler: arm-linux-gnueabihf-gcc | ||
configure-args: --warn | ||
chost: arm-linux-gnueabihf | ||
packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armhf-cross | ||
qemu-run: qemu-arm -L /usr/arm-linux-gnueabihf | ||
|
||
- 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 | ||
qemu-run: qemu-aarch64 -L /usr/aarch64-linux-gnu | ||
|
||
- 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 | ||
qemu-run: qemu-ppc -L /usr/powerpc-linux-gnu | ||
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 | ||
qemu-run: qemu-ppc64 -L /usr/powerpc64-linux-gnu | ||
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 | ||
qemu-run: qemu-ppc64le -L /usr/powerpc64le-linux-gnu | ||
|
||
- 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 | ||
qemu-run: qemu-s390x -L /usr/s390x-linux-gnu | ||
cflags: -static | ||
ldflags: -static | ||
|
||
- name: macOS GCC | ||
os: macos-latest | ||
compiler: gcc-9 | ||
configure-args: --warn | ||
|
||
- name: macOS Clang | ||
os: macos-latest | ||
compiler: clang | ||
configure-args: --warn | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- 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: | | ||
[ -d ${{ matrix.build-dir || '.' }} ] || mkdir ${{ matrix.build-dir || '.' }} | ||
cd ${{ matrix.build-dir || '.' }} | ||
${{ matrix.src-dir || '.' }}/configure ${{ matrix.configure-args }} | ||
env: | ||
CC: ${{ matrix.compiler }} | ||
CFLAGS: ${{ matrix.cflags }} | ||
LDFLAGS: ${{ matrix.ldflags }} | ||
CHOST: ${{ matrix.chost }} | ||
|
||
- name: Compile source code | ||
run: make -j2 | ||
working-directory: ${{ matrix.build-dir }} | ||
|
||
- name: Run test cases | ||
run: | | ||
make test | ||
make cover | ||
working-directory: ${{ matrix.build-dir }} | ||
env: | ||
QEMU_RUN: ${{ matrix.qemu-run }} | ||
|
||
- name: Upload build errors | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: ${{ matrix.name }} (configure) | ||
path: | | ||
${{ matrix.build-dir || '.' }}/configure.log | ||
retention-days: 7 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: OSS-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' | ||
dry-run: false | ||
|
||
- name: Run Fuzzers | ||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master | ||
with: | ||
oss-fuzz-project-name: 'zlib' | ||
fuzz-seconds: 300 | ||
dry-run: false | ||
|
||
- name: Upload Crash | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: artifacts | ||
path: ./out/artifacts |
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
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
Oops, something went wrong.