Skip to content

Enable SM1000 ctests inside GitHub using QEMU. #30

Enable SM1000 ctests inside GitHub using QEMU.

Enable SM1000 ctests inside GitHub using QEMU. #30

Workflow file for this run

name: Build SM1000
on: [pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
jobs:
build:
# 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
- name: Install packages
shell: bash
run: |
sudo apt-get update
sudo apt-get install octave octave-common octave-signal liboctave-dev gnuplot sox p7zip-full python3-numpy valgrind qemu-system-arm libncurses5 libncurses5-dev
- name: Install ST Standard Peripheral Library (SM1000)
working-directory: ${{github.workspace}}/stm32
shell: bash
run: git clone https://github.com/whimsicalraps/STM32F4xx_DSP_StdPeriph_Lib
- name: Install SM1000 prerequisites
working-directory: ${{github.workspace}}/stm32
shell: bash
run: |
wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2
tar xvjf gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2
- name: Build x86 Codec2 (prerequisite for ctests)
working-directory: ${{github.workspace}}
shell: bash
run: |
mkdir build_linux
cd build_linux
cmake -DUNITTEST=1 ..
make
- name: Build SM1000
working-directory: ${{github.workspace}}/stm32
shell: bash
run: |
mkdir build_stm32
cd build_stm32
export PATH=${{github.workspace}}/stm32/gcc-arm-none-eabi-8-2018-q4-major/bin:$PATH
cmake -DUSE_QEMU_FOR_UNITTEST=1 -DCMAKE_TOOLCHAIN_FILE=../cmake/STM32_Toolchain.cmake -DPERIPHLIBDIR=${{github.workspace}}/stm32/STM32F4xx_DSP_StdPeriph_Lib ..
make
- name: Run SM1000 ctests
working-directory: ${{github.workspace}}/stm32/build_stm32
shell: bash
run: |
export PATH=${{github.workspace}}/stm32/gcc-arm-none-eabi-8-2018-q4-major/bin:$PATH
make test