sandboxed-api/.github/workflows/ubuntu-cmake.yml
Christian Blichmann 07d4d02628 Build fixes for older GCC and Ubuntu
- Ubuntu 18.04 ships with GCC 7, which needs `std::move()` when returning an `absl::StatusOr<>`
- Ignore C++ AST nodes of type `cindex.TypeKind.UNEXPOSED` in Python generator
- Remove default values in `ubuntu-cmake.yml`

PiperOrigin-RevId: 347605109
Change-Id: Ibe167249ecf4ef1af1654d63c2e067fc02e5782d
2020-12-15 07:09:22 -08:00

38 lines
908 B
YAML

name: CMake
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-18.04]
steps:
- uses: actions/checkout@v2
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Create Build Environment
run: |
pip3 install absl-py
cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
# TODO(cblichmann): Before enabling this, make sure all OSS tests pass
#- name: Test
# working-directory: ${{runner.workspace}}/build
# run: ctest -C $BUILD_TYPE