]> git.ipfire.org Git - thirdparty/git.git/blob - .gitlab-ci.yml
Merge branch 'mt/openindiana-portability' into next
[thirdparty/git.git] / .gitlab-ci.yml
1 default:
2 timeout: 2h
3
4 workflow:
5 rules:
6 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
7 - if: $CI_COMMIT_TAG
8 - if: $CI_COMMIT_REF_PROTECTED == "true"
9
10 test:linux:
11 image: $image
12 variables:
13 CUSTOM_PATH: "/custom"
14 before_script:
15 - ./ci/install-dependencies.sh
16 script:
17 - useradd builder --create-home
18 - chown -R builder "${CI_PROJECT_DIR}"
19 - sudo --preserve-env --set-home --user=builder ./ci/run-build-and-tests.sh
20 after_script:
21 - |
22 if test "$CI_JOB_STATUS" != 'success'
23 then
24 sudo --preserve-env --set-home --user=builder ./ci/print-test-failures.sh
25 fi
26 parallel:
27 matrix:
28 - jobname: linux-sha256
29 image: ubuntu:latest
30 CC: clang
31 - jobname: linux-reftable
32 image: ubuntu:latest
33 CC: clang
34 - jobname: linux-gcc
35 image: ubuntu:20.04
36 CC: gcc
37 CC_PACKAGE: gcc-8
38 - jobname: linux-TEST-vars
39 image: ubuntu:20.04
40 CC: gcc
41 CC_PACKAGE: gcc-8
42 - jobname: linux-gcc-default
43 image: ubuntu:latest
44 CC: gcc
45 - jobname: linux-leaks
46 image: ubuntu:latest
47 CC: gcc
48 - jobname: linux-reftable-leaks
49 image: ubuntu:latest
50 CC: gcc
51 - jobname: linux-asan-ubsan
52 image: ubuntu:latest
53 CC: clang
54 - jobname: pedantic
55 image: fedora:latest
56 - jobname: linux-musl
57 image: alpine:latest
58 artifacts:
59 paths:
60 - t/failed-test-artifacts
61 when: on_failure
62
63 test:osx:
64 image: $image
65 tags:
66 - saas-macos-medium-m1
67 variables:
68 TEST_OUTPUT_DIRECTORY: "/Volumes/RAMDisk"
69 before_script:
70 # Create a 4GB RAM disk that we use to store test output on. This small hack
71 # significantly speeds up tests by more than a factor of 2 because the
72 # macOS runners use network-attached storage as disks, which is _really_
73 # slow with the many small writes that our tests do.
74 - sudo diskutil apfs create $(hdiutil attach -nomount ram://8192000) RAMDisk
75 - ./ci/install-dependencies.sh
76 script:
77 - ./ci/run-build-and-tests.sh
78 after_script:
79 - |
80 if test "$CI_JOB_STATUS" != 'success'
81 then
82 ./ci/print-test-failures.sh
83 mv "$TEST_OUTPUT_DIRECTORY"/failed-test-artifacts t/
84 fi
85 parallel:
86 matrix:
87 - jobname: osx-clang
88 image: macos-13-xcode-14
89 CC: clang
90 - jobname: osx-reftable
91 image: macos-13-xcode-14
92 CC: clang
93 artifacts:
94 paths:
95 - t/failed-test-artifacts
96 when: on_failure
97
98 static-analysis:
99 image: ubuntu:22.04
100 variables:
101 jobname: StaticAnalysis
102 before_script:
103 - ./ci/install-dependencies.sh
104 script:
105 - ./ci/run-static-analysis.sh
106 - ./ci/check-directional-formatting.bash