Add github action workflows CI
[openjpeg.git] / tools / travis-ci / abi-check.sh
index 21ad9dc8d9df711852b387d994ed85c2b480bcec..cf47da8f6d43b22a746fe43385680d5d80ec1ac8 100755 (executable)
@@ -35,7 +35,18 @@ OPJ_REPO="https://github.com/uclouvain/openjpeg.git"
 OPJ_SSH_REPO=${OPJ_REPO/https:\/\/github.com\//git@github.com:}
 OPJ_UPLOAD_BRANCH="gh-pages"
 OPJ_UPLOAD_DIR="abi-check"
-if [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then
+OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
+
+if [ "${GITHUB_REPOSITORY:-}" != "" ]; then
+    BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]')
+       if [ "$(echo "${GITHUB_REPOSITORY}" | sed 's/\(^.*\)\/.*/\1/')" == "uclouvain" ] && [ "${GITHUB_EVENT_NAME:-}" != "pull_request" ] && [ "$BRANCH" == "master" ]; then
+               # Upload updated report to gh-pages
+               echo "FIXME. We aren't yet ready to upload ABI report due to lack of keys to push to the gh-pages branch"
+               # OPJ_UPLOAD_ABI_REPORT=1
+               # Build full report
+               #OPJ_LIMIT_ABI_BUILDS=
+       fi
+elif [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then
        if [ "$(echo "${TRAVIS_REPO_SLUG}" | sed 's/\(^.*\)\/.*/\1/')" == "uclouvain" ] && [ "${TRAVIS_PULL_REQUEST:-}" == "false" ] && [ "${TRAVIS_BRANCH:-}" == "master" ]; then
                # Upload updated report to gh-pages
                OPJ_UPLOAD_ABI_REPORT=1
@@ -44,8 +55,6 @@ if [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then
        fi
 fi
 
-OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
-
 # INSTALL REQUIRED PACKAGES
 
 mkdir ${HOME}/abi-check
@@ -94,7 +103,9 @@ else
        grep -v Configure ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > ./openjpeg.json
 fi
 cp -rf ${OPJ_SOURCE_DIR} src/openjpeg/current
+rm -f src/openjpeg/current/build/CMakeCache.txt
 abi-monitor -v current -build openjpeg.json
+cat build_logs/openjpeg/current/make
 
 rm -rf ./installed/openjpeg/${OPJ_LATEST_VERSION}
 rm -rf ./compat_report/openjpeg/${OPJ_LATEST_VERSION}