Skip to content

Populate OD of slave based on ESI file #452

Populate OD of slave based on ESI file

Populate OD of slave based on ESI file #452

Workflow file for this run

name: CMake
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
jobs:
build_x86:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: turtlebrowser/[email protected]
with:
version: 2.2.3
- name: GTest
run: |
mkdir -p ${{github.workspace}}/build
cd ${{github.workspace}}/build
conan install ../conan/conanfile.txt -of=./ -pr:b ../conan/profile_linux_x86_64.txt -pr:h ../conan/profile_linux_x86_64.txt --build=missing -s build_type=${{env.BUILD_TYPE}}
- name: Install Gcovr
run: sudo apt install gcovr
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCODE_COVERAGE=ON -DBUILD_UNIT_TESTS=ON
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: make coverage_xml
- name: coverage
uses: 5monkeys/cobertura-action@master
with:
path: build/coverage_xml.xml
minimum_coverage: 75
show_line: true
show_branch: true
build_NuttX:
runs-on: ubuntu-latest
env:
nuttx_version: 3dc6b4c9bd9624ed259e676f8e9761dbf660c1bb
nuttx_apps_version: nuttx-12.5.0-RC0
arm_none_eabi_version: 13.2.Rel1/binrel/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi
steps:
- name: checkout KickCAT
uses: actions/checkout@v4
with:
path: 'KickCAT'
- name: Cache NuttX
id: cache-nuttx
uses: actions/cache@v3
with:
path: ${{GITHUB.WORKSPACE}}/nuttxspace/nuttx
key: nuttx_${{env.nuttx_version}}
- if: ${{ steps.cache-nuttx.outputs.cache-hit != 'true' }}
name: checkout NuttX
uses: actions/checkout@v4
with:
repository: apache/nuttx
path: 'nuttxspace/nuttx'
ref: '${{env.nuttx_version}}'
- name: Cache NuttX Apps
id: cache-nuttx-apps
uses: actions/cache@v3
with:
path: ${{GITHUB.WORKSPACE}}/nuttxspace/apps
key: nuttx-apps_${{env.nuttx_apps_version}}
- if: ${{ steps.cache-nuttx-apps.outputs.cache-hit != 'true' }}
name: checkout NuttX Apps
uses: actions/checkout@v4
with:
repository: apache/nuttx-apps
path: 'nuttxspace/apps'
ref: '${{env.nuttx_apps_version}}'
- name: Install Kconfig
run: sudo apt install kconfig-frontends
- name: Cache Arm None Eabi
id: cache-arm-none-eabi
uses: actions/cache@v3
with:
path: ${{GITHUB.WORKSPACE}}/gcc-arm-none-eabi
key: ${{env.arm_none_eabi_version}}
- if: ${{ steps.cache-arm-none-eabi.outputs.cache-hit != 'true' }}
name: Download gcc-arm-none-eabi
run: |
# Download the latest ARM GCC toolchain prebuilt by ARM
mkdir gcc-arm-none-eabi && \
curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/${{env.arm_none_eabi_version}}.tar.xz" \
| tar -C gcc-arm-none-eabi --strip-components 1 -xJ
- name: Build
run: |
set -x
export PATH="${{GITHUB.WORKSPACE}}/gcc-arm-none-eabi/bin:$PATH"
mkdir build_slave
nuttx_src=${{GITHUB.WORKSPACE}}/nuttxspace/nuttx
build=${{GITHUB.WORKSPACE}}/build_slave
src=${{GITHUB.WORKSPACE}}/KickCAT
cp ${src}/examples/slave/nuttx/xmc4800/boards/relax/defconfig ${nuttx_src}/boards/arm/xmc4/xmc4800-relax/configs/nsh/defconfig
${nuttx_src}/tools/configure.sh -l xmc4800-relax:nsh
make -C ${nuttx_src} export
cp ${nuttx_src}/nuttx-export-*.tar.gz ${build}/nuttx-export.tar.gz
ls ${build}
ls ${build}/nuttx-export
tar xf ${build}/nuttx-export.tar.gz -C ${build}
cmake -B ${build} -S ${src} -DCMAKE_TOOLCHAIN_FILE=${build}/nuttx-export/scripts/toolchain.cmake
make -C ${build}