forked from KhronosGroup/Vulkan-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
67 lines (59 loc) · 3.49 KB
/
.travis.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
language: shell
os: linux
stages:
- Check
- Build
- Test
services:
- docker
before_install:
- echo "OS $TRAVIS_OS_NAME"
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then docker pull khronosgroup/vulkan-samples; fi
before_script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then docker run --name VKB -v ~/build/KhronosGroup/Vulkan-Samples:/home/vulkan-samples -dit khronosgroup/vulkan-samples; fi
after_script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then docker stop VKB; fi
jobs:
fast_finish: true
allow_failures:
- name: "Snake Case (Optional)"
include:
- stage: Check
name: "Doxygen"
script:
- docker exec VKB sh -c "cd /home/vulkan-samples && mkdir -p doxygen && doxygen ./docs/doxygen/doxyfile"
- docker exec VKB sh -c "cd /home/vulkan-samples && if [ $(stat -c%s ./doxygen/warnings.txt) -gt 0 ]; then cat ./doxygen/warnings.txt; exit 1; fi"
- script:
- docker exec VKB sh -c "cd /home/vulkan-samples && git fetch origin master:master && python3 /usr/local/bin/check_copyright_headers.py master"
name: "Copyright Headers"
- script:
- docker exec VKB sh -c "cd /home/vulkan-samples && git fetch origin master:master && python3 /usr/local/bin/clang_format.py -v --diff master > ./clang-format-report.txt"
- docker exec VKB sh -c "cd /home/vulkan-samples && if [ $(grep -c 'clang-format did not modify any files' ./clang-format-report.txt) -eq 0 ] && [ $(grep -c 'no modified files to format' ./clang-format-report.txt) -eq 0 ]; then cat ./clang-format-report.txt; exit 1; fi"
name: "Clang Format"
- script:
- docker exec VKB sh -c "cd /home/vulkan-samples && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -H. -Bbuild/clang"
- docker exec VKB sh -c "cd /home/vulkan-samples && python3 /usr/local/bin/run-clang-tidy.py -j $(($(nproc)/2+1)) -p build/clang -clang-tidy-binary=clang-tidy-10 -header-filter=framework,samples,vulkan_samples -checks=-*,google-*,-google-runtime-references -quiet framework/* samples/* vulkan_samples/* tests/"
name: "Clang Tidy"
- script:
- docker exec VKB sh -c "cd /home/vulkan-samples && git fetch origin master:master && python3 /usr/local/bin/snake_case.py master > ./snake-report.txt"
- docker exec VKB sh -c "cd /home/vulkan-samples && if [ $(grep -c '@@' ./snake-report.txt) -gt 0 ]; then cat ./snake-report.txt; exit 1; fi"
name: "Snake Case (Optional)"
- stage: Build
name: Build Windows
language: shell
os: windows
script:
- cmake -G"Visual Studio 15 2017 Win64" -H. -Bbuild -DVKB_BUILD_TESTS:BOOL=ON -DVKB_BUILD_SAMPLES:BOOL=ON
- cmake --build build --target vulkan_samples --config Release
- script:
- docker exec VKB sh -c "cd /home/vulkan-samples && cmake -G \"Unix Makefiles\" -H. -Bbuild/linux -DCMAKE_BUILD_TYPE=Release -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON"
- docker exec VKB sh -c "cd /home/vulkan-samples && cmake --build build/linux --target vulkan_samples --config Release -- -j$(($(nproc)/2+1))"
name: Build Linux
language: shell
os: linux
- script:
- docker exec VKB sh -c "cd /home/vulkan-samples && cmake -G \"Unix Makefiles\" -H. -Bbuild -DCMAKE_TOOLCHAIN_FILE=bldsys/toolchain/android_gradle.cmake -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON"
- docker exec VKB sh -c "cd /home/vulkan-samples && cmake --build build --config Release --target vulkan_samples_package -- -j$(($(nproc)/2+1))"
name: Build Android
language: shell
os: linux