Use canardTxPoll
; MediaPayload::Ownership
(#409)
#968
Workflow file for this run
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: "libcyphal_tests" | |
on: | |
push: # Further filtering is done in the jobs. | |
pull_request: | |
branches: | |
- main | |
- 'issue/*' | |
jobs: | |
warmup: | |
if: > | |
contains(github.event.head_commit.message, '#verification') || | |
contains(github.event.head_commit.message, '#docs') || | |
contains(github.ref, '/main') || | |
contains(github.ref, '/issue/') || | |
(github.event_name == 'pull_request') | |
runs-on: ubuntu-latest | |
container: ghcr.io/opencyphal/toolshed:ts22.4.10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache ext modules | |
id: libcyphal-ext | |
uses: actions/cache@v4 | |
env: | |
cache-name: libcyphal-ext-cache | |
with: | |
path: external | |
key: ${{ runner.os }}-${{ hashFiles('cmake/modules/*.cmake') }} | |
- name: get nunavut | |
# TODO: setup a venv, cache, and distribute to the other jobs. | |
run: > | |
pip install git+https://github.com/OpenCyphal/[email protected] | |
- name: configure | |
run: > | |
./build-tools/bin/verify.py | |
--verbose | |
--asserts | |
--online | |
--cpp-standard 14 | |
--build-flavor Debug | |
clean-configure | |
verification: | |
if: > | |
contains(github.event.head_commit.message, '#verification') || | |
contains(github.ref, '/main') || | |
contains(github.ref, '/issue/') || | |
(github.event_name == 'pull_request') | |
runs-on: ubuntu-latest | |
container: ghcr.io/opencyphal/toolshed:ts22.4.10 | |
needs: [warmup] | |
strategy: | |
matrix: | |
build_flavor: [Release, Debug] | |
std: [14, 17, 20] | |
toolchain: [gcc, clang] | |
include: | |
- build_flavor: Coverage | |
std: 14 | |
toolchain: gcc | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache ext modules | |
id: libcyphal-ext | |
uses: actions/cache@v4 | |
env: | |
cache-name: libcyphal-ext-cache | |
with: | |
path: external | |
key: ${{ runner.os }}-${{ hashFiles('cmake/modules/*.cmake') }} | |
- name: get nunavut | |
run: > | |
pip install git+https://github.com/OpenCyphal/[email protected] | |
- name: run tests | |
env: | |
GTEST_COLOR: yes | |
run: > | |
./build-tools/bin/verify.py | |
--verbose | |
${{ matrix.build_flavor != 'Coverage' && '--asserts' || '--no-exceptions' }} | |
--cpp-standard ${{ matrix.std }} | |
--build-flavor ${{ matrix.build_flavor }} | |
--toolchain ${{ matrix.toolchain }} | |
test | |
- name: debug output | |
if: ${{ runner.debug == '1' }} | |
run: ls -lAhR build/ | |
- name: upload-artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.build_flavor }}-${{ matrix.std }}-${{ matrix.toolchain }} | |
path: | | |
build/compile_commands.json | |
build/*/**/gcovr_html/*.* | |
if-no-files-found: error | |
docs: | |
if: > | |
contains(github.event.head_commit.message, '#docs') || | |
contains(github.ref, '/main') || | |
contains(github.ref, '/issue/') || | |
(github.event_name == 'pull_request') | |
runs-on: ubuntu-latest | |
container: ghcr.io/opencyphal/toolshed:ts22.4.10 | |
needs: [warmup] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache ext modules | |
id: libcyphal-ext | |
uses: actions/cache@v4 | |
env: | |
cache-name: libcyphal-ext-cache | |
with: | |
path: external | |
key: ${{ runner.os }}-${{ hashFiles('cmake/modules/*.cmake') }} | |
- name: get nunavut | |
run: > | |
pip install git+https://github.com/OpenCyphal/[email protected] | |
- name: doc-gen | |
run: > | |
./build-tools/bin/verify.py | |
--verbose | |
--asserts | |
--cpp-standard 14 | |
--build-flavor Debug | |
build-docs | |
- name: Setup Pages | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: actions/configure-pages@v5 | |
- name: Upload docs | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "build/docs/html/" | |
- name: upload-pr-docs | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pr-docs | |
path: "build/docs/html/" | |
if-no-files-found: error |