Skip to content

Small documentation tweaks #276

Small documentation tweaks

Small documentation tweaks #276

Workflow file for this run

name: test and release CI
on:
push:
branches:
- main
- '*.preview'
pull_request:
branches:
- main
- '*.preview'
jobs:
test:
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toxic:tx22.4.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup nox
run: pip install nox
- name: lint
run: nox -s lint
- name: test-nnvg
run: nox -s nnvg-3.11
- name: test-doctest
run: nox -s doctest-3.11 rstdoctest-3.11
- name: test-pytest
run: nox -s test-3.11
- name: test-report
run: nox -s report
- name: package
run: nox -s package
- name: upload-coverage-reports
uses: actions/upload-artifact@v4
with:
name: coverage-reports
path: .nox/report/tmp/*
- name: upload-xunit-results
uses: actions/upload-artifact@v4
with:
name: xunit-results
path: .nox/test-3-11/tmp/xunit-result.xml
- name: upload-package
uses: actions/upload-artifact@v4
with:
name: pypi-package
path: .nox/package/tmp/dist/*
sonar:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: download-coverage-reports
uses: actions/download-artifact@v4
with:
name: coverage-reports
path: .nox/report/tmp/
- name: download-xunit-results
uses: actions/download-artifact@v4
with:
name: xunit-results
path: .nox/test-3-11/tmp/
- name: set-environment
run: |
echo NUNAVUT_MAJOR_MINOR_VERSION=$(./src/nunavut/_version.py --major-minor-only) >> $GITHUB_ENV
- name: verify nox artifacts
run: ls -R
working-directory: .nox
- name: report-release
if: ${{ github.event_name != 'pull_request' }}
uses: SonarSource/sonarqube-scan-action@v4.2.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
with:
args: >
-Dsonar.token=${{ env.SONAR_TOKEN }}
-Dsonar.buildString=${{ env.GITHUB_RUN_ID }}
-Dsonar.projectVersion=${{ env.NUNAVUT_MAJOR_MINOR_VERSION }}
-Dsonar.python.version=python3.11
-Dsonar.python.coverage.reportPaths=.nox/report/tmp/coverage.xml
-Dsonar.python.xunit.reportPath=.nox/test-3-11/tmp/xunit-result.xml
- name: report-pr
if: ${{ github.event_name == 'pull_request' }}
uses: SonarSource/sonarqube-scan-action@v4.2.1
env:
SONAR_TOKEN: "6526e88c286672a7852fea52056c4b6ea583aaf7"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: >
-Dsonar.token=${{ env.SONAR_TOKEN }}
-Dsonar.buildString=${{ env.GITHUB_RUN_ID }}
-Dsonar.projectVersion=${{ env.NUNAVUT_MAJOR_MINOR_VERSION }}
-Dsonar.python.version=python3.11
-Dsonar.python.coverage.reportPaths=.nox/report/tmp/coverage.xml
-Dsonar.python.xunit.reportPath=.nox/test-3-11/tmp/xunit-result.xml
compat-test-python3-windows-and-mac:
strategy:
matrix:
python3-version: ['11', '12', '13']
python3-platform: ['windows-latest', 'macos-latest']
runs-on: ${{ matrix.python3-platform }}
needs: test
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.${{ matrix.python3-version }}
- name: setup nox
run: pip3 install nox
- name: python3.${{ matrix.python3-version }} test
run: nox -s nnvg-3.${{ matrix.python3-version }} test-3.${{ matrix.python3-version }}
compat-test-python3-ubuntu:
strategy:
matrix:
python3-version: ['10', '11', '12', '13']
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toxic:tx22.4.3
needs: test
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: setup nox
run: pip install nox
- name: python3.${{ matrix.python3-version }} test
run: nox -s nnvg-3.${{ matrix.python3-version }} test-3.${{ matrix.python3-version }}
language-verification-c-cpp:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toolshed:ts24.4.3
strategy:
matrix:
architecture: [native32, native, arm-none-eabi]
compiler: [gcc, clang]
language: [c-11, c-11-arr-override, c-17, c-23, cpp-14, cetl-14-17, cpp-17, cpp-17-pmr, cpp-20, cpp-20-pmr]
exclude:
- architecture: native32
compiler: clang
- architecture: arm-none-eabi
compiler: clang
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: verify
working-directory: verification
run: cmake --workflow --preset workflow-${{ matrix.compiler }}-${{ matrix.architecture }}-${{ matrix.language }}
language-verification-c-clang-native-extra:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toolshed:ts24.4.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: verify
working-directory: verification
run: |
cmake -DNUNAVUT_EXTRA_GENERATOR_ARGS="--enable-override-variable-array-capacity;--embed-auditing-info" --preset configure-clang-native-c-11
cmake --build --preset build-DebugCov-clang-native-c-11 --target cov_all
- name: upload-verification-coverage-reports
uses: actions/upload-artifact@v4
with:
name: verification-c-coverage-reports
path: |
verification/build/DebugCov/coverage/html/
verification/build/DebugCov/coverage/lcov/
language-verification-cpp-clang-native-extra:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toolshed:ts24.4.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: verify
working-directory: verification
run: |
cmake -DNUNAVUT_EXTRA_GENERATOR_ARGS="--enable-override-variable-array-capacity;--embed-auditing-info" --preset configure-clang-native-cpp-20
cmake --build --preset build-DebugCov-clang-native-cpp-20 --target cov_all
- name: upload-verification-coverage-reports
uses: actions/upload-artifact@v4
with:
name: verification-cpp-coverage-reports
path: |
verification/build/DebugCov/coverage/html/
verification/build/DebugCov/coverage/lcov/
language-verification-python:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toxic:tx22.4.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: verify
run: |
cd verification/python
nox
env:
FORCE_COLOR: 1
continue-on-error: true