From 4ab832cc4619d238347fba9517289a7b8b90faec Mon Sep 17 00:00:00 2001 From: hedger Date: Sun, 5 Mar 2023 09:17:33 +0400 Subject: [PATCH] github: check API versions for all targets to match on gh build (#2459) * github: check API versions for all targets to match on gh build * typo fix * gh: forcing target mismatch to test pipeline * reverted API version change --- .github/workflows/build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 689dd2037..46d95ede5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,6 +44,16 @@ jobs: echo random_hash=$(openssl rand -base64 40 | shasum -a 256 | awk '{print $1}') >> $GITHUB_OUTPUT echo "event_type=$TYPE" >> $GITHUB_OUTPUT + - name: 'Check API versions' + run: | + set -e + N_API_HEADER_SIGNATURES=`ls -1 firmware/targets/f*/api_symbols.csv | xargs -I {} sh -c "head -n2 {} | md5sum" | sort -u | wc -l` + if [ $N_API_HEADER_SIGNATURES != 1 ] ; then + echo API versions aren\'t matching for available targets. Please update! + head -n2 firmware/targets/f*/api_symbols.csv + exit 1 + fi + - name: 'Make artifacts directory' run: | rm -rf artifacts