Commit 164518f4 authored by Paal Kvamme's avatar Paal Kvamme
Browse files

Merge branch 'kvamme62/without-sdapi' into 'master'

Building without Seismic Store

See merge request !34
parents 5ef00236 b7899071
Pipeline #23901 passed with stages
in 6 minutes and 1 second
# name: 'OpenZGY Linux Ubuntu Bionic py36'
name: $(Build.BuildID)-bionic
trigger: none
schedules:
- cron: "0 3 * * *"
displayName: Nightly build
branches:
include:
- master
pool:
name: Paal-Kvamme-Test
variables:
- group: 'Salmon Variables'
steps:
- template: templates/build-steps.yml
parameters:
linuxdistro: 'bionic'
tagtail: 'nosd'
makeargs: HAVE_SD=
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
deploy/pure/OpenZGY-*.tar.gz
deploy/native/bionic-gcc75/libopenzgy.so.*.*
deploy/native/include/openzgy/api.h
deploy/native/include/openzgy/exception.h
deploy/native/include/openzgy/iocontext.h
deploy/wrapper/bionic-gcc75/OpenZgyBindings-*-cp36-cp36m-linux_x86_64.whl
......@@ -20,6 +20,7 @@ steps:
parameters:
makeargs: SDAPI_OSDU=ON
linuxdistro: 'bionic'
tagtail: 'osdu'
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
......
# name: 'OpenZGY Linux Debian Buster py37'
name: $(Build.BuildID)-buster
trigger: none
schedules:
- cron: "10 3 * * *"
displayName: Nightly build
branches:
include:
- master
pool:
name: Paal-Kvamme-Test
variables:
- group: 'Salmon Variables'
steps:
- template: templates/build-steps.yml
parameters:
linuxdistro: 'buster'
tagtail: 'nosd'
makeargs: HAVE_SD=
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
deploy/pure/OpenZGY-*.tar.gz
deploy/native/buster-gcc83/libopenzgy.so.*.*
deploy/native/include/openzgy/api.h
deploy/native/include/openzgy/exception.h
deploy/native/include/openzgy/iocontext.h
deploy/wrapper/buster-gcc83/OpenZgyBindings-*-cp37-cp37m-linux_x86_64.whl
......@@ -20,6 +20,7 @@ steps:
parameters:
makeargs: SDAPI_OSDU=ON
linuxdistro: 'buster'
tagtail: 'osdu'
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
......
# name: 'OpenZGY Linux CentOS 7 py36'
name: $(Build.BuildID)-centos7
trigger: none
schedules:
- cron: "20 3 * * *"
displayName: Nightly build
branches:
include:
- master
pool:
name: Paal-Kvamme-Test
variables:
- group: 'Salmon Variables'
steps:
- template: templates/build-steps.yml
parameters:
linuxdistro: 'centos7'
tagtail: 'nosd'
makeargs: HAVE_SD=
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
deploy/pure/OpenZGY-*.tar.gz
deploy/native/centos7-gcc48/libopenzgy.so.*.*
deploy/native/include/openzgy/api.h
deploy/native/include/openzgy/exception.h
deploy/native/include/openzgy/iocontext.h
deploy/wrapper/centos7-gcc48/OpenZgyBindings-*-cp36-cp36m-linux_x86_64.whl
......@@ -20,6 +20,7 @@ steps:
parameters:
makeargs: SDAPI_OSDU=ON
linuxdistro: 'centos7'
tagtail: 'osdu'
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
......
# name: 'OpenZGY Linux CentOS 8 py36'
name: $(Build.BuildID)-centos8
trigger: none
schedules:
- cron: "30 3 * * *"
displayName: Nightly build
branches:
include:
- master
pool:
name: Paal-Kvamme-Test
variables:
- group: 'Salmon Variables'
steps:
- template: templates/build-steps.yml
parameters:
linuxdistro: 'centos8'
tagtail: 'nosd'
makeargs: HAVE_SD=
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
deploy/pure/OpenZGY-*.tar.gz
deploy/native/centos8-gcc83/libopenzgy.so.*.*
deploy/native/include/openzgy/api.h
deploy/native/include/openzgy/exception.h
deploy/native/include/openzgy/iocontext.h
deploy/wrapper/centos8-gcc83/OpenZgyBindings-*-cp36-cp36m-linux_x86_64.whl
......@@ -20,6 +20,7 @@ steps:
parameters:
makeargs: SDAPI_OSDU=ON
linuxdistro: 'centos8'
tagtail: 'osdu'
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
......
# name: 'OpenZGY Linux Ubuntu Focal py38'
name: $(Build.BuildID)-focal
trigger: none
schedules:
- cron: "40 3 * * *"
displayName: Nightly build
branches:
include:
- master
pool:
name: Paal-Kvamme-Test
variables:
- group: 'Salmon Variables'
steps:
- template: templates/build-steps.yml
parameters:
linuxdistro: 'focal'
tagtail: 'nosd'
makeargs: HAVE_SD=
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
deploy/pure/OpenZGY-*.tar.gz
deploy/native/focal-gcc93/libopenzgy.so.*.*
deploy/native/include/openzgy/api.h
deploy/native/include/openzgy/exception.h
deploy/native/include/openzgy/iocontext.h
deploy/wrapper/focal-gcc93/OpenZgyBindings-*-cp38-cp38-linux_x86_64.whl
......@@ -20,6 +20,7 @@ steps:
parameters:
makeargs: SDAPI_OSDU=ON
linuxdistro: 'focal'
tagtail: 'osdu'
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
......
# name: 'OpenZGY Linux Debian Stretch py35'
name: $(Build.BuildID)-stretch
trigger: none
schedules:
- cron: "50 3 * * *"
displayName: Nightly build
branches:
include:
- master
pool:
name: Paal-Kvamme-Test
variables:
- group: 'Salmon Variables'
steps:
- template: templates/build-steps.yml
parameters:
linuxdistro: 'stretch'
tagtail: 'nosd'
makeargs: HAVE_SD=
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
deploy/pure/OpenZGY-*.tar.gz
deploy/native/stretch-gcc63/libopenzgy.so.*.*
deploy/native/include/openzgy/api.h
deploy/native/include/openzgy/exception.h
deploy/native/include/openzgy/iocontext.h
deploy/wrapper/stretch-gcc63/OpenZgyBindings-*-cp35-cp35m-linux_x86_64.whl
......@@ -20,6 +20,7 @@ steps:
parameters:
makeargs: SDAPI_OSDU=ON
linuxdistro: 'stretch'
tagtail: 'osdu'
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
......
# name: 'OpenZGY Linux Ubuntu Xenial py35'
name: $(Build.BuildID)-xenial
trigger: none
schedules:
- cron: "55 3 * * *"
displayName: Nightly build
branches:
include:
- master
pool:
name: Paal-Kvamme-Test
variables:
- group: 'Salmon Variables'
steps:
- template: templates/build-steps.yml
parameters:
linuxdistro: 'xenial'
tagtail: 'nosd'
makeargs: HAVE_SD=
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
deploy/pure/OpenZGY-*.tar.gz
deploy/native/xenial-gcc54/libopenzgy.so.*.*
deploy/native/include/openzgy/api.h
deploy/native/include/openzgy/exception.h
deploy/native/include/openzgy/iocontext.h
deploy/wrapper/xenial-gcc54/OpenZgyBindings-*-cp35-cp35m-linux_x86_64.whl
......@@ -20,6 +20,7 @@ steps:
parameters:
makeargs: SDAPI_OSDU=ON
linuxdistro: 'xenial'
tagtail: 'osdu'
deployed: >
deploy.tgz
deploy/pure/OpenZGY-*-py3-none-any.whl
......
......@@ -2,6 +2,7 @@ parameters:
linuxdistro: 'centos8'
deployed: .
makeargs: ''
tagtail: 'default'
steps:
- checkout: self
......@@ -13,6 +14,8 @@ steps:
pwd
ls
ls seismic-service-bin
condition: and(succeeded(), or(contains('${{parameters.makeargs}}', 'SDAPI_INTERNAL=ON'), contains('${{parameters.makeargs}}', 'SDAPI_OSDU=ON')))
displayName: 'Checkout additional (binary) sources'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
......@@ -34,7 +37,7 @@ steps:
set -e -x
export LINUXDISTRO=${{parameters.linuxdistro}}
export DOCKERFILE=scripts/Dockerfile-${LINUXDISTRO}
TAG=azure-build-openzgy-${LINUXDISTRO}
TAG=azure-build-openzgy-${LINUXDISTRO}-${{parameters.tagtail}}
docker tag ${TAG} ${TAG}:old || true
mkdir -p seismic-service-bin private
docker build --pull -t ${TAG} -f ${DOCKERFILE} .
......@@ -56,7 +59,7 @@ steps:
displayName: 'Build OpenZGY'
- bash: |
TAG=azure-build-openzgy-${{parameters.linuxdistro}}
TAG=azure-build-openzgy-${{parameters.linuxdistro}}-${{parameters.tagtail}}
docker run --rm -e OPENZGY_TOKEN -e OPENZGY_SDURL -e OPENZGY_SDAPIKEY -e LINUXDISTRO=${{parameters.linuxdistro}} ${TAG}:test native/src/runtests.sh
env:
OPENZGY_TOKEN: $(SEISMIC_STORE_TEST_TOKEN)
......@@ -65,7 +68,7 @@ steps:
displayName: 'Test native'
- bash: |
TAG=azure-build-openzgy-${{parameters.linuxdistro}}
TAG=azure-build-openzgy-${{parameters.linuxdistro}}-${{parameters.tagtail}}
docker run --rm -e OPENZGY_TOKEN -e OPENZGY_SDURL -e OPENZGY_SDAPIKEY -e LINUXDISTRO=${{parameters.linuxdistro}} ${TAG}:test native/sdglue/runtests.sh
env:
OPENZGY_TOKEN: $(SEISMIC_STORE_TEST_TOKEN)
......@@ -74,7 +77,7 @@ steps:
displayName: 'Test sdglue'
- bash: |
TAG=azure-build-openzgy-${{parameters.linuxdistro}}
TAG=azure-build-openzgy-${{parameters.linuxdistro}}-${{parameters.tagtail}}
docker run --rm -e OPENZGY_TOKEN -e OPENZGY_SDURL -e OPENZGY_SDAPIKEY -e LINUXDISTRO=${{parameters.linuxdistro}} ${TAG}:test wrapper/runtests.sh
env:
OPENZGY_TOKEN: $(SEISMIC_STORE_TEST_TOKEN)
......@@ -83,7 +86,7 @@ steps:
displayName: 'Test wrapper'
- bash: |
TAG=azure-build-openzgy-${{parameters.linuxdistro}}
TAG=azure-build-openzgy-${{parameters.linuxdistro}}-${{parameters.tagtail}}
docker run --rm -e OPENZGY_TOKEN -e OPENZGY_SDURL -e OPENZGY_SDAPIKEY -e LINUXDISTRO=${{parameters.linuxdistro}} ${TAG}:test python/runtests.sh
env:
OPENZGY_TOKEN: $(SEISMIC_STORE_TEST_TOKEN)
......
......@@ -11,6 +11,40 @@ set -e
cd $(dirname $0)/../..
# If OpenZGY was built without Seismic Store support then these tests
# do not apply. Unfortunately I cannot access native/src/Make.packages,
# so this check is not very elegant. The main problem is to figure out
# whether Seismic Store was actually meant to be present.
SDSDKS=$(/bin/ls seismic-service-bin/*/sdapi* 2>/dev/null || /bin/true)
WHEELS=$(/bin/ls build/deploy/sdglue/*/SdGlue-*.whl 2>/dev/null || /bin/true)
if [ x"${WHEELS}" = "x" -a ! -r build/deploy/sdglue/requirements.txt ]
then
# Test will not succeed. Try to understand why.
if [ x"${SDSDKS}" = "x" ]
then
# No SDAPI SDK found for any platform. It is safe to assume
# that the user did not expect to build with cloud support.
echo >&2 "OpenZGY built without Seismic Store support. Skip sdglue tests."
exit 0
else
# The build might still be good, e.g. is the user passed
# an explicit "HAVE_SD=" to the top level Makefile. Telling
# it to not build SD even though the library exists.
# But for now, treat this case as a failure.
echo >&2 "OpenZGY has problems with Seismic Store support."
echo >&2 "If you meant to build without Seismic Store then"
echo >&2 "please rename or delete seismic-service-bin."
exit 1
fi
else
# There might still be problems, such as the SDAPI SDK being
# present but not for this platform. This is assumed to be a
# real problem. It will cause failures below, so I don't
# need an explicit test here.
echo "OpenZGY was built with Seismic Store. Testing sdglue."
fi
# Local trick in my environment: If this is an impersonation token then
# refresh it now. This is more performant. Also, the way the tests work
# right now, the impersonation token might not be recognized as such.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment