Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/.gitlab-ci.yml # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / .gitlab-ci.yml` 300 lines ยท 7778 bytes Raw Blame History 1 default: 2 timeout: 2h 3 4 stages: 5 - build 6 - test 7 - analyze 8 9 workflow: 10 rules: 11 - if: $CI_PIPELINE_SOURCE == "merge_request_event" 12 - if: $CI_COMMIT_TAG 13 - if: $CI_COMMIT_REF_PROTECTED == "true" 14 15 test:linux: 16 image: $image 17 stage: test 18 needs: [ ] 19 tags: 20 - saas-linux-medium-amd64 21 variables: 22 CUSTOM_PATH: "/custom" 23 TEST_OUTPUT_DIRECTORY: "/tmp/test-output" 24 before_script: 25 - ./ci/install-dependencies.sh 26 script: 27 - useradd builder --create-home 28 - chown -R builder "${CI_PROJECT_DIR}" 29 - sudo --preserve-env --set-home --user=builder ./ci/run-build-and-tests.sh 30 after_script: 31 - | 32 if test "$CI_JOB_STATUS" != 'success' 33 then 34 sudo --preserve-env --set-home --user=builder ./ci/print-test-failures.sh 35 mv "$TEST_OUTPUT_DIRECTORY"/failed-test-artifacts t/ 36 fi 37 parallel: 38 matrix: 39 - jobname: linux-sha256 40 image: ubuntu:rolling 41 CC: clang 42 - jobname: linux-reftable-sha256 43 image: ubuntu:rolling 44 CC: clang 45 - jobname: linux-feature-testbed 46 image: ubuntu:latest 47 - jobname: linux-breaking-changes 48 image: ubuntu:rolling 49 CC: gcc 50 - jobname: fedora-breaking-changes-meson 51 image: fedora:latest 52 - jobname: linux-leaks 53 image: ubuntu:rolling 54 CC: gcc 55 - jobname: linux-reftable-leaks 56 image: ubuntu:rolling 57 CC: gcc 58 - jobname: linux-asan-ubsan 59 image: ubuntu:rolling 60 CC: clang 61 - jobname: linux-meson 62 image: ubuntu:rolling 63 CC: gcc 64 - jobname: linux-musl-meson 65 image: alpine:latest 66 - jobname: linux32 67 image: i386/debian:latest 68 # A RHEL 8 compatible distro. Supported until 2029-05-31. 69 - jobname: almalinux-8 70 image: almalinux:8 71 # Supported until 2028-06-30. 72 - jobname: debian-12 73 image: debian:12 74 artifacts: 75 paths: 76 - t/failed-test-artifacts 77 reports: 78 junit: build/meson-logs/testlog.junit.xml 79 when: on_failure 80 81 test:osx: 82 image: $image 83 stage: test 84 needs: [ ] 85 tags: 86 - saas-macos-large-m2pro 87 variables: 88 TEST_OUTPUT_DIRECTORY: "/tmp/test-output" 89 before_script: 90 - ./ci/install-dependencies.sh 91 script: 92 - ./ci/run-build-and-tests.sh 93 after_script: 94 - | 95 if test "$CI_JOB_STATUS" != 'success' 96 then 97 ./ci/print-test-failures.sh 98 mv "$TEST_OUTPUT_DIRECTORY"/failed-test-artifacts t/ 99 fi 100 parallel: 101 matrix: 102 - jobname: osx-clang 103 image: macos-15-xcode-16 104 CC: clang 105 - jobname: osx-reftable 106 image: macos-26-xcode-26 107 CC: clang 108 - jobname: osx-meson 109 image: macos-26-xcode-26 110 CC: clang 111 artifacts: 112 paths: 113 - t/failed-test-artifacts 114 reports: 115 junit: build/meson-logs/testlog.junit.xml 116 when: on_failure 117 118 .windows_before_script: &windows_before_script 119 # Disabling realtime monitoring fails on some of the runners, but it 120 # significantly speeds up test execution in the case where it works. We thus 121 # try our luck, but ignore any failures. 122 - Set-MpPreference -DisableRealtimeMonitoring $true; $true 123 124 build:mingw64: 125 stage: build 126 tags: 127 - saas-windows-medium-amd64 128 variables: 129 NO_PERL: 1 130 before_script: 131 - *windows_before_script 132 - ./ci/install-sdk.ps1 -directory "git-sdk" 133 - ./ci/install-dependencies.ps1 -Mingw 134 script: 135 # The minimal SDK's profile resets PATH. 136 - git-sdk/usr/bin/bash.exe -l -c 137 'PATH=$PATH:/c/Rust/bin ci/make-test-artifacts.sh artifacts' 138 artifacts: 139 paths: 140 - artifacts 141 - git-sdk 142 143 test:mingw64: 144 stage: test 145 tags: 146 - saas-windows-medium-amd64 147 needs: 148 - job: "build:mingw64" 149 artifacts: true 150 variables: 151 # Windows runners don't have enough RAM to run EXPENSIVE tests. 152 GIT_TEST_LONG: false 153 before_script: 154 - *windows_before_script 155 - git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz' 156 - New-Item -Path .git/info -ItemType Directory 157 - New-Item .git/info/exclude -ItemType File -Value "/git-sdk" 158 script: 159 - git-sdk/usr/bin/bash.exe -l -c "ci/run-test-slice.sh $CI_NODE_INDEX $CI_NODE_TOTAL" 160 after_script: 161 - git-sdk/usr/bin/bash.exe -l -c 'ci/print-test-failures.sh' 162 parallel: 10 163 164 .msvc-meson: 165 variables: 166 TEST_OUTPUT_DIRECTORY: "C:/Git-Test" 167 tags: 168 - saas-windows-medium-amd64 169 cache: 170 key: 171 files: 172 - ci/install-dependencies.ps1 173 paths: 174 - .dependencies 175 before_script: 176 - *windows_before_script 177 - ./ci/install-dependencies.ps1 178 - $env:Path = "C:\Meson;C:\Rust\bin;$env:Path" 179 - New-Item -Path $env:TEST_OUTPUT_DIRECTORY -ItemType Directory 180 181 build:msvc-meson: 182 extends: .msvc-meson 183 stage: build 184 script: 185 - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred -Dtest_output_directory="$TEST_OUTPUT_DIRECTORY" 186 - meson compile -C build 187 artifacts: 188 paths: 189 - build 190 191 test:msvc-meson: 192 extends: .msvc-meson 193 stage: test 194 timeout: 6h 195 needs: 196 - job: "build:msvc-meson" 197 artifacts: true 198 script: 199 - | 200 & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL' 201 variables: 202 # Windows runners don't have enough RAM to run EXPENSIVE tests. 203 GIT_TEST_LONG: false 204 after_script: 205 - | 206 if ($env:CI_JOB_STATUS -ne "success") { 207 & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/print-test-failures.sh' 208 Move-Item -Path "$env:TEST_OUTPUT_DIRECTORY/failed-test-artifacts" -Destination t/ 209 } 210 parallel: 10 211 artifacts: 212 paths: 213 - t/failed-test-artifacts 214 reports: 215 junit: build/meson-logs/testlog.junit.xml 216 when: on_failure 217 218 test:fuzz-smoke-tests: 219 image: ubuntu:latest 220 stage: test 221 needs: [ ] 222 variables: 223 CC: clang 224 before_script: 225 - ./ci/install-dependencies.sh 226 script: 227 - ./ci/run-build-and-minimal-fuzzers.sh 228 229 static-analysis: 230 image: ubuntu:latest 231 stage: analyze 232 needs: [ ] 233 variables: 234 jobname: StaticAnalysis 235 before_script: 236 - ./ci/install-dependencies.sh 237 script: 238 - ./ci/run-static-analysis.sh 239 - ./ci/check-directional-formatting.bash 240 241 rust-analysis: 242 image: ubuntu:rolling 243 stage: analyze 244 needs: [ ] 245 variables: 246 jobname: RustAnalysis 247 before_script: 248 - ./ci/install-dependencies.sh 249 script: 250 - ./ci/run-rust-checks.sh 251 252 check-whitespace: 253 image: ubuntu:latest 254 stage: analyze 255 needs: [ ] 256 variables: 257 GIT_DEPTH: 0 258 before_script: 259 - ./ci/install-dependencies.sh 260 # Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged 261 # pipelines, we fallback to $CI_MERGE_REQUEST_DIFF_BASE_SHA, which should 262 # be defined in all pipelines. 263 script: 264 - | 265 R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit 266 ./ci/check-whitespace.sh "$R" 267 rules: 268 - if: $CI_PIPELINE_SOURCE == 'merge_request_event' 269 270 check-style: 271 image: ubuntu:latest 272 stage: analyze 273 needs: [ ] 274 allow_failure: true 275 variables: 276 CC: clang 277 jobname: ClangFormat 278 GIT_DEPTH: 0 279 before_script: 280 - ./ci/install-dependencies.sh 281 # Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged 282 # pipelines, we fallback to $CI_MERGE_REQUEST_DIFF_BASE_SHA, which should 283 # be defined in all pipelines. 284 script: 285 - | 286 R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA:-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit 287 ./ci/run-style-check.sh "$R" 288 rules: 289 - if: $CI_PIPELINE_SOURCE == 'merge_request_event' 290 291 documentation: 292 image: ubuntu:latest 293 stage: analyze 294 needs: [ ] 295 variables: 296 jobname: Documentation 297 before_script: 298 - ./ci/install-dependencies.sh 299 script: 300 - ./ci/test-documentation.sh