Add github action workflows CI
This commit is contained in:
parent
0c19626698
commit
3d582dd885
|
@ -0,0 +1,24 @@
|
||||||
|
name: ABI check
|
||||||
|
|
||||||
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
abi_check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Requirements
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y gcc g++ libelf-dev elfutils texinfo exuberant-ctags libtiff-dev libwebp-dev libzstd-dev
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
./tools/travis-ci/install.sh
|
||||||
|
./tools/travis-ci/run.sh
|
||||||
|
./tools/travis-ci/abi-check.sh
|
||||||
|
env:
|
||||||
|
OPJ_CI_ABI_CHECK: 1
|
|
@ -0,0 +1,189 @@
|
||||||
|
name: Build
|
||||||
|
|
||||||
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
regular:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Requirements
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y gcc g++
|
||||||
|
|
||||||
|
- name: Build and run tests
|
||||||
|
run: |
|
||||||
|
./tools/travis-ci/install.sh
|
||||||
|
./tools/travis-ci/run.sh
|
||||||
|
env:
|
||||||
|
OPJ_CI_ARCH: x86_64
|
||||||
|
OPJ_CI_BUILD_CONFIGURATION: Release
|
||||||
|
OPJ_CI_PERF_TESTS: 1
|
||||||
|
OPJ_CI_BUILD_FUZZERS: 1
|
||||||
|
OPJ_CI_INCLUDE_IF_DEPLOY: 1
|
||||||
|
OPJ_NONCOMMERCIAL: 1
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: build/openjpeg-*.tar.gz
|
||||||
|
|
||||||
|
asan:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Requirements
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y gcc g++
|
||||||
|
|
||||||
|
- name: Build and run tests
|
||||||
|
run: |
|
||||||
|
./tools/travis-ci/install.sh
|
||||||
|
./tools/travis-ci/run.sh
|
||||||
|
env:
|
||||||
|
OPJ_CI_ARCH: x86_64
|
||||||
|
OPJ_CI_BUILD_CONFIGURATION: Debug
|
||||||
|
OPJ_CI_ASAN: 1
|
||||||
|
OPJ_NONCOMMERCIAL: 1
|
||||||
|
|
||||||
|
clang_32bit:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Requirements
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y clang gcc-multilib
|
||||||
|
|
||||||
|
- name: Build and run tests
|
||||||
|
run: |
|
||||||
|
./tools/travis-ci/install.sh
|
||||||
|
./tools/travis-ci/run.sh
|
||||||
|
env:
|
||||||
|
OPJ_CI_CC: clang
|
||||||
|
OPJ_CI_CXX: clang++
|
||||||
|
OPJ_CI_INSTRUCTION_SETS: "-mavx2"
|
||||||
|
OPJ_CI_BUILD_CONFIGURATION: Release
|
||||||
|
OPJ_CI_ARCH: i386
|
||||||
|
OPJ_NUM_THREADS: 2
|
||||||
|
OPJ_NONCOMMERCIAL: 1
|
||||||
|
|
||||||
|
mingw_64:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Requirements
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y gcc-mingw-w64-base binutils-mingw-w64-x86-64 gcc-mingw-w64-x86-64 gcc-mingw-w64 g++-mingw-w64-x86-64
|
||||||
|
|
||||||
|
- name: Build and run tests
|
||||||
|
run: |
|
||||||
|
./tools/travis-ci/install.sh
|
||||||
|
./tools/travis-ci/run.sh
|
||||||
|
env:
|
||||||
|
OPJ_CI_CC: x86_64-w64-mingw32-gcc
|
||||||
|
OPJ_CI_CXX: x86_64-w64-mingw32-g++
|
||||||
|
OPJ_CI_ARCH: x86_64
|
||||||
|
OPJ_CI_BUILD_CONFIGURATION: Release
|
||||||
|
OPJ_NONCOMMERCIAL: 1
|
||||||
|
|
||||||
|
macos:
|
||||||
|
runs-on: macos-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Build and run tests
|
||||||
|
run: |
|
||||||
|
./tools/travis-ci/install.sh
|
||||||
|
./tools/travis-ci/run.sh
|
||||||
|
env:
|
||||||
|
OPJ_CI_ARCH: x86_64
|
||||||
|
OPJ_CI_BUILD_CONFIGURATION: Release
|
||||||
|
OPJ_CI_INCLUDE_IF_DEPLOY: 1
|
||||||
|
#OPJ_NONCOMMERCIAL: 1
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: build/openjpeg-*.zip
|
||||||
|
|
||||||
|
windows_build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- VS_VER: 2019
|
||||||
|
OPJ_CI_ARCH: x64
|
||||||
|
OPJ_CI_INCLUDE_IF_DEPLOY: 1
|
||||||
|
- VS_VER: 2019
|
||||||
|
OPJ_CI_ARCH: x86
|
||||||
|
OPJ_CI_INCLUDE_IF_DEPLOY: 1
|
||||||
|
- VS_VER: 2019
|
||||||
|
OPJ_CI_ARCH: x64
|
||||||
|
# We do have specific failures noted in tools/travis-ci/knownfailures-windows-vs2015-x64-avx2-Release-3rdP.txt
|
||||||
|
# not sure why that happens
|
||||||
|
OPJ_CI_INSTRUCTION_SETS: "/arch:AVX2"
|
||||||
|
|
||||||
|
env:
|
||||||
|
VS_VER: ${{ matrix.VS_VER }}
|
||||||
|
OPJ_CI_ARCH: ${{ matrix.OPJ_CI_ARCH }}
|
||||||
|
OPJ_CI_INCLUDE_IF_DEPLOY: ${{ matrix.OPJ_CI_INCLUDE_IF_DEPLOY }}
|
||||||
|
OPJ_CI_INSTRUCTION_SETS: ${{ matrix.OPJ_CI_INSTRUCTION_SETS }}
|
||||||
|
#OPJ_NONCOMMERCIAL: 1
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Setup git
|
||||||
|
run: |
|
||||||
|
git config --global core.autocrlf false
|
||||||
|
git config --system core.longpaths true
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set compiler environment
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
if "%VS_VER%" == "2019" CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=%OPJ_CI_ARCH%
|
||||||
|
echo PATH=%PATH%>> %GITHUB_ENV%
|
||||||
|
echo INCLUDE=%INCLUDE%>> %GITHUB_ENV%
|
||||||
|
echo LIB=%LIB%>> %GITHUB_ENV%
|
||||||
|
echo LIBPATH=%LIBPATH%>> %GITHUB_ENV%
|
||||||
|
|
||||||
|
- name: Install wget
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
choco install wget --no-progress
|
||||||
|
|
||||||
|
- name: Build and run tests
|
||||||
|
run: |
|
||||||
|
./tools/travis-ci/install.sh
|
||||||
|
./tools/travis-ci/run.sh
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: ${{startsWith(github.ref, 'refs/tags/') && env.OPJ_CI_INCLUDE_IF_DEPLOY == 1}}
|
||||||
|
with:
|
||||||
|
files: build/openjpeg-*.zip
|
|
@ -0,0 +1,26 @@
|
||||||
|
name: Code Style
|
||||||
|
|
||||||
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
code_style:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install Requirements
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y gcc g++ flip
|
||||||
|
|
||||||
|
- name: Run check
|
||||||
|
run: |
|
||||||
|
./tools/travis-ci/install.sh
|
||||||
|
./tools/travis-ci/run.sh
|
||||||
|
env:
|
||||||
|
OPJ_CI_CHECK_STYLE: 1
|
||||||
|
OPJ_CI_SKIP_TESTS: 1
|
|
@ -3,7 +3,7 @@ cd $(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
export PATH=$PATH:$PWD/scripts
|
export PATH=$PATH:$PWD/scripts
|
||||||
|
|
||||||
if [ -z "$TRAVIS_COMMIT_RANGE" ]; then
|
if [ -z "$TRAVIS_COMMIT_RANGE" -a -z "$GITHUB_SHA" ]; then
|
||||||
echo "No commit range given"
|
echo "No commit range given"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -18,14 +18,24 @@ set -e
|
||||||
ASTYLEDIFF=/tmp/astyle.diff
|
ASTYLEDIFF=/tmp/astyle.diff
|
||||||
>$ASTYLEDIFF
|
>$ASTYLEDIFF
|
||||||
|
|
||||||
|
if [ ! -z $GITHUB_BASE_REF ] && [ ! -z $GITHUB_HEAD_REF ]; then
|
||||||
if [[ ! -z $TRAVIS_PULL_REQUEST_BRANCH ]]; then
|
# on a PR
|
||||||
|
echo "GitHub PR COMMIT RANGE: ${GITHUB_BASE_REF}..${GITHUB_HEAD_REF}"
|
||||||
|
git branch ${GITHUB_BASE_REF} origin/${GITHUB_BASE_REF}
|
||||||
|
git branch ${GITHUB_HEAD_REF} origin/${GITHUB_HEAD_REF}
|
||||||
|
BASE_SHA1=$(git rev-parse ${GITHUB_BASE_REF})
|
||||||
|
HEAD_SHA1=$(git rev-parse ${GITHUB_HEAD_REF})
|
||||||
|
FILES=$(git diff --diff-filter=AMR --name-only ${BASE_SHA1}..${HEAD_SHA1} | tr '\n' ' ' )
|
||||||
|
elif [ ! -z $GITHUB_SHA ]; then
|
||||||
|
echo "GitHub push COMMIT $GITHUB_SHA"
|
||||||
|
FILES=$(git diff --diff-filter=AMR --name-only ${GITHUB_SHA}~1..${GITHUB_SHA} | tr '\n' ' ' )
|
||||||
|
elif [ ! -z $TRAVIS_PULL_REQUEST_BRANCH ]; then
|
||||||
# if on a PR, just analyse the changed files
|
# if on a PR, just analyse the changed files
|
||||||
echo "TRAVIS PR BRANCH: $TRAVIS_PULL_REQUEST_BRANCH"
|
echo "TRAVIS PR BRANCH: $TRAVIS_PULL_REQUEST_BRANCH"
|
||||||
FILES=$(git diff --diff-filter=AM --name-only $(git merge-base HEAD master) | tr '\n' ' ' )
|
FILES=$(git diff --diff-filter=AMR --name-only $(git merge-base HEAD master) | tr '\n' ' ' )
|
||||||
elif [[ ! -z $TRAVIS_COMMIT_RANGE ]]; then
|
elif [ ! -z $TRAVIS_COMMIT_RANGE ]; then
|
||||||
echo "TRAVIS COMMIT RANGE: $TRAVIS_COMMIT_RANGE"
|
echo "TRAVIS COMMIT RANGE: $TRAVIS_COMMIT_RANGE"
|
||||||
FILES=$(git diff --diff-filter=AM --name-only ${TRAVIS_COMMIT_RANGE/.../..} | tr '\n' ' ' )
|
FILES=$(git diff --diff-filter=AMR --name-only ${TRAVIS_COMMIT_RANGE/.../..} | tr '\n' ' ' )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for f in $FILES; do
|
for f in $FILES; do
|
||||||
|
|
|
@ -21,6 +21,18 @@
|
||||||
"PublicSymbols": "public_symbols/openjpeg/current/list",
|
"PublicSymbols": "public_symbols/openjpeg/current/list",
|
||||||
"PublicTypes": "public_types/openjpeg/current/list"
|
"PublicTypes": "public_types/openjpeg/current/list"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Number": "2.4.0",
|
||||||
|
"Installed": "installed/openjpeg/2.4.0",
|
||||||
|
"Source": "src/openjpeg/2.4.0/version.-2.4.0.tar.gz",
|
||||||
|
"Changelog": "CHANGELOG.md",
|
||||||
|
"HeadersDiff": "On",
|
||||||
|
"PkgDiff": "Off",
|
||||||
|
"ABIView": "Off",
|
||||||
|
"ABIDiff": "Off",
|
||||||
|
"PublicSymbols": "public_symbols/openjpeg/2.4.0/list",
|
||||||
|
"PublicTypes": "public_types/openjpeg/2.4.0/list"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Number": "2.3.0",
|
"Number": "2.3.0",
|
||||||
"Installed": "installed/openjpeg/2.3.0",
|
"Installed": "installed/openjpeg/2.3.0",
|
||||||
|
|
|
@ -13,7 +13,7 @@ else()
|
||||||
set( CTEST_DASHBOARD_ROOT "$ENV{PWD}/build" )
|
set( CTEST_DASHBOARD_ROOT "$ENV{PWD}/build" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if("$ENV{TRAVIS_OS_NAME}" STREQUAL "windows")
|
if("$ENV{OPJ_SHORT_OS_NAME}" STREQUAL "windows")
|
||||||
set( CTEST_CMAKE_GENERATOR "NMake Makefiles")
|
set( CTEST_CMAKE_GENERATOR "NMake Makefiles")
|
||||||
set( CTEST_BUILD_COMMAND "nmake" )
|
set( CTEST_BUILD_COMMAND "nmake" )
|
||||||
set( JPYLYZER_EXT "exe" )
|
set( JPYLYZER_EXT "exe" )
|
||||||
|
@ -84,7 +84,7 @@ if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1")
|
||||||
# Note: Binaries can only be used for non-commercial purposes.
|
# Note: Binaries can only be used for non-commercial purposes.
|
||||||
if ("$ENV{OPJ_NONCOMMERCIAL}" STREQUAL "1" )
|
if ("$ENV{OPJ_NONCOMMERCIAL}" STREQUAL "1" )
|
||||||
set(KDUPATH $ENV{PWD}/kdu)
|
set(KDUPATH $ENV{PWD}/kdu)
|
||||||
if("$ENV{TRAVIS_OS_NAME}" STREQUAL "windows")
|
if("$ENV{OPJ_SHORT_OS_NAME}" STREQUAL "windows")
|
||||||
set(ENV{PATH} "$ENV{PATH};${KDUPATH}")
|
set(ENV{PATH} "$ENV{PATH};${KDUPATH}")
|
||||||
else()
|
else()
|
||||||
set(ENV{LD_LIBRARY_PATH} ${KDUPATH})
|
set(ENV{LD_LIBRARY_PATH} ${KDUPATH})
|
||||||
|
|
|
@ -35,7 +35,18 @@ OPJ_REPO="https://github.com/uclouvain/openjpeg.git"
|
||||||
OPJ_SSH_REPO=${OPJ_REPO/https:\/\/github.com\//git@github.com:}
|
OPJ_SSH_REPO=${OPJ_REPO/https:\/\/github.com\//git@github.com:}
|
||||||
OPJ_UPLOAD_BRANCH="gh-pages"
|
OPJ_UPLOAD_BRANCH="gh-pages"
|
||||||
OPJ_UPLOAD_DIR="abi-check"
|
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
|
if [ "$(echo "${TRAVIS_REPO_SLUG}" | sed 's/\(^.*\)\/.*/\1/')" == "uclouvain" ] && [ "${TRAVIS_PULL_REQUEST:-}" == "false" ] && [ "${TRAVIS_BRANCH:-}" == "master" ]; then
|
||||||
# Upload updated report to gh-pages
|
# Upload updated report to gh-pages
|
||||||
OPJ_UPLOAD_ABI_REPORT=1
|
OPJ_UPLOAD_ABI_REPORT=1
|
||||||
|
@ -44,8 +55,6 @@ if [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
|
|
||||||
|
|
||||||
# INSTALL REQUIRED PACKAGES
|
# INSTALL REQUIRED PACKAGES
|
||||||
|
|
||||||
mkdir ${HOME}/abi-check
|
mkdir ${HOME}/abi-check
|
||||||
|
@ -94,7 +103,9 @@ else
|
||||||
grep -v Configure ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > ./openjpeg.json
|
grep -v Configure ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > ./openjpeg.json
|
||||||
fi
|
fi
|
||||||
cp -rf ${OPJ_SOURCE_DIR} src/openjpeg/current
|
cp -rf ${OPJ_SOURCE_DIR} src/openjpeg/current
|
||||||
|
rm -f src/openjpeg/current/build/CMakeCache.txt
|
||||||
abi-monitor -v current -build openjpeg.json
|
abi-monitor -v current -build openjpeg.json
|
||||||
|
cat build_logs/openjpeg/current/make
|
||||||
|
|
||||||
rm -rf ./installed/openjpeg/${OPJ_LATEST_VERSION}
|
rm -rf ./installed/openjpeg/${OPJ_LATEST_VERSION}
|
||||||
rm -rf ./compat_report/openjpeg/${OPJ_LATEST_VERSION}
|
rm -rf ./compat_report/openjpeg/${OPJ_LATEST_VERSION}
|
||||||
|
|
|
@ -47,7 +47,9 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
|
||||||
OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
|
OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
|
||||||
|
|
||||||
# We need test data
|
# 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}
|
OPJ_DATA_BRANCH=${TRAVIS_BRANCH}
|
||||||
elif [ "${APPVEYOR_REPO_BRANCH:-}" != "" ]; then
|
elif [ "${APPVEYOR_REPO_BRANCH:-}" != "" ]; then
|
||||||
OPJ_DATA_BRANCH=${APPVEYOR_REPO_BRANCH}
|
OPJ_DATA_BRANCH=${APPVEYOR_REPO_BRANCH}
|
||||||
|
@ -59,12 +61,12 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
|
||||||
OPJ_DATA_BRANCH=master #default to master
|
OPJ_DATA_BRANCH=master #default to master
|
||||||
fi
|
fi
|
||||||
echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch"
|
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
|
# We need jpylyzer for the test suite
|
||||||
JPYLYZER_VERSION="1.17.0"
|
JPYLYZER_VERSION="1.17.0"
|
||||||
echo "Retrieving jpylyzer"
|
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
|
wget -q https://github.com/openpreserve/jpylyzer/releases/download/${JPYLYZER_VERSION}/jpylyzer_${JPYLYZER_VERSION}_win32.zip
|
||||||
mkdir jpylyzer
|
mkdir jpylyzer
|
||||||
cd 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.
|
# 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.
|
# Note: Binaries can only be used for non-commercial purposes.
|
||||||
if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then
|
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"
|
echo "Retrieving Kakadu"
|
||||||
wget -q http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_Linux-x86-64_200602.zip
|
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
|
cmake -E tar -xf KDU805_Demo_Apps_for_Linux-x86-64_200602.zip
|
||||||
mv KDU805_Demo_Apps_for_Linux-x86-64_200602 kdu
|
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"
|
echo "Retrieving Kakadu"
|
||||||
wget -v http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_MacOS_200602.dmg_.zip
|
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
|
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 -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_compress
|
||||||
install_name_tool -change /usr/local/lib/libkdu_v80R.dylib ${PWD}/libkdu_v80R.dylib kdu_expand
|
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"
|
echo "Retrieving Kakadu"
|
||||||
wget -q http://kakadusoftware.com/wp-content/uploads/KDU805_Demo_Apps_for_Win64_200602.msi_.zip
|
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
|
cmake -E tar -xf KDU805_Demo_Apps_for_Win64_200602.msi_.zip
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
NR-C1P0-p0_04.j2k-compare2base
|
||||||
|
NR-C1P0-p0_05.j2k-compare2base
|
||||||
|
NR-C1P0-p0_06.j2k-compare2base
|
||||||
|
NR-C1P1-p1_02.j2k-compare2base
|
||||||
|
NR-C1P1-p1_03.j2k-compare2base
|
||||||
|
NR-C1P1-p1_04.j2k-compare2base
|
||||||
|
NR-C1P1-p1_05.j2k-compare2base
|
||||||
|
NR-JP2-file2.jp2-compare2base
|
||||||
|
NR-JP2-file3.jp2-compare2base
|
||||||
|
NR-RIC-subsampling_1.jp2-compare2base
|
||||||
|
NR-RIC-subsampling_2.jp2-compare2base
|
||||||
|
NR-RIC-zoo1.jp2-compare2base
|
||||||
|
NR-RIC-zoo2.jp2-compare2base
|
||||||
|
NR-DEC-_00042.j2k-2-decode-md5
|
||||||
|
NR-DEC-buxI.j2k-9-decode-md5
|
||||||
|
NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5
|
||||||
|
NR-DEC-Marrin.jp2-18-decode-md5
|
||||||
|
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
|
||||||
|
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
|
||||||
|
NR-DEC-file409752.jp2-40-decode-md5
|
||||||
|
NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5
|
||||||
|
NR-DEC-issue206_image-000.jp2-42-decode-md5
|
||||||
|
NR-DEC-issue205.jp2-43-decode-md5
|
||||||
|
NR-DEC-issue228.j2k-60-decode-md5
|
||||||
|
NR-DEC-issue134.jp2-67-decode-md5
|
||||||
|
NR-DEC-issue135.j2k-68-decode-md5
|
||||||
|
NR-DEC-issue208.jp2-69-decode-md5
|
||||||
|
NR-DEC-issue211.jp2-70-decode-md5
|
||||||
|
NR-DEC-issue414.jp2-110-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-124-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-125-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-126-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-127-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-128-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-129-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-131-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-134-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-138-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-140-decode-md5
|
||||||
|
NR-DEC-p0_04.j2k-166-decode-md5
|
||||||
|
NR-DEC-p0_04.j2k-168-decode-md5
|
||||||
|
NR-DEC-p0_04.j2k-172-decode-md5
|
||||||
|
NR-DEC-issue205.jp2-253-decode-md5
|
||||||
|
NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5
|
||||||
|
NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5
|
||||||
|
NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5
|
||||||
|
NR-DEC-db11217111510058.jp2-306-decode-md5
|
||||||
|
NR-DEC-tnsot_zero.jp2-307-decode-md5
|
|
@ -0,0 +1,6 @@
|
||||||
|
NR-DEC-_00042.j2k-2-decode-md5
|
||||||
|
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
|
||||||
|
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
|
||||||
|
NR-DEC-issue205.jp2-43-decode-md5
|
||||||
|
NR-DEC-issue135.j2k-68-decode-md5
|
||||||
|
NR-DEC-issue208.jp2-69-decode-md5
|
|
@ -0,0 +1,45 @@
|
||||||
|
NR-C1P0-p0_04.j2k-compare2base
|
||||||
|
NR-C1P0-p0_05.j2k-compare2base
|
||||||
|
NR-C1P0-p0_06.j2k-compare2base
|
||||||
|
NR-C1P1-p1_02.j2k-compare2base
|
||||||
|
NR-C1P1-p1_03.j2k-compare2base
|
||||||
|
NR-C1P1-p1_04.j2k-compare2base
|
||||||
|
NR-C1P1-p1_05.j2k-compare2base
|
||||||
|
NR-RIC-subsampling_1.jp2-compare2base
|
||||||
|
NR-RIC-subsampling_2.jp2-compare2base
|
||||||
|
NR-RIC-zoo1.jp2-compare2base
|
||||||
|
NR-RIC-zoo2.jp2-compare2base
|
||||||
|
NR-DEC-_00042.j2k-2-decode-md5
|
||||||
|
NR-DEC-buxI.j2k-9-decode-md5
|
||||||
|
NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5
|
||||||
|
NR-DEC-Marrin.jp2-18-decode-md5
|
||||||
|
NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5
|
||||||
|
NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5
|
||||||
|
NR-DEC-file409752.jp2-40-decode-md5
|
||||||
|
NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5
|
||||||
|
NR-DEC-issue206_image-000.jp2-42-decode-md5
|
||||||
|
NR-DEC-issue205.jp2-43-decode-md5
|
||||||
|
NR-DEC-issue228.j2k-60-decode-md5
|
||||||
|
NR-DEC-issue142.j2k-66-decode-md5
|
||||||
|
NR-DEC-issue134.jp2-67-decode-md5
|
||||||
|
NR-DEC-issue135.j2k-68-decode-md5
|
||||||
|
NR-DEC-issue208.jp2-69-decode-md5
|
||||||
|
NR-DEC-issue211.jp2-70-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-124-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-125-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-126-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-127-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-128-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-129-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-131-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-138-decode-md5
|
||||||
|
NR-DEC-p1_04.j2k-140-decode-md5
|
||||||
|
NR-DEC-p0_04.j2k-166-decode-md5
|
||||||
|
NR-DEC-p0_04.j2k-167-decode-md5
|
||||||
|
NR-DEC-p0_04.j2k-168-decode-md5
|
||||||
|
NR-DEC-p0_04.j2k-172-decode-md5
|
||||||
|
NR-DEC-issue205.jp2-253-decode-md5
|
||||||
|
NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5
|
||||||
|
NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5
|
||||||
|
NR-DEC-db11217111510058.jp2-306-decode-md5
|
||||||
|
NR-DEC-tnsot_zero.jp2-307-decode-md5
|
|
@ -49,54 +49,69 @@ OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
|
||||||
if [ "${OPJ_DO_SUBMIT:-}" == "" ]; then
|
if [ "${OPJ_DO_SUBMIT:-}" == "" ]; then
|
||||||
OPJ_DO_SUBMIT=0 # Do not flood cdash by default
|
OPJ_DO_SUBMIT=0 # Do not flood cdash by default
|
||||||
fi
|
fi
|
||||||
if [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then
|
|
||||||
|
if [ "${GITHUB_REPOSITORY:-}" != "" ]; then
|
||||||
|
OPJ_OWNER=$(echo "${GITHUB_REPOSITORY}" | sed 's/\(^.*\)\/.*/\1/')
|
||||||
|
OPJ_SITE="${OPJ_OWNER}.gha"
|
||||||
|
elif [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then
|
||||||
OPJ_OWNER=$(echo "${TRAVIS_REPO_SLUG}" | sed 's/\(^.*\)\/.*/\1/')
|
OPJ_OWNER=$(echo "${TRAVIS_REPO_SLUG}" | sed 's/\(^.*\)\/.*/\1/')
|
||||||
OPJ_SITE="${OPJ_OWNER}.travis-ci.org"
|
OPJ_SITE="${OPJ_OWNER}.travis-ci.org"
|
||||||
if [ "${OPJ_OWNER}" == "uclouvain" ]; then
|
|
||||||
OPJ_DO_SUBMIT=1
|
|
||||||
fi
|
|
||||||
elif [ "${APPVEYOR_REPO_NAME:-}" != "" ]; then
|
elif [ "${APPVEYOR_REPO_NAME:-}" != "" ]; then
|
||||||
OPJ_OWNER=$(echo "${APPVEYOR_REPO_NAME}" | sed 's/\(^.*\)\/.*/\1/')
|
OPJ_OWNER=$(echo "${APPVEYOR_REPO_NAME}" | sed 's/\(^.*\)\/.*/\1/')
|
||||||
OPJ_SITE="${OPJ_OWNER}.appveyor.com"
|
OPJ_SITE="${OPJ_OWNER}.appveyor.com"
|
||||||
if [ "${OPJ_OWNER}" == "uclouvain" ]; then
|
|
||||||
OPJ_DO_SUBMIT=1
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
OPJ_SITE="$(hostname)"
|
OPJ_SITE="$(hostname)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${TRAVIS_OS_NAME:-}" == "" ]; then
|
if [ "${OPJ_OWNER:-}" == "uclouvain" ]; then
|
||||||
|
OPJ_DO_SUBMIT=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${RUNNER_OS:-}" != "" ]; then
|
||||||
|
if [ "${RUNNER_OS:-}" == "Linux" ]; then
|
||||||
|
OPJ_SHORT_OS_NAME=linux
|
||||||
|
elif [ "${RUNNER_OS:-}" == "Windows" ]; then
|
||||||
|
OPJ_SHORT_OS_NAME=windows
|
||||||
|
elif [ "${RUNNER_OS:-}" == "macOS" ]; then
|
||||||
|
OPJ_SHORT_OS_NAME=osx
|
||||||
|
else
|
||||||
|
echo "Unhandled RUNNER_OS = ${RUNNER_OS:-}"; exit 1
|
||||||
|
fi
|
||||||
|
elif [ "${TRAVIS_OS_NAME:-}" != "" ]; then
|
||||||
|
OPJ_SHORT_OS_NAME="${${TRAVIS_OS_NAME:-}}"
|
||||||
|
else
|
||||||
# Let's guess OS for testing purposes
|
# Let's guess OS for testing purposes
|
||||||
echo "Guessing OS"
|
echo "Guessing OS"
|
||||||
if uname -s | grep -i Darwin &> /dev/null; then
|
if uname -s | grep -i Darwin &> /dev/null; then
|
||||||
TRAVIS_OS_NAME=osx
|
OPJ_SHORT_OS_NAME=osx
|
||||||
elif uname -s | grep -i Linux &> /dev/null; then
|
elif uname -s | grep -i Linux &> /dev/null; then
|
||||||
TRAVIS_OS_NAME=linux
|
OPJ_SHORT_OS_NAME=linux
|
||||||
if [ "${CC:-}" == "" ]; then
|
|
||||||
# default to gcc
|
|
||||||
export CC=gcc
|
|
||||||
fi
|
|
||||||
elif uname -s | grep -i CYGWIN &> /dev/null; then
|
elif uname -s | grep -i CYGWIN &> /dev/null; then
|
||||||
TRAVIS_OS_NAME=windows
|
OPJ_SHORT_OS_NAME=windows
|
||||||
elif uname -s | grep -i MINGW &> /dev/null; then
|
elif uname -s | grep -i MINGW &> /dev/null; then
|
||||||
TRAVIS_OS_NAME=windows
|
OPJ_SHORT_OS_NAME=windows
|
||||||
elif [ "${APPVEYOR:-}" == "True" ]; then
|
elif [ "${APPVEYOR:-}" == "True" ]; then
|
||||||
TRAVIS_OS_NAME=windows
|
OPJ_SHORT_OS_NAME=windows
|
||||||
else
|
else
|
||||||
echo "Failed to guess OS"; exit 1
|
echo "Failed to guess OS"; exit 1
|
||||||
fi
|
fi
|
||||||
echo "${TRAVIS_OS_NAME}"
|
echo "${OPJ_SHORT_OS_NAME}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
|
if [ "${OPJ_SHORT_OS_NAME}" == "osx" ]; then
|
||||||
OPJ_OS_NAME=$(sw_vers -productName | tr -d ' ')$(sw_vers -productVersion | sed 's/\([^0-9]*\.[0-9]*\).*/\1/')
|
OPJ_OS_NAME=$(sw_vers -productName | tr -d ' ')$(sw_vers -productVersion | sed 's/\([^0-9]*\.[0-9]*\).*/\1/')
|
||||||
OPJ_CC_VERSION=$(xcodebuild -version | grep -i xcode)
|
OPJ_CC_VERSION=$(xcodebuild -version | grep -i xcode)
|
||||||
OPJ_CC_VERSION=xcode${OPJ_CC_VERSION:6}
|
OPJ_CC_VERSION=xcode${OPJ_CC_VERSION:6}
|
||||||
elif [ "${TRAVIS_OS_NAME}" == "linux" ]; then
|
elif [ "${OPJ_SHORT_OS_NAME}" == "linux" ]; then
|
||||||
OPJ_OS_NAME=linux
|
OPJ_OS_NAME=linux
|
||||||
if which lsb_release > /dev/null; then
|
if which lsb_release > /dev/null; then
|
||||||
OPJ_OS_NAME=$(lsb_release -si)$(lsb_release -sr | sed 's/\([^0-9]*\.[0-9]*\).*/\1/')
|
OPJ_OS_NAME=$(lsb_release -si)$(lsb_release -sr | sed 's/\([^0-9]*\.[0-9]*\).*/\1/')
|
||||||
fi
|
fi
|
||||||
|
if [ "${CC:-}" == "" ]; then
|
||||||
|
# default to gcc
|
||||||
|
export CC=gcc
|
||||||
|
echo "Defaulting to CC=gcc"
|
||||||
|
fi
|
||||||
if [ -z "${CC##*gcc*}" ]; then
|
if [ -z "${CC##*gcc*}" ]; then
|
||||||
OPJ_CC_VERSION=$(${CC} --version | head -1 | sed 's/.*\ \([0-9.]*[0-9]\)/\1/')
|
OPJ_CC_VERSION=$(${CC} --version | head -1 | sed 's/.*\ \([0-9.]*[0-9]\)/\1/')
|
||||||
if [ -z "${CC##*mingw*}" ]; then
|
if [ -z "${CC##*mingw*}" ]; then
|
||||||
|
@ -122,7 +137,7 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" ]; then
|
||||||
export OPJ_CI_SKIP_TESTS=1
|
export OPJ_CI_SKIP_TESTS=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
elif [ "${TRAVIS_OS_NAME}" == "windows" ]; then
|
elif [ "${OPJ_SHORT_OS_NAME}" == "windows" ]; then
|
||||||
OPJ_OS_NAME=windows
|
OPJ_OS_NAME=windows
|
||||||
if which cl > /dev/null; then
|
if which cl > /dev/null; then
|
||||||
OPJ_CL_VERSION=$(cl 2>&1 | grep Version | sed 's/.*Version \([0-9]*\).*/\1/')
|
OPJ_CL_VERSION=$(cl 2>&1 | grep Version | sed 's/.*Version \([0-9]*\).*/\1/')
|
||||||
|
@ -152,7 +167,7 @@ elif [ "${TRAVIS_OS_NAME}" == "windows" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "OS not supported: ${TRAVIS_OS_NAME}"; exit 1
|
echo "OS not supported: ${OPJ_SHORT_OS_NAME}"; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${OPJ_CI_ARCH:-}" == "" ]; then
|
if [ "${OPJ_CI_ARCH:-}" == "" ]; then
|
||||||
|
@ -164,18 +179,27 @@ if [ "${OPJ_CI_ARCH:-}" == "" ]; then
|
||||||
echo "${OPJ_CI_ARCH}"
|
echo "${OPJ_CI_ARCH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${TRAVIS_BRANCH:-}" == "" ]; then
|
if [ "${GITHUB_HEAD_REF:-}" != "" ]; then
|
||||||
if [ "${APPVEYOR_REPO_BRANCH:-}" != "" ]; then
|
OPJ_BRANCH=${GITHUB_HEAD_REF}
|
||||||
TRAVIS_BRANCH=${APPVEYOR_REPO_BRANCH}
|
elif [ "${TRAVIS_BRANCH:-}" != "" ]; then
|
||||||
|
OPJ_BRANCH=${TRAVIS_BRANCH}
|
||||||
|
elif [ "${APPVEYOR_REPO_BRANCH:-}" != "" ]; then
|
||||||
|
OPJ_BRANCH=${APPVEYOR_REPO_BRANCH}
|
||||||
else
|
else
|
||||||
echo "Guessing branch"
|
echo "Guessing branch"
|
||||||
TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]')
|
OPJ_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]')
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OPJ_BUILDNAME=${OPJ_OS_NAME}-${OPJ_CC_VERSION}-${OPJ_CI_ARCH}-${TRAVIS_BRANCH}
|
OPJ_BUILDNAME=${OPJ_OS_NAME}-${OPJ_CC_VERSION}-${OPJ_CI_ARCH}-${OPJ_BRANCH}
|
||||||
OPJ_BUILDNAME_TEST=${OPJ_OS_NAME}-${OPJ_CC_VERSION}-${OPJ_CI_ARCH}
|
OPJ_BUILDNAME_TEST=${OPJ_OS_NAME}-${OPJ_CC_VERSION}-${OPJ_CI_ARCH}
|
||||||
if [ "${TRAVIS_PULL_REQUEST:-}" != "false" ] && [ "${TRAVIS_PULL_REQUEST:-}" != "" ]; then
|
if [ "${OPJ_CI_INSTRUCTION_SETS-:}" == "/arch:AVX2" ]; then
|
||||||
|
OPJ_BUILDNAME=${OPJ_BUILDNAME}-avx2
|
||||||
|
OPJ_BUILDNAME_TEST=${OPJ_BUILDNAME_TEST}-avx2
|
||||||
|
fi
|
||||||
|
if [ "${GITHUB_EVENT_NAME:-}" = "pull_request" ]; then
|
||||||
|
PULL_REQUEST_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
|
||||||
|
OPJ_BUILDNAME=${OPJ_BUILDNAME}-${PULL_REQUEST_NUMBER}
|
||||||
|
elif [ "${TRAVIS_PULL_REQUEST:-}" != "false" ] && [ "${TRAVIS_PULL_REQUEST:-}" != "" ]; then
|
||||||
OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${TRAVIS_PULL_REQUEST}
|
OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${TRAVIS_PULL_REQUEST}
|
||||||
elif [ "${APPVEYOR_PULL_REQUEST_NUMBER:-}" != "" ]; then
|
elif [ "${APPVEYOR_PULL_REQUEST_NUMBER:-}" != "" ]; then
|
||||||
OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${APPVEYOR_PULL_REQUEST_NUMBER}
|
OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${APPVEYOR_PULL_REQUEST_NUMBER}
|
||||||
|
@ -206,7 +230,7 @@ set -x
|
||||||
# travis-ci doesn't dump cmake version in system info, let's print it
|
# travis-ci doesn't dump cmake version in system info, let's print it
|
||||||
cmake --version
|
cmake --version
|
||||||
|
|
||||||
export TRAVIS_OS_NAME=${TRAVIS_OS_NAME}
|
export OPJ_SHORT_OS_NAME=${OPJ_SHORT_OS_NAME}
|
||||||
export OPJ_SITE=${OPJ_SITE}
|
export OPJ_SITE=${OPJ_SITE}
|
||||||
export OPJ_BUILDNAME=${OPJ_BUILDNAME}
|
export OPJ_BUILDNAME=${OPJ_BUILDNAME}
|
||||||
export OPJ_SOURCE_DIR=$(opjpath -m ${OPJ_SOURCE_DIR})
|
export OPJ_SOURCE_DIR=$(opjpath -m ${OPJ_SOURCE_DIR})
|
||||||
|
@ -236,6 +260,8 @@ if [ "${TRAVIS_TAG:-}" != "" ]; then
|
||||||
OPJ_TAG_NAME=${TRAVIS_TAG}
|
OPJ_TAG_NAME=${TRAVIS_TAG}
|
||||||
elif [ "${APPVEYOR_REPO_TAG:-}" == "true" ]; then
|
elif [ "${APPVEYOR_REPO_TAG:-}" == "true" ]; then
|
||||||
OPJ_TAG_NAME=${APPVEYOR_REPO_TAG_NAME}
|
OPJ_TAG_NAME=${APPVEYOR_REPO_TAG_NAME}
|
||||||
|
elif test $(git describe --exact-match --tags 2>/dev/null); then
|
||||||
|
OPJ_TAG_NAME="$(git describe --exact-match --tags)"
|
||||||
else
|
else
|
||||||
OPJ_TAG_NAME=""
|
OPJ_TAG_NAME=""
|
||||||
fi
|
fi
|
||||||
|
@ -243,12 +269,12 @@ if [ "${OPJ_CI_INCLUDE_IF_DEPLOY:-}" == "1" ] && [ "${OPJ_TAG_NAME:-}" != "" ];
|
||||||
#if [ "${OPJ_CI_INCLUDE_IF_DEPLOY:-}" == "1" ]; then
|
#if [ "${OPJ_CI_INCLUDE_IF_DEPLOY:-}" == "1" ]; then
|
||||||
OPJ_CI_DEPLOY=1 # unused for now
|
OPJ_CI_DEPLOY=1 # unused for now
|
||||||
OPJ_CUR_DIR=${PWD}
|
OPJ_CUR_DIR=${PWD}
|
||||||
if [ "${TRAVIS_OS_NAME:-}" == "linux" ]; then
|
if [ "${OPJ_SHORT_OS_NAME:-}" == "linux" ]; then
|
||||||
OPJ_PACK_GENERATOR="TGZ" # ZIP generator currently segfaults on linux
|
OPJ_PACK_GENERATOR="TGZ" # ZIP generator currently segfaults on linux
|
||||||
else
|
else
|
||||||
OPJ_PACK_GENERATOR="ZIP"
|
OPJ_PACK_GENERATOR="ZIP"
|
||||||
fi
|
fi
|
||||||
OPJ_PACK_NAME="openjpeg-${OPJ_TAG_NAME}-${TRAVIS_OS_NAME}-${OPJ_CI_ARCH}"
|
OPJ_PACK_NAME="openjpeg-${OPJ_TAG_NAME}-${OPJ_SHORT_OS_NAME}-${OPJ_CI_ARCH}"
|
||||||
cd ${OPJ_BINARY_DIR}
|
cd ${OPJ_BINARY_DIR}
|
||||||
cmake -D CPACK_GENERATOR:STRING=${OPJ_PACK_GENERATOR} -D CPACK_PACKAGE_FILE_NAME:STRING=${OPJ_PACK_NAME} ${OPJ_SOURCE_DIR}
|
cmake -D CPACK_GENERATOR:STRING=${OPJ_PACK_GENERATOR} -D CPACK_PACKAGE_FILE_NAME:STRING=${OPJ_PACK_NAME} ${OPJ_SOURCE_DIR}
|
||||||
cd ${OPJ_CUR_DIR}
|
cd ${OPJ_CUR_DIR}
|
||||||
|
@ -330,7 +356,7 @@ if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
|
||||||
"
|
"
|
||||||
else
|
else
|
||||||
echo "
|
echo "
|
||||||
New/unknown test failure found!!!
|
New/unknown test failure found!!! You may need to update/create tools/travis-ci/knownfailures-${OPJ_BUILDNAME_TEST}.txt
|
||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -365,7 +391,7 @@ if [ "${OPJ_CI_PERF_TESTS:-}" == "1" ]; then
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
REF_VERSION=master
|
REF_VERSION=master
|
||||||
if [ "${TRAVIS_PULL_REQUEST:-false}" == "false" ]; then
|
if [ "${TRAVIS_PULL_REQUEST:-false}" == "false" -a "${GITHUB_EVENT_NAME:-}" != "pull_request" ]; then
|
||||||
REF_VERSION=v2.1.2
|
REF_VERSION=v2.1.2
|
||||||
fi
|
fi
|
||||||
if [ ! -d ref_opj ]; then
|
if [ ! -d ref_opj ]; then
|
||||||
|
|
Loading…
Reference in New Issue