Skip to content

Add GitHub Actions for POSIX and S32K148 platform build #64

Add GitHub Actions for POSIX and S32K148 platform build

Add GitHub Actions for POSIX and S32K148 platform build #64

Workflow file for this run

name: Build S32k and posix platform
on: [push,pull_request]
jobs:
run-command:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [posix, s32k148]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.22.x'
- name: Set up ARM GCC
if: ${{ matrix.platform == 's32k148' }}
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '10.3-2021.10'
- name: Configure CMake for POSIX
if: ${{ matrix.platform == 'posix' }}
run: cmake -B cmake-build-posix -S executables/referenceApp
- name: Configure CMake for S32K148
if: ${{ matrix.platform == 's32k148' }}
run: cmake -B cmake-build-s32k148 -S executables/referenceApp -DBUILD_TARGET_PLATFORM="S32K148EVB" --toolchain ../../admin/cmake/ArmNoneEabi10.3-2021.10.cmake
- name: Build for ${{ matrix.platform }}
run: cmake --build cmake-build-${{ matrix.platform }} --target app.referenceApp -j
- name: Test
if: ${{ matrix.platform == 'posix' }}
run: |
cmake -B cmake-build-unit-tests -S executables/unitTest -DBUILD_UNIT_TESTS=ON
cmake --build cmake-build-unit-tests -j4
ctest --test-dir cmake-build-unit-tests -j4