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