|
| 1 | +#--------------- |
| 2 | +# Windows Builds |
| 3 | +#--------------- |
| 4 | +.job_template: &build-windows |
| 5 | + stage: build |
| 6 | + script: |
| 7 | + - set TARGET_PLATFORM=%CI_JOB_NAME% |
| 8 | + - set TOOLCHAIN=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake |
| 9 | + - rd /s /q "%CI_PROJECT_DIR%/build/%TARGET_PLATFORM%" |
| 10 | + - mkdir "%CI_PROJECT_DIR%/build/%TARGET_PLATFORM%" |
| 11 | + - cd "%CI_PROJECT_DIR%/build/%TARGET_PLATFORM%" |
| 12 | + - cmake "%CI_PROJECT_DIR%" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DCMAKE_TOOLCHAIN_FILE=%TOOLCHAIN% -DVCPKG_TARGET_TRIPLET=%TRIPLET% -DCMAKE_GENERATOR_PLATFORM=%ARCH% |
| 13 | + - cmake --build . --target INSTALL --config %BUILD_TYPE% |
| 14 | + cache: |
| 15 | + untracked: true |
| 16 | + policy: push |
| 17 | + artifacts: |
| 18 | + untracked: true |
| 19 | + expire_in: 1 week |
| 20 | + |
| 21 | +build-x64-windows-release: |
| 22 | + <<: *build-windows |
| 23 | + tags: |
| 24 | + - windows |
| 25 | + - release |
| 26 | + before_script: |
| 27 | + - set ARCH=x64 |
| 28 | + - set BUILD_TYPE=Release |
| 29 | + - set TRIPLET=x64-windows |
| 30 | + cache: |
| 31 | + key: build-x64-windows-release |
| 32 | + paths: |
| 33 | + - build/build-x64-windows-release/bin/ |
| 34 | + - build/build-x64-windows-release/data/ |
| 35 | + artifacts: |
| 36 | + paths: |
| 37 | + - build/build-x64-windows-release/bin/*.dll |
| 38 | + - build/build-x64-windows-release/include/*.h |
| 39 | + |
| 40 | +build-x64-windows-debug: |
| 41 | + <<: *build-windows |
| 42 | + tags: |
| 43 | + - windows |
| 44 | + - debug |
| 45 | + before_script: |
| 46 | + - set ARCH=x64 |
| 47 | + - set BUILD_TYPE=Debug |
| 48 | + - set TRIPLET=x64-windows |
| 49 | + cache: |
| 50 | + key: build-x64-windows-debug |
| 51 | + paths: |
| 52 | + - build/build-x64-windows-debug/bin/ |
| 53 | + - build/build-x64-windows-debug/data/ |
| 54 | + artifacts: |
| 55 | + paths: |
| 56 | + - build/build-x64-windows-debug/bin/*.dll |
| 57 | + - build/build-x64-windows-debug/include/*.h |
| 58 | + |
| 59 | +#--------------- |
| 60 | +# Windows Tests |
| 61 | +#--------------- |
| 62 | +.job_template: &test-windows |
| 63 | + tags: |
| 64 | + - windows |
| 65 | + stage: test |
| 66 | + cache: |
| 67 | + policy: pull |
| 68 | + |
| 69 | +test-x64-windows-release: |
| 70 | + <<: *test-windows |
| 71 | + dependencies: |
| 72 | + - build-x64-windows-release |
| 73 | + before_script: |
| 74 | + - cd %VCPKG_ROOT%/installed/x64-windows/bin |
| 75 | + script: |
| 76 | + - "%CI_PROJECT_DIR%/build/build-x64-windows-release/bin/test_pdal_c" |
| 77 | + cache: |
| 78 | + key: build-x64-windows-release |
| 79 | + paths: |
| 80 | + - build/build-x64-windows-release/bin/ |
| 81 | + |
| 82 | +test-x64-windows-debug: |
| 83 | + <<: *test-windows |
| 84 | + dependencies: |
| 85 | + - build-x64-windows-debug |
| 86 | + before_script: |
| 87 | + - cd %VCPKG_ROOT%/installed/x64-windows/debug/bin |
| 88 | + script: |
| 89 | + - "%CI_PROJECT_DIR%/build/build-x64-windows-debug/bin/test_pdal_cd" |
| 90 | + cache: |
| 91 | + key: build-x64-windows-debug |
| 92 | + paths: |
| 93 | + - build/build-x64-windows-debug/bin/ |
| 94 | + |
| 95 | +#-------------- |
| 96 | +# Linux Builds |
| 97 | +#-------------- |
| 98 | +# |
| 99 | +.job_template: &build-linux |
| 100 | + stage: build |
| 101 | + script: |
| 102 | + - export TARGET_PLATFORM=$CI_JOB_NAME |
| 103 | + - echo "Building $CI_PROJECT_NAME ($CI_COMMIT_REF_NAME branch) for $TARGET_PLATFORM" |
| 104 | + - rm -rf "$CI_PROJECT_DIR/build/$TARGET_PLATFORM" |
| 105 | + - mkdir -p "$CI_PROJECT_DIR/build/$TARGET_PLATFORM" |
| 106 | + - cd "$CI_PROJECT_DIR/build/$TARGET_PLATFORM" |
| 107 | + - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPDALC_GCC_PARAM_GGC_MIN_HEAPSIZE=8192 "$CI_PROJECT_DIR" |
| 108 | + - make |
| 109 | + - make install |
| 110 | + variables: |
| 111 | + GIT_STRATEGY: clone |
| 112 | + cache: |
| 113 | + untracked: true |
| 114 | + key: "$CI_JOB_NAME" |
| 115 | + policy: push |
| 116 | + paths: |
| 117 | + - build/$CI_JOB_NAME/bin/ |
| 118 | + - build/$CI_JOB_NAME/lib/ |
| 119 | + - build/$CI_JOB_NAME/data/ |
| 120 | + artifacts: |
| 121 | + untracked: true |
| 122 | + expire_in: 1 week |
| 123 | + paths: |
| 124 | + - build/$CI_JOB_NAME/lib/ |
| 125 | + - build/$CI_JOB_NAME/include/*.h |
| 126 | + |
| 127 | +build-x64-linux-release-ubuntu: |
| 128 | + <<: *build-linux |
| 129 | + tags: |
| 130 | + - linux |
| 131 | + - pdal |
| 132 | + - docker |
| 133 | + - release |
| 134 | + - ubuntu |
| 135 | + before_script: |
| 136 | + - export BUILD_TYPE=Release |
| 137 | + |
| 138 | +build-x64-linux-debug-ubuntu: |
| 139 | + <<: *build-linux |
| 140 | + tags: |
| 141 | + - linux |
| 142 | + - pdal |
| 143 | + - docker |
| 144 | + - debug |
| 145 | + - ubuntu |
| 146 | + before_script: |
| 147 | + - export BUILD_TYPE=Debug |
| 148 | + |
| 149 | +build-x64-linux-release-alpine: |
| 150 | + <<: *build-linux |
| 151 | + tags: |
| 152 | + - linux |
| 153 | + - pdal |
| 154 | + - docker |
| 155 | + - release |
| 156 | + - alpine |
| 157 | + before_script: |
| 158 | + - export BUILD_TYPE=Release |
| 159 | + |
| 160 | +build-x64-linux-debug-alpine: |
| 161 | + <<: *build-linux |
| 162 | + tags: |
| 163 | + - linux |
| 164 | + - pdal |
| 165 | + - docker |
| 166 | + - debug |
| 167 | + - alpine |
| 168 | + before_script: |
| 169 | + - export BUILD_TYPE=Debug |
| 170 | + |
| 171 | +#--------------- |
| 172 | +# Linux Tests |
| 173 | +#--------------- |
| 174 | +.job_template: &test-linux |
| 175 | + stage: test |
| 176 | + script: |
| 177 | + - make coverage_pdal_c |
| 178 | + - ls -l |
| 179 | + cache: |
| 180 | + key: "$CI_JOB_NAME" |
| 181 | + policy: pull |
| 182 | + |
| 183 | +test-x64-linux-release-alpine: |
| 184 | + <<: *test-linux |
| 185 | + tags: |
| 186 | + - linux |
| 187 | + - pdal |
| 188 | + - release |
| 189 | + - alpine |
| 190 | + dependencies: |
| 191 | + - build-x64-linux-release-alpine |
| 192 | + before_script: |
| 193 | + - cd build/build-x64-linux-release-alpine |
| 194 | + artifacts: |
| 195 | + paths: |
| 196 | + - build/build-x64-linux-release-alpine/coverage_pdal_c |
| 197 | + |
| 198 | +test-x64-linux-debug-alpine: |
| 199 | + <<: *test-linux |
| 200 | + tags: |
| 201 | + - linux |
| 202 | + - pdal |
| 203 | + - debug |
| 204 | + - alpine |
| 205 | + dependencies: |
| 206 | + - build-x64-linux-debug-alpine |
| 207 | + before_script: |
| 208 | + - cd build/build-x64-linux-debug-alpine |
| 209 | + artifacts: |
| 210 | + paths: |
| 211 | + - build/build-x64-linux-debug-alpine/coverage_pdal_c |
| 212 | + |
0 commit comments