Skip to content

Commit

Permalink
github: check-versions: add checks for Mbed OS, no-OS, PCL versions
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Molloy <[email protected]>
  • Loading branch information
pamolloy authored and mphalke committed Nov 10, 2023
1 parent 2f7587e commit d12ea3f
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/check-versions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Check versions
# Dependencies are defined in two places; in the Mlibs/*.lib files used by Mbed
# and in git submodules under libraries/* used to build with no-OS. To make
# sure the two stay in sync, compare the versions in both and make sure they
# are the same
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
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})"

0 comments on commit d12ea3f

Please sign in to comment.