mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
0e7abb70fe
--656cd15cb6
by Piotr Bartman <prbartman@gmail.com>: LibRaw --a505222184
by Piotr Bartman <prbartman@gmail.com>: CMake cleanup --7fc66b2026
by Piotr Bartman <prbartman@gmail.com>: cleanup + img.raw --1b1c085cfe
by Piotr Bartman <prbartman@gmail.com>: libraw: data checking --7e76425c37
by Piotr Bartman <prbartman@gmail.com>: libraw: CR @cblichmann PiperOrigin-RevId: 453859071 Change-Id: Ib9e1887f97d48ecbebda05c5c6df01e3642bbfba
87 lines
2.5 KiB
YAML
87 lines
2.5 KiB
YAML
name: CMake Ubuntu Contrib
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-20.04]
|
|
contrib: [jsonnet, libraw, libtiff, pffft]
|
|
ignore-errors: [true]
|
|
include:
|
|
- compiler: clang
|
|
compiler-version: 11
|
|
- compiler: gcc
|
|
compiler-version: 10
|
|
runs-on: ${{ matrix.os }}
|
|
continue-on-error: ${{ matrix.ignore-errors }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- 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: seanmiddleditch/gha-setup-ninja@v3
|
|
|
|
- name: Install/configure Clang compiler toolchain
|
|
if: matrix.compiler == 'clang'
|
|
run: |
|
|
sudo apt-get install -qy clang-${{matrix.compiler-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}}
|
|
echo "CXX=g++-${{matrix.compiler-version}}" >> $GITHUB_ENV
|
|
echo "CC=gcc-${{matrix.compiler-version}}" >> $GITHUB_ENV
|
|
|
|
- name: Create Build Environment
|
|
run: |
|
|
pip3 install absl-py clang
|
|
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
|