-name: Build and test on push
+name: Build
on:
push:
pull_request:
name: ${{ matrix.config.name }} - testdir.tar.xz
path: testdir.tar.xz
- # These mimic the old Travis tests that are not replaced by standard_tests:
specific_tests:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
fail-fast: false
matrix:
config:
- # Job 1: Build (in source directory) on Linux with native GCC in release build mode
- name: Linux GCC release + tracing
os: ubuntu-18.04
CC: gcc
CMAKE_PARAMS: -DCMAKE_BUILD_TYPE=Release -DENABLE_TRACING=1
apt_get: elfutils libzstd1-dev
- # Job 2: Build on Linux with native 32-bit GCC
- name: Linux GCC 32-bit
os: ubuntu-18.04
CC: gcc
ENABLE_CACHE_CLEANUP_TESTS: 1
apt_get: elfutils gcc-multilib g++-multilib lib32stdc++-5-dev
- # Job 3: Build on Linux with native Clang moved to standard tests
-
- # Job 4: Build on Linux with native GCC and CUDA compiler
-
- name: Linux GCC CUDA
os: ubuntu-18.04
CC: gcc
CUDA: 10.1.243-1
apt_get: elfutils libzstd1-dev
- # Job 5: Build on Linux with 32-bit MinGW cross-compiler
- name: Linux MinGW 32-bit
os: ubuntu-18.04
CC: i686-w64-mingw32-gcc-posix
RUN_TESTS: 0
apt_get: elfutils mingw-w64
- # Job 6: Build on Linux with 64-bit MinGW cross-compiler
- name: Linux MinGW 64-bit
os: ubuntu-18.04
CC: x86_64-w64-mingw32-gcc-posix
RUN_TESTS: 0
apt_get: elfutils mingw-w64
- # Job 7: Build on MacOS with native Clang moved to standard tests
-
- # Job 8: Build with ENABLE_TRACING merged into Job 1
-
- # Job 9: Run Clang's undefined behavior sanitizer
- name: Clang UB sanitizer
os: ubuntu-20.04
CC: clang
ASAN_OPTIONS: detect_leaks=0
apt_get: elfutils libzstd-dev
- # Job 10: Run Clang's address sanitizer
- name: Clang address sanitizer
os: ubuntu-20.04
CC: clang
ASAN_OPTIONS: detect_leaks=0
apt_get: elfutils libzstd-dev
- # Job 11: Run Clang's static analyzer
- name: Clang static analyzer
os: ubuntu-20.04
CC: clang
path: /usr/bin
apt_get: libzstd-dev
- # Job 12: Build binary package, extract it out of source, run tests.
- name: Build binary and verify it
os: ubuntu-20.04
CC: clang
CMAKE_PARAMS: -DCMAKE_BUILD_TYPE=Release
apt_get: elfutils libzstd-dev
- # Job 13: Build source package, extract it out of source, run tests.
- name: Build source package and verify it
os: ubuntu-20.04
CC: clang
SPECIAL: build-and-verify-package-source
apt_get: elfutils libzstd-dev
- # Job 14: Build documentation
- name: Build documentation
os: ubuntu-18.04
EXTRA_CMAKE_BUILD_FLAGS: --target documentation
RUN_TESTS: 0
apt_get: libzstd1-dev asciidoc
- # Job 15: Build manpage
- name: Build manpage
os: ubuntu-18.04
EXTRA_CMAKE_BUILD_FLAGS: --target manpage
RUN_TESTS: 0
apt_get: libzstd1-dev asciidoc xsltproc
- # Job 16: Run Clang-Tidy
- name: Run Clang-Tidy
os: ubuntu-20.04
CC: clang
- name: Get source
uses: actions/checkout@v2
- # Job 17: Run Clang-Format in check mode
- name: Run Clang-Format in check mode
run: misc/format-files --all --check
continue-on-error: true
+++ /dev/null
-language: cpp
-dist: bionic
-
-script: ci/build
-
-jobs:
- include:
-
- # Job 1: Build (in source directory) on Linux with native GCC in release build mode
- - os: linux
- compiler: gcc
- env: T="Linux GCC release" VERBOSE=1 ENABLE_CACHE_CLEANUP_TESTS=1 BUILDDIR=. CCACHE_LOC=. CMAKE_PARAMS="-DCMAKE_BUILD_TYPE=Release"
- addons:
- apt:
- packages:
- - elfutils
- - libzstd1-dev
-
- # Job 2: Build on Linux with native 32-bit GCC
- - os: linux
- compiler: gcc
- env: T="Linux GCC 32-bit" VERBOSE=1 CFLAGS="-m32 -g -O2" CXXFLAGS="-m32 -g -O2" LDFLAGS="-m32" CMAKE_PARAMS="-DZSTD_FROM_INTERNET=ON" ENABLE_CACHE_CLEANUP_TESTS=1
- addons:
- apt:
- packages:
- - gcc-multilib
- - g++-multilib
- - lib32stdc++-5-dev
-
- # Job 3: Build on Linux with native Clang
- - os: linux
- compiler: clang
- env: T="Linux Clang" VERBOSE=1 ENABLE_CACHE_CLEANUP_TESTS=1
- addons:
- apt:
- packages:
- - elfutils
- - libzstd1-dev
-
- # Job 4: Build on Linux with native GCC and CUDA compiler
- - os: linux
- compiler: gcc
- env: T="Linux GCC CUDA" VERBOSE=1 CUDA=10.1.243-1 ENABLE_CACHE_CLEANUP_TESTS=1
- addons:
- apt:
- packages:
- - elfutils
- - libzstd1-dev
- before_install:
- - source ./ci/install-cuda.sh
-
- # Job 5: Build on Linux with 32-bit MinGW cross-compiler
- - os: linux
- compiler: i686-w64-mingw32-g++-posix
- env: T="Linux MinGW 32-bit" VERBOSE=1 CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix CMAKE_PARAMS="-DCMAKE_SYSTEM_NAME=Windows -DZSTD_FROM_INTERNET=ON" RUN_TESTS=0 ENABLE_CACHE_CLEANUP_TESTS=1
- addons:
- apt:
- packages:
- - elfutils
-
- # Job 6: Build on Linux with 64-bit MinGW cross-compiler
- - os: linux
- compiler: x86_64-w64-mingw32-g++
- env: T="Linux MinGW 64-bit" VERBOSE=1 CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix CMAKE_PARAMS="-DCMAKE_SYSTEM_NAME=Windows -DZSTD_FROM_INTERNET=ON" RUN_TESTS=0 ENABLE_CACHE_CLEANUP_TESTS=1
- addons:
- apt:
- packages:
- - elfutils
-
- # Job 7: Build on MacOS with native Clang
- - os: osx
- compiler: clang
- env: T="MacOS Clang" VERBOSE=1 CMAKE_PARAMS="-DZSTD_FROM_INTERNET=ON" ENABLE_CACHE_CLEANUP_TESTS=1
-
- # Job 8: Build with ENABLE_TRACING
- - os: linux
- compiler: gcc
- env: T="Enabled tracing" VERBOSE=1 CMAKE_PARAMS="-DENABLE_TRACING=1" ENABLE_CACHE_CLEANUP_TESTS=1
- addons:
- apt:
- packages:
- - elfutils
- - libzstd1-dev
-
- # Job 9: Run Clang's undefined behavior sanitizer
- - os: linux
- compiler: clang
- env: T="Clang UB sanitizer" VERBOSE=1 CMAKE_PARAMS="-DENABLE_SANITIZER_UNDEFINED_BEHAVIOR=ON" ASAN_OPTIONS="detect_leaks=0"
- addons:
- apt:
- packages:
- - elfutils
- - libzstd1-dev
-
- # Job 10: Run Clang's address sanitizer
- - os: linux
- compiler: clang
- env: T="Clang address sanitizer" VERBOSE=1 CMAKE_PARAMS="-DENABLE_SANITIZER_ADDRESS=ON" ASAN_OPTIONS="detect_leaks=0"
- addons:
- apt:
- packages:
- - elfutils
- - libzstd1-dev
-
- # Job 11: Run Clang's static analyzer
- - os: linux
- compiler: clang
- env: T="Clang static analyzer" VERBOSE=1 PATH="/usr/bin:$PATH" CMAKE_PREFIX=scan-build RUN_TESTS=0
- addons:
- apt:
- packages:
- - libzstd1-dev
-
- # Job 12: Build binary package, extract it out of source, run tests.
- - os: linux
- env: T="Build binary and verify" VERBOSE=1 SPECIAL=build-and-verify-package
- addons:
- apt:
- packages:
- - elfutils
- - libzstd1-dev
-
- # Job 13: Build source package, extract it out of source, run tests.
- - os: linux
- env: T="Build source package and verify" VERBOSE=1 SPECIAL=build-and-verify-package-source
- addons:
- apt:
- packages:
- - elfutils
- - libzstd1-dev
-
- # Job 13: Build documentation
- - os: linux
- env: T="Build documentation" VERBOSE=1 EXTRA_CMAKE_BUILD_FLAGS="--target documentation" RUN_TESTS=0
- addons:
- apt:
- packages:
- - elfutils
- - libzstd1-dev
- - asciidoc
-
- # Job 15: Build manpage
- - os: linux
- env: T="Build manpage" VERBOSE=1 EXTRA_CMAKE_BUILD_FLAGS="--target manpage" RUN_TESTS=0
- addons:
- apt:
- packages:
- - elfutils
- - libzstd1-dev
- - asciidoc
- - xsltproc
-
- # Job 16: Run Clang-Tidy
- - os: linux
- compiler: clang
- env: T="Clang-Tidy" VERBOSE=1 CMAKE_PARAMS="-DENABLE_CLANG_TIDY=ON" RUN_TESTS=0
- addons:
- apt:
- packages:
- - libzstd1-dev
-
- # Job 17: Run Clang-Format in check mode
- - os: linux
- compiler: clang
- env: T="Clang-Format" VERBOSE=1 EXTRA_CMAKE_BUILD_FLAGS="--target check_format" RUN_TESTS=0
- addons:
- apt:
- packages:
- - libzstd1-dev
-
- allow_failures:
- # Job 16: Run Clang-Tidy
- - os: linux
- compiler: clang
- env: T="Clang-Tidy" VERBOSE=1 CMAKE_PARAMS="-DENABLE_CLANG_TIDY=ON" RUN_TESTS=0
- addons:
- apt:
- packages:
- - libzstd1-dev
-
- # Job 17: Run Clang-Format check mode
- - os: linux
- compiler: clang
- env: T="Clang-Format" VERBOSE=1 EXTRA_CMAKE_BUILD_FLAGS="--target check_format" RUN_TESTS=0
- addons:
- apt:
- packages:
- - libzstd1-dev
ccache – a fast compiler cache
==============================
-[](https://travis-ci.com/ccache/ccache)
+[](https://github.com/ccache/ccache/actions?query=workflow%3A%22Build%22)
[](https://lgtm.com/projects/g/ccache/ccache/context:cpp)
[](https://lgtm.com/projects/g/ccache/ccache/alerts)
[](https://gitter.im/ccache/ccache)
#!/bin/sh
#
-# This script is used by .travis.yml and build-in-docker.
+# This script is used by CI and build-in-docker.
set -eu
+++ /dev/null
-#
-# Install CUDA.
-#
-# Version is given in the CUDA variable. If left empty, this script does
-# nothing. As variables are exported by this script, "source" it rather than
-# executing it.
-#
-
-if [ -n "$CUDA" ]; then
- echo "Installing CUDA support"
- travis_retry wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_${CUDA}_amd64.deb
- travis_retry sudo dpkg -i cuda-repo-ubuntu1804_${CUDA}_amd64.deb
- travis_retry sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
- travis_retry sudo apt-get update -qq
- export CUDA_APT=${CUDA:0:4}
- export CUDA_APT=${CUDA_APT/./-}
-
- travis_retry sudo apt-get install --allow-unauthenticated -y cuda-command-line-tools-${CUDA_APT}
- travis_retry sudo apt-get clean
-
- export CUDA_HOME=/usr/local/cuda-${CUDA:0:4}
- export LD_LIBRARY_PATH=${CUDA_HOME}/nvvm/lib64:${LD_LIBRARY_PATH}
- export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
- export PATH=${CUDA_HOME}/bin:${PATH}
-
- nvcc --version
-else
- echo "CUDA is NOT installed."
-fi
+++ /dev/null
-# NOTE: This is not the real Docker image used for the Travis builds.
-# See: https://docs.travis-ci.com/user/common-build-problems/
-
-FROM ubuntu:xenial
-
-# https://github.com/Yelp/dumb-init
-ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64.deb .
-RUN dpkg -i dumb-init_*.deb
-ENTRYPOINT ["/usr/bin/dumb-init", "--"]
-
-# generic tools
-RUN apt-get -qq update && apt-get install -y --no-install-recommends \
- libc6-dev \
- gcc \
- build-essential \
- clang \
- cmake \
- libc6-dev-i386 \
- gcc-multilib \
- gcc-mingw-w64 \
- make \
- autoconf \
- && rm -rf /var/lib/apt/lists/*
-
-# Travis has upgraded clang, from clang-3.8 to clang-7.0
-RUN printf "deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main\ndeb-src https://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main\n" > /etc/apt/sources.list.d/llvm-toolchain.list && apt-key adv --fetch-keys https://apt.llvm.org/llvm-snapshot.gpg.key && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F
-
-RUN apt-get -qq update && apt-get install -y --no-install-recommends \
- clang-7 \
- && rm -rf /var/lib/apt/lists/* \
- && ln -s /usr/bin/clang-7 /usr/local/bin/clang
-
-# ccache specific
-RUN apt-get -qq update && apt-get install -y --no-install-recommends \
- elfutils \
- libzstd1-dev \
- wget \
- ca-certificates \
- && rm -rf /var/lib/apt/lists/*
#!/bin/sh
if [ -d .git ]; then
- # Fetch full Git history if needed, e.g. when run via Travis-CI.
+ # Fetch full Git history if needed, e.g. when run via CI.
git fetch --unshallow 2>/dev/null
# Update doc/AUTHORS.adoc with Git commit authors plus authors mentioned via