-
Notifications
You must be signed in to change notification settings - Fork 19
51 lines (47 loc) · 2.18 KB
/
check-versions.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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})"