From 1fa61ed7e9c8af38a95e1975bd5a61fe0b10d8c8 Mon Sep 17 00:00:00 2001 From: Maxwell Talbot Date: Mon, 28 Jun 2021 15:02:07 +0100 Subject: [PATCH 1/2] moved scripts to .github/scripts --- {scripts => .github/scripts}/buildFramework.sh | 0 {scripts => .github/scripts}/mergeFrameworks.sh | 0 {scripts => .github/scripts}/test.sh | 0 .github/workflows/build_frameworks.yml | 6 +++--- .github/workflows/tests.yml | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename {scripts => .github/scripts}/buildFramework.sh (100%) rename {scripts => .github/scripts}/mergeFrameworks.sh (100%) rename {scripts => .github/scripts}/test.sh (100%) diff --git a/scripts/buildFramework.sh b/.github/scripts/buildFramework.sh similarity index 100% rename from scripts/buildFramework.sh rename to .github/scripts/buildFramework.sh diff --git a/scripts/mergeFrameworks.sh b/.github/scripts/mergeFrameworks.sh similarity index 100% rename from scripts/mergeFrameworks.sh rename to .github/scripts/mergeFrameworks.sh diff --git a/scripts/test.sh b/.github/scripts/test.sh similarity index 100% rename from scripts/test.sh rename to .github/scripts/test.sh diff --git a/.github/workflows/build_frameworks.yml b/.github/workflows/build_frameworks.yml index 7b707be5..f75589cc 100644 --- a/.github/workflows/build_frameworks.yml +++ b/.github/workflows/build_frameworks.yml @@ -18,14 +18,14 @@ jobs: run: git submodule update --init - id: build_iphoneos name: Build release iphoneos framework - run: sh ./scripts/buildFramework.sh -t iphoneos -c Release + run: sh ./.github/scripts/buildFramework.sh -t iphoneos -c Release - id: build_iphonesimulator name: Build release iphonesimulator framework - run: sh ./scripts/buildFramework.sh -t iphonesimulator -c Release + run: sh ./.github/scripts/buildFramework.sh -t iphonesimulator -c Release - id: merge_frameworks if: steps.build_iphoneos.conclusion == 'success' && steps.build_iphonesimulator.conclusion == 'success' name: Merge created frameworks - run: sh ./scripts/mergeFrameworks.sh -c Release + run: sh ./.github/scripts/mergeFrameworks.sh -c Release - name: Upload artifact uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bcf246cc..56ea8ccc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,4 +14,4 @@ jobs: token: ${{ secrets.RIVE_REPO_PAT }} submodules: recursive - name: Testing iOS app - run: sh ./scripts/test.sh + run: sh ./.github/scripts/test.sh From 4047122f2c10ccc09d2800545cd3f9551b4a88ab Mon Sep 17 00:00:00 2001 From: Maxwell Talbot Date: Mon, 28 Jun 2021 15:06:06 +0100 Subject: [PATCH 2/2] add rive-cpp checks to ios --- .github/scripts/rive_cpp_check.sh | 20 ++++++++++++++++++++ .github/workflows/submodule_check.yml | 24 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100755 .github/scripts/rive_cpp_check.sh create mode 100644 .github/workflows/submodule_check.yml diff --git a/.github/scripts/rive_cpp_check.sh b/.github/scripts/rive_cpp_check.sh new file mode 100755 index 00000000..0098abcc --- /dev/null +++ b/.github/scripts/rive_cpp_check.sh @@ -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_IOS_CPP_SUBMODULE_HASH=$(git submodule | grep rive-cpp |awk '{print $1}' | sed -En 's/-*(.*)/\1/p') + +echo rive-ios cpp submodule is at $RIVE_IOS_CPP_SUBMODULE_HASH + +if [ "$RIVE_CPP_MASTER_HASH" == "$RIVE_IOS_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-ios` is behind rive-cpp!"}' $SLACK_WEBHOOK +fi \ No newline at end of file diff --git a/.github/workflows/submodule_check.yml b/.github/workflows/submodule_check.yml new file mode 100644 index 00000000..1a7f7cd5 --- /dev/null +++ b/.github/workflows/submodule_check.yml @@ -0,0 +1,24 @@ +name: Check rive-ios 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 \ No newline at end of file