forked from scenerygraphics/scenery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
120 lines (115 loc) · 6.27 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
cache:
paths:
- maven.repository/
- models/
- pdb-store/
- .gradle-user-home/
variables:
JAVA_HOME: "/usr/lib/jvm/java-11-openjdk-amd64"
PDB_CACHE_DIR: "./pdb-store/cache"
PDB_DIR: "./pdb-store"
MODEL_DIR: "./models"
GRADLE_USER_HOME: "./.gradle-user-home"
# simple unit tests without requiring GPUs
unit-tests-no-gpu:
image: ubuntu:bionic
before_script:
- mkdir -p ./pdb-store/cache
- apt-get update -qq --force-yes > /dev/null
- apt-get install -qq -y --allow-downgrades --allow-remove-essential --allow-change-held-packages unzip wget git curl libgl1-mesa-glx sudo sed openjdk-11-jdk-headless > /dev/null
- 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
# base job for running with GPUs
.base-job-gpu: &base-job-gpu
before_script:
- mkdir -p ./pdb-store/cache
# Installs Maven, Vulkan development libraries, etc.
- apt-get update -qq --force-yes > /dev/null
- apt-get install -qq -y curl sudo sed > /dev/null
- 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)
- vulkaninfo || true
- clinfo || true
- 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 --info --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 --info --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=basic -Dscenery.ExampleRunner.Configurations=DeferredShading.yml
- ./gradlew test jacocoTestReport --info --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=basic -Dscenery.ExampleRunner.Configurations=DeferredShadingStereo.yml
- 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 --info --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=advanced -Dscenery.ExampleRunner.Configurations=DeferredShading.yml
- ./gradlew test jacocoTestReport --info --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=advanced -Dscenery.ExampleRunner.Configurations=DeferredShadingStereo.yml
- 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 --info --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=compute -Dscenery.ExampleRunner.Configurations=DeferredShading.yml
- ./gradlew test jacocoTestReport --info --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=compute -Dscenery.ExampleRunner.Configurations=DeferredShadingStereo.yml
- 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 --info --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=volumes -Dscenery.ExampleRunner.Configurations=DeferredShading.yml
- ./gradlew test jacocoTestReport --info --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=volumes -Dscenery.ExampleRunner.Configurations=DeferredShadingStereo.yml
- 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 sonarqube --info --full-stacktrace -Pgpu=true -Dscenery.ExampleRunner.TestGroup=volumes -Dscenery.ExampleRunner.Configurations=DeferredShadingStereo.yml
- 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.2.170.0-ubuntu20.04
<<: *base-job-gpu
after_script:
- nvidia-smi
- tar cvjf results.tar.bz2 screenshots/
- ARGOS_COMMIT=$CI_COMMIT_SHA ARGOS_BRANCH=$CI_COMMIT_REF_NAME /node_modules/argos-cli/bin/argos upload screenshots/ --token $ARGOS_TOKEN || true
tags:
- cuda
- intel
#scenery-amd:
# image: rocm/rocm-terminal
# <<: *base-job
# variables:
# SUDO: "sudo"
# GPURUN: "sudo su -m - rocm-user -c"
# before_script:
# # The rocm docker container requires the user to be in the video group which
# # can usually be set via docker's --group-add option. GitLab-Runner currently
# # has no known option for doing that. Therefore, it manually has to happen in
# # the job description.
# - $SUDO usermod -a -G video rocm-user
# # Installs Maven, Vulkan development libraries, etc.
# - $SUDO apt-get -qq --force-yes update > /dev/null
# - $SUDO apt-get install -qq --force-yes unzip kmod wget git maven openjdk-8-jdk libvulkan1 libvulkan-dev vulkan-utils > /dev/null
# # Installs the AMD GPUopen Vulkan driver
# - wget https://github.com/GPUOpen-Drivers/AMDVLK/releases/download/v-2019.Q3.6/amdvlk_2019.Q3.6_amd64.deb
# - $SUDO dpkg -i amdvlk_2019.Q3.6_amd64.deb
# - $SUDO apt-get -f install
# - $SUDO lsmod
# # Output Vulkan driver information, but do not fail in case of non-zero
# # return (happens e.g. if $DISPLAY is not set)
# - vulkaninfo || true
# - wget -q https://ulrik.is/scenery-demo-models.zip
# - unzip -q scenery-demo-models.zip
# after_script:
# - rocm-smi
# tags:
# - amd
# - rocm
#
#