6 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
8 - if: $CI_COMMIT_REF_PROTECTED == "true"
13 CUSTOM_PATH: "/custom"
15 - ./ci/install-dependencies.sh
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
22 if test "$CI_JOB_STATUS" != 'success'
24 sudo --preserve-env --set-home --user=builder ./ci/print-test-failures.sh
31 - jobname: linux-sha256
34 - jobname: linux-reftable
41 - jobname: linux-TEST-vars
45 - jobname: linux-gcc-default
48 - jobname: linux-leaks
51 - jobname: linux-reftable-leaks
54 - jobname: linux-asan-ubsan
63 - t/failed-test-artifacts
69 - saas-macos-medium-m1
71 TEST_OUTPUT_DIRECTORY: "/Volumes/RAMDisk"
73 # Create a 4GB RAM disk that we use to store test output on. This small hack
74 # significantly speeds up tests by more than a factor of 2 because the
75 # macOS runners use network-attached storage as disks, which is _really_
76 # slow with the many small writes that our tests do.
77 - sudo diskutil apfs create $(hdiutil attach -nomount ram://8192000) RAMDisk
78 - ./ci/install-dependencies.sh
80 - ./ci/run-build-and-tests.sh
83 if test "$CI_JOB_STATUS" != 'success'
85 ./ci/print-test-failures.sh
86 mv "$TEST_OUTPUT_DIRECTORY"/failed-test-artifacts t/
91 image: macos-13-xcode-14
93 - jobname: osx-reftable
94 image: macos-13-xcode-14
98 - t/failed-test-artifacts
101 test:fuzz-smoke-tests:
106 - ./ci/install-dependencies.sh
108 - ./ci/run-build-and-minimal-fuzzers.sh
113 jobname: StaticAnalysis
115 - ./ci/install-dependencies.sh
117 - ./ci/run-static-analysis.sh
118 - ./ci/check-directional-formatting.bash
123 - ./ci/install-dependencies.sh
124 # Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged
125 # pipelines, we fallback to $CI_MERGE_REQUEST_DIFF_BASE_SHA, which should
126 # be defined in all pipelines.
129 R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
130 ./ci/check-whitespace.sh "$R"
132 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
141 - ./ci/install-dependencies.sh
142 # Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged
143 # pipelines, we fallback to $CI_MERGE_REQUEST_DIFF_BASE_SHA, which should
144 # be defined in all pipelines.
147 R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
148 ./ci/run-style-check.sh "$R"
150 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
155 jobname: Documentation
157 - ./ci/install-dependencies.sh
159 - ./ci/test-documentation.sh