Automated rollback of commit 599da2312460ec62dfca24415074895f67608a4a. #560
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
name: ubuntu-cmake-contrib | |
on: [push, pull_request] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04] | |
contrib: | |
- brotli | |
- c-blosc | |
- jsonnet | |
- libidn2 | |
- libraw | |
- libtiff | |
- libxls | |
- libzip | |
- lodepng | |
- pffft | |
ignore-errors: [true] | |
include: | |
- compiler: clang | |
compiler-version: 11 | |
libclang-version: 11 | |
- compiler: gcc | |
compiler-version: 10 | |
libclang-version: 11 | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.ignore-errors }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
key: ${{matrix.os}}-${{matrix.compiler}}${{matrix.compiler-version}} | |
path: | | |
${{github.workspace}}/build/_deps | |
!${{github.workspace}}/build/_deps/${{matrix.contrib}}-*/** | |
- name: Cache dependencies (contrib) | |
uses: actions/cache@v3 | |
with: | |
key: ${{matrix.os}}-${{matrix.compiler}}${{matrix.compiler-version}}-${{matrix.contrib}} | |
path: | | |
${{github.workspace}}/build/_deps/${{matrix.contrib}}-*/** | |
- name: Install ninja-build tool | |
uses: turtlesec-no/[email protected] | |
- name: Install/configure Clang compiler toolchain | |
if: matrix.compiler == 'clang' | |
run: | | |
sudo apt-get install -qy \ | |
clang-${{matrix.compiler-version}} \ | |
libclang1-${{matrix.libclang-version}} \ | |
python3-clang-${{matrix.libclang-version}} | |
echo "CXX=clang++-${{matrix.compiler-version}}" >> $GITHUB_ENV | |
echo "CC=clang-${{matrix.compiler-version}}" >> $GITHUB_ENV | |
- name: Install/configure GCC compiler toolchain | |
if: matrix.compiler == 'gcc' | |
run: | | |
sudo apt-get install -qy \ | |
g++-${{matrix.compiler-version}} \ | |
libclang1-${{matrix.libclang-version}} \ | |
python3-clang-${{matrix.libclang-version}} | |
echo "CXX=g++-${{matrix.compiler-version}}" >> $GITHUB_ENV | |
echo "CC=gcc-${{matrix.compiler-version}}" >> $GITHUB_ENV | |
- name: Install extra dependencies for contrib | |
if: matrix.contrib == 'libidn2' | |
run: | | |
sudo apt-get install -qy libidn2-dev libunistring-dev | |
- name: Install extra dependencies for contrib | |
if: matrix.contrib == 'libxls' | |
run: | | |
sudo apt-get install -qy autoconf-archive gettext | |
- name: Create Build Environment | |
run: | | |
pip3 install absl-py | |
cmake -E make_directory $GITHUB_WORKSPACE/build | |
- name: Configure CMake | |
run: | | |
cmake \ | |
-S $GITHUB_WORKSPACE/contrib/${{matrix.contrib}} \ | |
-B $GITHUB_WORKSPACE/build \ | |
-G Ninja \ | |
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \ | |
-DSAPI_BUILD_TESTING=ON \ | |
-DSAPI_BUILD_EXAMPLES=ON | |
- name: Build | |
run: | | |
cmake \ | |
--build $GITHUB_WORKSPACE/build \ | |
--config $BUILD_TYPE | |
- name: Test | |
run: | | |
ctest \ | |
--test-dir $GITHUB_WORKSPACE/build \ | |
-C $BUILD_TYPE \ | |
-E "^(sapi_|sandbox2_|regression_test)" \ | |
--output-on-failure |