Skip to content

Commit

Permalink
adding rive-cpp check to rive-wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
mjtalbot committed Jun 28, 2021
1 parent 1135544 commit 7839dac
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/scripts/rive_cpp_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
set -e

# GET hash of CPP MASTER.
RIVE_CPP_MASTER_HASH=$(git ls-remote https://github.com/rive-app/rive-cpp.git refs/heads/master | awk '{print $1}')
echo rive-cpp master is at $RIVE_CPP_MASTER_HASH


# GET hash of Submodule.
RIVE_WASM_CPP_SUBMODULE_HASH=$(git submodule | grep rive-cpp |awk '{print $1}' | sed -En 's/-*(.*)/\1/p')

echo rive-wasm cpp submodule is at $RIVE_WASM_CPP_SUBMODULE_HASH

if [ "$RIVE_CPP_MASTER_HASH" == "$RIVE_WASM_CPP_SUBMODULE_HASH" ]
then
echo "They match. all is good"
else
# Just full on assuming this is behind for the time being.
# Could put in some 'useful' links into this message. Once we have something useful to do (other than update & rebuild)
curl -X POST -H 'Content-type: application/json' --data '{"text":"`rive-wasm` is behind rive-cpp!"}' $SLACK_WEBHOOK
fi
24 changes: 24 additions & 0 deletions .github/workflows/submodule_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check rive-wasm sub modules

on:
# lets check it when we push to master (we've just done something in android, its a good time to see about this)
push:
branches:
- master

schedule:
# 8am UTC every day
- cron: '0 8 * * *'


jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Run cpp version check
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run: sh ./.github/scripts/rive_cpp_check.sh

0 comments on commit 7839dac

Please sign in to comment.