|
| 1 | +# Global # |
| 2 | + |
| 3 | +stages: |
| 4 | + - Platform Tests |
| 5 | + - Analysis |
| 6 | + |
| 7 | +variables: |
| 8 | + GIT_SUBMODULE_STRATEGY: recursive |
| 9 | + CTEST_OUTPUT_ON_FAILURE: '1' |
| 10 | + |
| 11 | +# Platform Tests # |
| 12 | + |
| 13 | +.platform_unix_template: &platform_unix_template |
| 14 | + stage: Platform Tests |
| 15 | + tags: |
| 16 | + - docker-linux |
| 17 | + script: |
| 18 | + - mkdir build && cd build |
| 19 | + - cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release |
| 20 | + - ninja |
| 21 | + |
| 22 | +.platform_windows_template: &platform_windows_template |
| 23 | + stage: Platform Tests |
| 24 | + tags: |
| 25 | + - docker-windows |
| 26 | + script: |
| 27 | + - echo 'try {' | out-file -encoding utf8 build.ps1 |
| 28 | + - echo 'cd ..; mkdir workdir-cpy' | out-file -encoding utf8 -append build.ps1 |
| 29 | + - echo 'Copy-Item C:\workdir\* -Destination C:\workdir-cpy -Recurse' | out-file -encoding utf8 -append build.ps1 |
| 30 | + - echo 'cd workdir-cpy' | out-file -encoding utf8 -append build.ps1 |
| 31 | + - echo 'mkdir build; cd build' | out-file -encoding utf8 -append build.ps1 |
| 32 | + - echo "cmake .. -GNinja" | out-file -encoding utf8 -append build.ps1 |
| 33 | + - echo 'if(-not $?){throw}' | out-file -encoding utf8 -append build.ps1 |
| 34 | + - echo 'ninja' | out-file -encoding utf8 -append build.ps1 |
| 35 | + - echo 'if(-not $?){throw}' | out-file -encoding utf8 -append build.ps1 |
| 36 | + - echo '} catch { exit 1 }' | out-file -encoding utf8 -append build.ps1 |
| 37 | + - docker run --rm -v ${pwd}:C:\workdir $env:IMAGE C:\workdir\build.ps1 |
| 38 | + |
| 39 | +Fedora/GCC: |
| 40 | + image: stabletec/build-core:fedora-gcc |
| 41 | + <<: *platform_unix_template |
| 42 | + |
| 43 | +Fedora/Clang: |
| 44 | + image: stabletec/build-core:fedora-gcc |
| 45 | + <<: *platform_unix_template |
| 46 | + |
| 47 | +Debian/GCC: |
| 48 | + image: stabletec/build-core:debian-gcc |
| 49 | + <<: *platform_unix_template |
| 50 | + |
| 51 | +Debian/Clang: |
| 52 | + image: stabletec/build-core:debian-gcc |
| 53 | + <<: *platform_unix_template |
| 54 | + |
| 55 | +Ubuntu/GCC: |
| 56 | + image: stabletec/build-core:ubuntu-gcc |
| 57 | + <<: *platform_unix_template |
| 58 | + |
| 59 | +Ubuntu/Clang: |
| 60 | + image: stabletec/build-core:ubuntu-gcc |
| 61 | + <<: *platform_unix_template |
| 62 | + |
| 63 | +openSUSE/GCC: |
| 64 | + image: stabletec/build-core:opensuse-gcc |
| 65 | + <<: *platform_unix_template |
| 66 | + |
| 67 | +openSUSE/Clang: |
| 68 | + image: stabletec/build-core:opensuse-gcc |
| 69 | + <<: *platform_unix_template |
| 70 | + |
| 71 | +Windows/MSVC: |
| 72 | + variables: |
| 73 | + IMAGE: stabletec/build-core:windows-msvc2017 |
| 74 | + <<: *platform_windows_template |
| 75 | + |
| 76 | +# Analysis # |
| 77 | + |
| 78 | +.analysis_template: &analysis_template |
| 79 | + stage: Analysis |
| 80 | + image: stabletec/build-foe:fedora-clang |
| 81 | + allow_failure: true |
| 82 | + tags: |
| 83 | + - docker-linux |
| 84 | + script: |
| 85 | + - mkdir build && cd build |
| 86 | + - cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DNO_VULKAN_DEVICE=ON -DBUILD_WINDOW_TESTS=OFF ${CMAKE_OPTIONS} |
| 87 | + - ninja |
| 88 | + |
| 89 | +Static Analysis: |
| 90 | + variables: |
| 91 | + CMAKE_OPTIONS: -DCLANG_TIDY=ON -DCPPCHECK=ON -DIWYU=ON |
| 92 | + <<: *analysis_template |
0 commit comments