mirror of
https://github.com/facebook/zstd.git
synced 2025-10-04 00:02:33 -04:00
since it fails on Github Actions specifically. The test is run on TravisCI for the time being. Its duration has been reduced to ~6mn anyway.
237 lines
7.6 KiB
YAML
237 lines
7.6 KiB
YAML
name: dev-short-tests
|
|
# Faster tests: mostly build tests, along with some other
|
|
# misc tests
|
|
|
|
concurrency:
|
|
group: fast-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ dev, release, actionsTest ]
|
|
|
|
jobs:
|
|
linux-kernel:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: linux kernel, library + build + test
|
|
run: make -C contrib/linux-kernel test CFLAGS="-Werror -Wunused-const-variable -Wunused-but-set-variable"
|
|
|
|
benchmarking:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: make benchmarking
|
|
run: make benchmarking
|
|
|
|
check-32bit: # designed to catch https://github.com/facebook/zstd/issues/2428
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: make check on 32-bit
|
|
run: |
|
|
sudo apt update
|
|
APT_PACKAGES="gcc-multilib" make apt-install
|
|
CFLAGS="-m32 -O1 -fstack-protector" make check V=1
|
|
|
|
gcc-7-libzstd:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: gcc-7 + libzstdmt compilation
|
|
run: |
|
|
sudo apt-get -qqq update
|
|
make gcc7install
|
|
CC=gcc-7 CFLAGS=-Werror make -j all
|
|
make clean
|
|
LDFLAGS=-Wl,--no-undefined make -C lib libzstd-mt
|
|
|
|
# candidate test (to check) : underlink test
|
|
# LDFLAGS=-Wl,--no-undefined : will make the linker fail if dll is underlinked
|
|
|
|
cmake-build-and-test-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: cmake build and test check
|
|
run: |
|
|
FUZZERTEST=-T1mn ZSTREAM_TESTTIME=-T1mn make cmakebuild
|
|
cp -r ./ "../zstd source"
|
|
cd "../zstd source"
|
|
FUZZERTEST=-T1mn ZSTREAM_TESTTIME=-T1mn make cmakebuild
|
|
|
|
cpp-gnu90-c99-compatibility:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: C++, gnu90 and c99 compatibility
|
|
run: |
|
|
make cxxtest
|
|
make clean
|
|
make gnu90build
|
|
make clean
|
|
make c99build
|
|
make clean
|
|
make travis-install # just ensures `make install` works
|
|
|
|
mingw-cross-compilation:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: mingw cross-compilation
|
|
run: |
|
|
# sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; (doesn't work)
|
|
sudo apt-get -qqq update
|
|
sudo apt-get install gcc-mingw-w64
|
|
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CFLAGS="-Werror -O1" make zstd
|
|
|
|
armbuild:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: ARM Build Test
|
|
run: |
|
|
sudo apt-get -qqq update
|
|
make arminstall
|
|
make armbuild
|
|
|
|
bourne-shell:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bourne shell compatibility (shellcheck)
|
|
run: |
|
|
wget https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz
|
|
tar -xf shellcheck-v0.7.1.linux.x86_64.tar.xz
|
|
shellcheck-v0.7.1/shellcheck --shell=sh --severity=warning --exclude=SC2010 tests/playTests.sh
|
|
|
|
zlib-wrapper:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: zlib wrapper test
|
|
run: |
|
|
sudo apt-get -qqq update
|
|
make valgrindinstall
|
|
make -C zlibWrapper test
|
|
make -C zlibWrapper valgrindTest
|
|
|
|
lz4-threadpool-partial-libs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: LZ4, thread pool, and partial libs testslib wrapper test
|
|
run: |
|
|
make lz4install
|
|
make -C tests test-lz4
|
|
make check < /dev/null | tee # mess with lz4 console detection
|
|
make clean
|
|
make -C tests test-pool
|
|
make clean
|
|
bash tests/libzstd_partial_builds.sh
|
|
|
|
gcc-make-tests-32bit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Make all, 32bit mode
|
|
run: |
|
|
sudo apt-get -qqq update
|
|
make libc6install
|
|
CFLAGS="-Werror -m32" make -j all32
|
|
|
|
gcc-8-make:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: gcc-8 build
|
|
run: |
|
|
sudo apt-get -qqq update
|
|
make gcc8install
|
|
CC=gcc-8 CFLAGS="-Werror" make -j all
|
|
|
|
visual-2019:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
platform: [x64, Win32]
|
|
configuration: [Debug, Release]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Add MSBuild to PATH
|
|
uses: microsoft/setup-msbuild@v1.0.2
|
|
- name: Build
|
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
|
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
|
|
run: >
|
|
msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v142
|
|
/t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}}
|
|
|
|
visual-2015:
|
|
# only GH actions windows-2016 contains VS 2015
|
|
runs-on: windows-2016
|
|
strategy:
|
|
matrix:
|
|
platform: [x64, Win32]
|
|
configuration: [Debug, Release]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Add MSBuild to PATH
|
|
uses: microsoft/setup-msbuild@v1.0.2
|
|
- name: Build
|
|
working-directory: ${{env.GITHUB_WORKSPACE}}
|
|
run: >
|
|
msbuild "build\VS2010\zstd.sln" /m /verbosity:minimal /property:PlatformToolset=v140
|
|
/t:Clean,Build /p:Platform=${{matrix.platform}} /p:Configuration=${{matrix.configuration}}
|
|
|
|
minimal-decompressor-macros:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: minimal decompressor macros
|
|
run: |
|
|
make clean && make -j all ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror"
|
|
make clean && make check ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror"
|
|
make clean && make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
|
|
make clean && make check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X1 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT"
|
|
make clean && make -j all MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG"
|
|
make clean && make check MOREFLAGS="-Werror -DHUF_FORCE_DECOMPRESS_X2 -DZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG"
|
|
make clean && make -j all MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS"
|
|
make clean && make check MOREFLAGS="-Werror -DZSTD_NO_INLINE -DZSTD_STRIP_ERROR_STRINGS"
|
|
|
|
# This test currently fails on Github Actions specifically.
|
|
# No clear reason, as the same test works fine locally and on travisCI.
|
|
# This will have to be fixed before transfering the test to GA.
|
|
# versions-compatibility:
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# - uses: actions/checkout@v2
|
|
# - name: Versions Compatibility Test
|
|
# run: |
|
|
# make -C tests versionsTest
|
|
|
|
|
|
# For reference : icc tests
|
|
# icc tests are currently failing on Github Actions, likely to issues during installation stage
|
|
# To be fixed later
|
|
#
|
|
# icc:
|
|
# name: icc-check
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# - name: install icc
|
|
# run: |
|
|
# export DEBIAN_FRONTEND=noninteractive
|
|
# sudo apt-get -qqq update
|
|
# sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg
|
|
# sudo wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
|
# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
|
# sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
|
|
# sudo apt-get update
|
|
# sudo apt-get install -y intel-basekit intel-hpckit
|
|
# - uses: actions/checkout@v2
|
|
# - name: make check
|
|
# run: |
|
|
# make CC=/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icc check
|