mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
name: CMake
|
|
|
|
on: [pull_request, push]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
name: Linux
|
|
container: wpilib/roborio-cross-ubuntu:2022-20.04
|
|
flags: ""
|
|
- os: macOS-11
|
|
name: macOS
|
|
container: ""
|
|
flags: "-DWITH_JAVA=OFF"
|
|
|
|
name: "Build - ${{ matrix.name }}"
|
|
runs-on: ${{ matrix.os }}
|
|
container: ${{ matrix.container }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install opencv (macOS)
|
|
run: brew install opencv
|
|
if: runner.os == 'macOS'
|
|
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Install jinja
|
|
run: python -m pip install jinja2
|
|
|
|
- name: configure
|
|
run: mkdir build && cd build && cmake ${{ matrix.flags }} ..
|
|
|
|
- name: build
|
|
working-directory: build
|
|
run: cmake --build . --parallel $(nproc)
|
|
|
|
- name: test
|
|
working-directory: build
|
|
run: ctest --output-on-failure
|