diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-09-10 16:05:04 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-09-12 11:18:14 +0200 |
| commit | 3d582dd8856bd9c8e3243407b61690263ed2ee48 (patch) | |
| tree | c3045fe7f15163a0e04b72ce66d64afc88cfc7de /tools/travis-ci/install.sh | |
| parent | 0c1962669858b1d67a6b8851ae0e8c4123a1c282 (diff) | |
Add github action workflows CI
Diffstat (limited to 'tools/travis-ci/install.sh')
| -rwxr-xr-x | tools/travis-ci/install.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 149a1af6..997f7bb8 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -47,7 +47,9 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) # We need test data - if [ "${TRAVIS_BRANCH:-}" != "" ]; then + if [ "${GITHUB_HEAD_REF:-}" != "" ]; then + OPJ_DATA_BRANCH=${GITHUB_HEAD_REF} + elif [ "${TRAVIS_BRANCH:-}" != "" ]; then OPJ_DATA_BRANCH=${TRAVIS_BRANCH} elif [ "${APPVEYOR_REPO_BRANCH:-}" != "" ]; then OPJ_DATA_BRANCH=${APPVEYOR_REPO_BRANCH} @@ -59,12 +61,12 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then OPJ_DATA_BRANCH=master #default to master fi echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch" - git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data + git clone -v --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data # We need jpylyzer for the test suite JPYLYZER_VERSION="1.17.0" echo "Retrieving jpylyzer" - if [ "${APPVEYOR:-}" == "True" ]; then + if [ "${APPVEYOR:-}" == "True" -o "${RUNNER_OS:-}" == "Windows" ]; then wget -q https://github.com/openpreserve/jpylyzer/releases/download/${JPYLYZER_VERSION}/jpylyzer_${JPYLYZER_VERSION}_win32.zip mkdir jpylyzer cd jpylyzer @@ -82,12 +84,12 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. # Note: Binaries can only be used for non-commercial purposes. if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then - if [ "${TRAVIS_OS_NAME:-}" == "linux" ] || uname -s | grep -i Linux &> /dev/null; then + if [ "${TRAVIS_OS_NAME:-}" == "linux" -o "${RUNNER_OS:-}" == "Linux" ] || uname -s | grep -i Linux &> /dev/null; then echo "Retrieving Kakadu" wget -q http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_Linux-x86-64_200602.zip cmake -E tar -xf KDU805_Demo_Apps_for_Linux-x86-64_200602.zip mv KDU805_Demo_Apps_for_Linux-x86-64_200602 kdu - elif [ "${TRAVIS_OS_NAME:-}" == "osx" ] || uname -s | grep -i Darwin &> /dev/null; then + elif [ "${TRAVIS_OS_NAME:-}" == "osx" -o "${RUNNER_OS:-}" == "macOS" ] || uname -s | grep -i Darwin &> /dev/null; then echo "Retrieving Kakadu" wget -v http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_MacOS_200602.dmg_.zip cmake -E tar -xf KDU805_Demo_Apps_for_MacOS_200602.dmg_.zip @@ -102,7 +104,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then install_name_tool -id ${PWD}/libkdu_v80R.dylib libkdu_v80R.dylib install_name_tool -change /usr/local/lib/libkdu_v80R.dylib ${PWD}/libkdu_v80R.dylib kdu_compress install_name_tool -change /usr/local/lib/libkdu_v80R.dylib ${PWD}/libkdu_v80R.dylib kdu_expand - elif [ "${APPVEYOR:-}" == "True" ] || uname -s | grep -i MINGW &> /dev/null || uname -s | grep -i CYGWIN &> /dev/null; then + elif [ "${APPVEYOR:-}" == "True" -o "${RUNNER_OS:-}" == "Windows" ] || uname -s | grep -i MINGW &> /dev/null || uname -s | grep -i CYGWIN &> /dev/null; then echo "Retrieving Kakadu" wget -q http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_Win64_200602.msi_.zip cmake -E tar -xf KDU805_Demo_Apps_for_Win64_200602.msi_.zip |
