From 74238cae7bc948734a7bc23e9955d0658e0cb43c Mon Sep 17 00:00:00 2001 From: Yoann La Cancellera Date: Tue, 7 May 2024 11:11:49 +0200 Subject: [PATCH] Add: github action libmodulesupdated --- .github/workflows/libmodulesupdated.yml | 16 ++++++++++++++++ util/check_bin_md5sum | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/libmodulesupdated.yml create mode 100755 util/check_bin_md5sum diff --git a/.github/workflows/libmodulesupdated.yml b/.github/workflows/libmodulesupdated.yml new file mode 100644 index 00000000..5d658335 --- /dev/null +++ b/.github/workflows/libmodulesupdated.yml @@ -0,0 +1,16 @@ +name: libmodules_has_been_updated + +on: + pull_request: + branches: [ "3.x" ] + +jobs: + + libmodulescheck: + runs-on: ubuntu-latest + strategy: + fail-fast: true + steps: + - uses: actions/checkout@v4 + - name: run util/check_bin_md5sum + run: ./util/check_bin_md5sum diff --git a/util/check_bin_md5sum b/util/check_bin_md5sum new file mode 100755 index 00000000..1a0b1712 --- /dev/null +++ b/util/check_bin_md5sum @@ -0,0 +1,16 @@ +#!/bin/bash + +for tool in bin/*; do + shasum=$(md5sum $tool) + util/update-modules $tool; + rc="$?" + if [ $? -ne 0 ]; then + echo "'util/update-modules $tool' exited with code $rc" + fi + + updated_shasum=$(md5sum $tool) + if [ "$shasum" != "$updated_shasum" ]; then + echo "$tool had unsynced changes from lib, md5sum before and after running './util/update-modules $tool' is different" + exit 1 + fi +done