-
Notifications
You must be signed in to change notification settings - Fork 32
/
.gitlab-ci.yml
97 lines (91 loc) · 6.93 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
cache:
key:
files:
- gradle/wrapper/gradle-wrapper.properties
paths:
- pdb-store/
- .gradle-user-home/
workflow:
rules:
- if: $CI_COMMIT_MESSAGE =~ /-draft$/
when: never
- if: $CI_COMMIT_MESSAGE =~ /-WIP$/
when: never
- if: $CI_PIPELINE_SOURCE == "push"
variables:
JAVA_HOME: "/usr/lib/jvm/java-21-openjdk-amd64"
PDB_CACHE_DIR: "./pdb-store/cache"
PDB_DIR: "./pdb-store"
MODEL_DIR: "./models"
GRADLE_USER_HOME: "./.gradle-user-home"
VALIDATE_VULKAN: "false"
# simple unit tests without requiring GPUs
unit-tests-no-gpu:
image: scenerygraphics/nvidia-vulkan:1.3.261.1-ubuntu20.04-v4
before_script:
- mkdir -p ./pdb-store/cache
- if [ ! -d "$MODEL_DIR" ]; then wget -q https://ulrik.is/scenery-demo-models.zip && unzip -q scenery-demo-models.zip; fi
- chmod +x gradlew
script:
- ./gradlew build -x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar --build-cache
# base job for running with GPUs
.base-job-gpu: &base-job-gpu
before_script:
# $VULKAN_SDK_VERSION comes from Docker image
- source /opt/vulkan/$VULKAN_SDK_VERSION/setup-env.sh
- mkdir -p ./pdb-store/cache
- sudo sed -i -e '/^assistive_technologies=/s/^/#/' /etc/java-*-openjdk/accessibility.properties
# Output Vulkan driver information, but do not fail in case of non-zero
# return (happens e.g. if $DISPLAY is not set)
- echo -e "\e[0Ksection_start:`date +%s`:hw_info_section[collapsed=true]\r\e[0KHardware Information"
- nvidia-smi || true
- vulkaninfo || true
- clinfo || true
- echo -e "\e[0Ksection_end:`date +%s`:hw_info_section\r\e[0K"
- if [ ! -d "$MODEL_DIR" ]; then wget -q https://ulrik.is/scenery-demo-models.zip && unzip -q scenery-demo-models.zip; fi
- chmod +x gradlew
- ./gradlew --stop # stop any deamon https://stackoverflow.com/a/58397542/1047713
script:
- echo -e "\e[0Ksection_start:`date +%s`:build_section[collapsed=true]\r\e[0KGeneral build"
- ./gradlew build jacocoTestReport --build-cache --full-stacktrace -x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
- echo -e "\e[0Ksection_end:`date +%s`:build_section\r\e[0K"
# basic group
- echo -e "\e[0Ksection_start:`date +%s`:basic_section[collapsed=true]\r\e[0KBasic Test Group"
- ./gradlew test jacocoTestReport --build-cache --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=basic -Dscenery.ExampleRunner.Configurations=DeferredShading.yml -Dscenery.RandomSeed=13371842 -Dscenery.ExampleRunner.Blocklist=EdgeBundlerExample -Dscenery.VulkanRenderer.EnableValidations=$VALIDATE_VULKAN -Dscenery.VulkanRenderer.StrictValidation=true -Dscenery.VulkanRenderer.DefaultRenderDelay=100
- ./gradlew test jacocoTestReport --build-cache --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=basic -Dscenery.ExampleRunner.Configurations=DeferredShadingStereo.yml -Dscenery.RandomSeed=13371842 -Dscenery.ExampleRunner.Blocklist=EdgeBundlerExample -Dscenery.VulkanRenderer.EnableValidations=$VALIDATE_VULKAN -Dscenery.VulkanRenderer.StrictValidation=true -Dscenery.VulkanRenderer.DefaultRenderDelay=100
- echo -e "\e[0Ksection_end:`date +%s`:basic_section\r\e[0K"
# advanced group
- echo -e "\e[0Ksection_start:`date +%s`:advanced_section[collapsed=true]\r\e[0KAdvanced Test Group"
- ./gradlew test jacocoTestReport --build-cache --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=advanced -Dscenery.ExampleRunner.Configurations=DeferredShading.yml -Dscenery.RandomSeed=13371842 -Dscenery.VulkanRenderer.EnableValidations=$VALIDATE_VULKAN -Dscenery.VulkanRenderer.StrictValidation=true -Dscenery.VulkanRenderer.DefaultRenderDelay=100
- ./gradlew test jacocoTestReport --build-cache --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=advanced -Dscenery.ExampleRunner.Configurations=DeferredShadingStereo.yml -Dscenery.RandomSeed=13371842 -Dscenery.VulkanRenderer.EnableValidations=$VALIDATE_VULKAN -Dscenery.VulkanRenderer.StrictValidation=true -Dscenery.VulkanRenderer.DefaultRenderDelay=100
- echo -e "\e[0Ksection_end:`date +%s`:advanced_section\r\e[0K"
# compute group
- echo -e "\e[0Ksection_start:`date +%s`:compute_section[collapsed=true]\r\e[0KCompute Test Group"
- ./gradlew test jacocoTestReport --build-cache --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=compute -Dscenery.ExampleRunner.Configurations=DeferredShading.yml -Dscenery.RandomSeed=13371842 -Dscenery.VulkanRenderer.EnableValidations=$VALIDATE_VULKAN -Dscenery.VulkanRenderer.StrictValidation=true -Dscenery.VulkanRenderer.DefaultRenderDelay=100
- ./gradlew test jacocoTestReport --build-cache --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=compute -Dscenery.ExampleRunner.Configurations=DeferredShadingStereo.yml -Dscenery.RandomSeed=13371842 -Dscenery.VulkanRenderer.EnableValidations=$VALIDATE_VULKAN -Dscenery.VulkanRenderer.StrictValidation=true -Dscenery.VulkanRenderer.DefaultRenderDelay=100
- echo -e "\e[0Ksection_end:`date +%s`:compute_section\r\e[0K"
# volumes group
- echo -e "\e[0Ksection_start:`date +%s`:volumes_section[collapsed=true]\r\e[0KVolumes Test Group"
- ./gradlew test jacocoTestReport --build-cache --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=volumes -Dscenery.ExampleRunner.Configurations=DeferredShading.yml -Dscenery.RandomSeed=13371842 -Dscenery.VulkanRenderer.EnableValidations=$VALIDATE_VULKAN -Dscenery.VulkanRenderer.StrictValidation=true -Dscenery.VulkanRenderer.DefaultRenderDelay=100
- ./gradlew test jacocoTestReport --build-cache --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=volumes -Dscenery.ExampleRunner.Configurations=DeferredShadingStereo.yml -Dscenery.RandomSeed=13371842 -Dscenery.VulkanRenderer.EnableValidations=$VALIDATE_VULKAN -Dscenery.VulkanRenderer.StrictValidation=true -Dscenery.VulkanRenderer.DefaultRenderDelay=100
- echo -e "\e[0Ksection_end:`date +%s`:volumes_section\r\e[0K"
# code coverage reporting
- echo -e "\e[0Ksection_start:`date +%s`:coverage_section[collapsed=true]\r\e[0KCode Coverage and Analysis"
# we keep the same arguments here as in the last test run to not startle Gradle into re-running the test task
- ./gradlew fullCodeCoverageReport --build-cache --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=volumes -Dscenery.ExampleRunner.Configurations=DeferredShadingStereo.yml -Dscenery.RandomSeed=13371842 -Dscenery.VulkanRenderer.EnableValidations=$VALIDATE_VULKAN -Dscenery.VulkanRenderer.StrictValidation=true -Dscenery.VulkanRenderer.DefaultRenderDelay=100
- echo -e "\e[0Ksection_end:`date +%s`:coverage_section\r\e[0K"
artifacts:
when: always
expire_in: 48h
paths:
- results.tar.bz2
- "hs_err_*"
scenery-nvidia:
image: scenerygraphics/nvidia-vulkan:1.3.261.1-ubuntu20.04-v4
<<: *base-job-gpu
after_script:
- tar cvjf results.tar.bz2 screenshots/
- ARGOS_COMMIT=$CI_COMMIT_SHA ARGOS_BRANCH=$CI_COMMIT_REF_NAME argos upload screenshots/ || true
tags:
- cuda
- intel