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
28 - jobname: linux-sha256
31 - jobname: linux-reftable
38 - jobname: linux-TEST-vars
42 - jobname: linux-gcc-default
45 - jobname: linux-leaks
48 - jobname: linux-reftable-leaks
51 - jobname: linux-asan-ubsan
60 - t/failed-test-artifacts
66 - saas-macos-medium-m1
68 TEST_OUTPUT_DIRECTORY: "/Volumes/RAMDisk"
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
77 - ./ci/run-build-and-tests.sh
80 if test "$CI_JOB_STATUS" != 'success'
82 ./ci/print-test-failures.sh
83 mv "$TEST_OUTPUT_DIRECTORY"/failed-test-artifacts t/
88 image: macos-13-xcode-14
90 - jobname: osx-reftable
91 image: macos-13-xcode-14
95 - t/failed-test-artifacts
98 test:fuzz-smoke-tests:
103 - ./ci/install-dependencies.sh
105 - ./ci/run-build-and-minimal-fuzzers.sh
110 jobname: StaticAnalysis
112 - ./ci/install-dependencies.sh
114 - ./ci/run-static-analysis.sh
115 - ./ci/check-directional-formatting.bash
120 - ./ci/install-dependencies.sh
121 # Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged
122 # pipelines, we fallback to $CI_MERGE_REQUEST_DIFF_BASE_SHA, which should
123 # be defined in all pipelines.
126 R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
127 ./ci/check-whitespace.sh "$R"
129 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
138 - ./ci/install-dependencies.sh
139 # Since $CI_MERGE_REQUEST_TARGET_BRANCH_SHA is only defined for merged
140 # pipelines, we fallback to $CI_MERGE_REQUEST_DIFF_BASE_SHA, which should
141 # be defined in all pipelines.
144 R=${CI_MERGE_REQUEST_TARGET_BRANCH_SHA-${CI_MERGE_REQUEST_DIFF_BASE_SHA:?}} || exit
145 ./ci/run-style-check.sh "$R"
147 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
152 jobname: Documentation
154 - ./ci/install-dependencies.sh
156 - ./ci/test-documentation.sh