Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
include:
- local: linux.gitlab-ci.yml
rules:
- if: $PLATFORM == 'linux'
when: always
- if: $PLATFORM == 'windows'
when: never
- if: $PLATFORM == 'darwin'
when: never
- local: windows.gitlab-ci.yml
rules:
- if: $PLATFORM == 'windows'
when: always
- if: $PLATFORM == 'linux'
when: never
- if: $PLATFORM == 'darwin'
when: never
- local: darwin.gitlab-ci.yml
rules:
- if: $PLATFORM == 'darwin'
when: always
- if: $PLATFORM == 'linux'
when: never
- if: $PLATFORM == 'windows'
when: never

default:
image: docker-hosted.snap-ci.ovh/snap-installer:10.0.0-RC1-snapshot
cache:
Expand All @@ -35,6 +9,7 @@ default:

variables:
VERSION: 10.0.0-RC1
# Can be 'linux' | 'windows' | 'darwin'
PLATFORM: linux
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# $DOCKER_AUTH_CONFIG should have been setup as projet variable
Expand All @@ -61,3 +36,6 @@ variables:
stages:
- test
- report

include:
- local: $PLATFORM.gitlab-ci.yml
17 changes: 7 additions & 10 deletions darwin.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ test_mac:
tags:
- mac
stage: test
rules:
- if: $PLATFORM == 'darwin'
when: always
- when: never
# rules:
# - if: $CI_COMMIT_TAG
# variables:
# DL_URL: https://nexus.snap-ci.ovh/repository/snap-maven-releases/org/esa/snap/installers/snap_all_macos/RC10/snap_all_macos-RC10.dmg
Expand All @@ -28,7 +25,7 @@ test_mac:
-DdeployAtEnd=false
-Dmaven.wagon.http.ssl.insecure=true
-Dmaven.wagon.http.ssl.allowall=true
DL_URL: https://nexus.snap-ci.ovh/repository/snap-maven-releases/org/esa/snap/installers-snapshot/snap_all_macos_archive/$VERSION/snap_all_macos_archive-$VERSION.dmg
DL_URL: "https://nexus.snap-ci.ovh/repository/snap-maven-releases/org/esa/snap/installers-snapshot/snap_all_macos_archive/${VERSION}/snap_all_macos_archive-$VERSION.dmg"
before_script:
- mvn $MAVEN_CLI_OPTS package install
- ls "${CI_PROJECT_DIR}/gpt-tests-executer/target"
Expand All @@ -39,13 +36,15 @@ test_mac:
- pip3 install -r $CI_PROJECT_DIR/requirements.txt
- curl --progress-bar "${DL_URL}" >> "${CI_PROJECT_DIR}/${SNAP_INSTALLER}"
- hdiutil attach ${CI_PROJECT_DIR}/${SNAP_INSTALLER}
- "/Volumes/esa-snap 1/ESA SNAP.app/Contents/MacOS/JavaApplicationStub" -q -console -dir $SNAP_DIR
- 'INSTALL4J_LOG=yes "/Volumes/esa-snap/ESA SNAP.app/Contents/MacOS/JavaApplicationStub" -dir ${SNAP_DIR} -q -console -overwrite -Dsnap.mainClass=org.esa.snap.main.Main'
# - rm -rf $SNAP_DIR && ls /Volumes/esa-snap
# - cp -rf "/Volumes/esa-snap/ESA SNAP.app/Contents/Resources/app" $SNAP_DIR && ls $SNAP_DIR
- ls $SNAP_DIR/bin
- python3 $CI_PROJECT_DIR/pygpt/filter_json.py gpt-tests-resources/tests $SCOPE $REPORT_DIR
script:
- $CI_PROJECT_DIR/prepare.sh "${REPORT_DIR}" "${TEST_DATA_DIR}" "${TEST_DATA_LIST}" "${S3_BUCKET}" "${S3_ARGS}" "${CI_PROJECT_DIR}"
after_script:
- hdiutil eject /dev/disk3
- hdiutil detach /dev/disk3
artifacts:
when: always
expire_in: "3 days"
Expand All @@ -57,9 +56,7 @@ report:
tags:
- mac
rules:
- if: $PLATFORM == 'darwin' && $SCOPE != 'CItest'
when: always
- when: never
- if: $SCOPE != 'CItest'
- if: $CI_COMMIT_BRANCH == 'master'
variables:
VERSION: snap:master
Expand Down
18 changes: 8 additions & 10 deletions linux.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test_CItest:
variables:
TEST_DATA_LIST: singleTestData.txt
rules:
- if: $SCOPE == 'CItest' && $PLATFORM == 'linux'
- if: $SCOPE == 'CItest'
when: always
- when: never
parallel: 2
Expand All @@ -67,7 +67,7 @@ test_s3tbx:
variables:
TEST_DATA_LIST: singleTestData.txt
rules:
- if: $SCOPE == 's3tbx' && $PLATFORM == 'linux'
- if: $SCOPE == 's3tbx'
when: always
- when: never
parallel: 22
Expand All @@ -76,7 +76,7 @@ test_s3tbx:
test_s2tbx:
tags: [kube]
rules:
- if: $SCOPE == 's2tbx' && $PLATFORM == 'linux'
- if: $SCOPE == 's2tbx'
when: always
- when: never
parallel: 100
Expand All @@ -85,7 +85,7 @@ test_s2tbx:
test_s1tbx:
tags: [kube]
rules:
- if: $SCOPE == 's1tbx' && $PLATFORM == 'linux'
- if: $SCOPE == 's1tbx'
when: always
- when: never
parallel: 34
Expand All @@ -94,7 +94,7 @@ test_s1tbx:
test_snap:
tags: [kube]
rules:
- if: $SCOPE == 'snap' && $PLATFORM == 'linux'
- if: $SCOPE == 'snap'
when: always
- when: never
parallel: 26
Expand All @@ -103,7 +103,7 @@ test_snap:
test_weekly:
tags: [kube]
rules:
- if: $SCOPE == 'weekly' && $PLATFORM == 'linux'
- if: $SCOPE == 'weekly'
when: always
- when: never
parallel: 117
Expand All @@ -112,7 +112,7 @@ test_weekly:
test_daily:
tags: [kube]
rules:
- if: $SCOPE == 'daily' && $PLATFORM == 'linux'
- if: $SCOPE == 'daily'
when: always
- when: never
parallel: 181
Expand All @@ -121,9 +121,7 @@ test_daily:
report:
stage: report
rules:
- if: $PLATFORM == 'linux' && $SCOPE != 'CItest'
when: always
- when: never
- if: $SCOPE != 'CItest'
- if: $CI_COMMIT_BRANCH == 'master'
variables:
VERSION: snap:master
Expand Down
4 changes: 2 additions & 2 deletions mac.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
testFolder=./gpt-tests-resources/tests
graphFolder=./gpt-tests-resources/graphs
inputFolder=testData
inputFolder=/Volumes/snap-ext/SNAP/testData
expectedOutputFolder=./gpt-tests-resources/expectedOutputs
tempFolder=./tmp
tempFolder=/Users/otb/tmp
snapBin=/Users/otb/Applications/snap/bin
4 changes: 2 additions & 2 deletions prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ CI_PROJECT_DIR=$6
while IFS="" read -r test || [ -n "$test" ]
do
echo "Start get test data for ${test}"
python3 pygpt/get_test_data_list.py "${test}" "${REPORT_DIR}"
python3 pygpt/get_test_data_list.py "${test}" "${REPORT_DIR}" "${TEST_DATA_DIR}"
cat "${REPORT_DIR}/${TEST_DATA_LIST}"
# Download test data
./download_test_data.sh "${REPORT_DIR}" "${TEST_DATA_DIR}" "${TEST_DATA_LIST}" "${S3_BUCKET}" "${S3_ARGS}"
"${CI_PROJECT_DIR}/download_test_data.sh" "${REPORT_DIR}" "${TEST_DATA_DIR}" "${TEST_DATA_LIST}" "${S3_BUCKET}" "${S3_ARGS}"

echo "Running ${test}"
python3 pygpt/snap_gpt_test.py "${JAVA_HOME}/bin/java" "${JAVA_OPTIONS} -cp gpt-tests-executer/target/gpt-test-exec.jar" \
Expand Down
4 changes: 1 addition & 3 deletions windows.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ report:
- windows
cache: []
rules:
- if: $PLATFORM == 'windows' && $SCOPE != 'CItest'
when: always
- when: never
- if: $SCOPE != 'CItest'
variables:
REPORT_DIR: result
# output upload and download progress every 2 seconds
Expand Down