projects:ad719x_iio:Adding STM32 Support #194
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: Build projects | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
check-versions: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Update submodules recursively | |
run: | | |
git submodule update --init --recursive | |
- name: Check no-OS versions | |
run: | | |
git submodule status | |
lib_version=$(git submodule status | sed -nr 's/.(.*) libraries\/no-OS.*/\1/p') | |
submodule_version=$(sed -e 's/.*#//' libraries/no-OS.lib) | |
if [[ "${lib_version}" != "${submodule_version}" ]]; then | |
echo "ERROR: no-OS version in lib (${lib_version}) does not match submodule (${submodule_version})" | |
exit 1 | |
fi | |
echo "SUCCESS: no-OS version in lib and submodule match (${lib_version})" | |
- name: Check Precision Converters Library versions | |
run: | | |
git submodule status | |
lib_version=$(git submodule status | sed -nr 's/.(.*) libraries\/precision-converters-library.*/\1/p') | |
submodule_version=$(sed -e 's/.*#//' libraries/precision-converters-library.lib) | |
if [[ "${lib_version}" != "${submodule_version}" ]]; then | |
echo "ERROR: PCL version in lib (${lib_version}) does not match submodule (${submodule_version})" | |
exit 1 | |
fi | |
echo "SUCCESS: PCL version in lib and submodule match (${lib_version})" | |
- name: Check Mbed OS versions | |
run: | | |
git submodule status --recursive | |
no_os_version=$(git submodule status --recursive | sed -nr 's/.(.*) libraries\/no-OS.*mbed-os.*/\1/p') | |
pcf_version=$(sed -e 's/.*#//' mbed-os.lib) | |
if [[ "${no_os_version}" != "${pcf_version}" ]]; then | |
echo "ERROR: MBed OS version in no-OS (${no_os_version}) does not match PCF (${pcf_version})" | |
exit 1 | |
fi | |
echo "SUCCESS: MBed OS version in no-OS and PCF match (${no_os_version})" | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Update no-OS submodule | |
run: | | |
git submodule update --init libraries/no-OS | |
- name: Run astyle on source code | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y astyle fd-find | |
set -e | |
formatted=$(fdfind -e c -e h . projects | xargs astyle --formatted --options=libraries/no-OS/ci/astyle_config) | |
if [[ ! -z "${formatted}" ]]; then | |
echo "ERROR: The following files were formatted by astyle:" | |
echo "${formatted}" | |
exit 1 | |
fi | |
echo "SUCCESS: No files were formatted by astyle" | |
build: | |
runs-on: ubuntu-latest | |
needs: [check-versions, lint] | |
strategy: | |
matrix: | |
project: | |
- ad2s1210_iio | |
- ad405x_iio | |
- ad4130_iio | |
- ad559xr_console | |
- ad5770r_console | |
- ad579x_iio | |
- ad590_console | |
- ad5933_console | |
- ad7124_console | |
- ad7124_temperature-measure | |
- ad7134_iio | |
- ad717x_console | |
- ad717x_iio | |
- ad719x_iio | |
- ad738x_iio | |
- ad7606_iio | |
- ad7689_iio | |
- ad77681_iio | |
- ad777x_iio | |
- adt7420_console | |
- evb_discovery_firmware | |
- ltc2672_iio | |
- ltc268x_console | |
- nanodac_console | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Build with no-OS | |
run: | | |
set -x | |
pip install mbed-cli | |
wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 | |
tar xjf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 | |
export PATH="${PATH}:${PWD}/gcc-arm-none-eabi-10.3-2021.10/bin" | |
mbed config -G GCC_ARM_PATH "${PWD}/gcc-arm-none-eabi-10.3-2021.10/bin" | |
pushd libraries/no-OS/libraries/mbed/mbed-os | |
pip install -r requirements.txt | |
popd | |
pushd projects/${{ matrix.project }} | |
make | |
popd | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.project }} | |
path: | | |
projects/${{ matrix.project }}/build/${{ matrix.project }}.bin |