2023-11-09 08:05:54 +00:00
|
|
|
default:
|
|
|
|
timeout: 2h
|
|
|
|
|
|
|
|
workflow:
|
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
|
|
- if: $CI_COMMIT_TAG
|
|
|
|
- if: $CI_COMMIT_REF_PROTECTED == "true"
|
|
|
|
|
2024-01-18 10:23:02 +00:00
|
|
|
test:linux:
|
2023-11-09 08:05:54 +00:00
|
|
|
image: $image
|
2024-04-12 04:44:27 +00:00
|
|
|
variables:
|
|
|
|
CUSTOM_PATH: "/custom"
|
2023-11-09 08:05:54 +00:00
|
|
|
before_script:
|
2024-04-12 04:44:32 +00:00
|
|
|
- ./ci/install-dependencies.sh
|
2023-11-09 08:05:54 +00:00
|
|
|
script:
|
|
|
|
- useradd builder --create-home
|
|
|
|
- chown -R builder "${CI_PROJECT_DIR}"
|
|
|
|
- sudo --preserve-env --set-home --user=builder ./ci/run-build-and-tests.sh
|
|
|
|
after_script:
|
|
|
|
- |
|
|
|
|
if test "$CI_JOB_STATUS" != 'success'
|
|
|
|
then
|
|
|
|
sudo --preserve-env --set-home --user=builder ./ci/print-test-failures.sh
|
|
|
|
fi
|
|
|
|
parallel:
|
|
|
|
matrix:
|
|
|
|
- jobname: linux-sha256
|
|
|
|
image: ubuntu:latest
|
|
|
|
CC: clang
|
2024-02-07 07:20:35 +00:00
|
|
|
- jobname: linux-reftable
|
|
|
|
image: ubuntu:latest
|
|
|
|
CC: clang
|
2023-11-09 08:05:54 +00:00
|
|
|
- jobname: linux-gcc
|
|
|
|
image: ubuntu:20.04
|
|
|
|
CC: gcc
|
|
|
|
CC_PACKAGE: gcc-8
|
|
|
|
- jobname: linux-TEST-vars
|
|
|
|
image: ubuntu:20.04
|
|
|
|
CC: gcc
|
|
|
|
CC_PACKAGE: gcc-8
|
|
|
|
- jobname: linux-gcc-default
|
|
|
|
image: ubuntu:latest
|
|
|
|
CC: gcc
|
|
|
|
- jobname: linux-leaks
|
|
|
|
image: ubuntu:latest
|
|
|
|
CC: gcc
|
2024-02-07 07:20:35 +00:00
|
|
|
- jobname: linux-reftable-leaks
|
|
|
|
image: ubuntu:latest
|
|
|
|
CC: gcc
|
2023-11-09 08:05:54 +00:00
|
|
|
- jobname: linux-asan-ubsan
|
|
|
|
image: ubuntu:latest
|
|
|
|
CC: clang
|
|
|
|
- jobname: pedantic
|
|
|
|
image: fedora:latest
|
|
|
|
- jobname: linux-musl
|
|
|
|
image: alpine:latest
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- t/failed-test-artifacts
|
|
|
|
when: on_failure
|
2023-12-28 11:02:50 +00:00
|
|
|
|
2024-01-18 10:23:02 +00:00
|
|
|
test:osx:
|
|
|
|
image: $image
|
|
|
|
tags:
|
|
|
|
- saas-macos-medium-m1
|
|
|
|
variables:
|
|
|
|
TEST_OUTPUT_DIRECTORY: "/Volumes/RAMDisk"
|
|
|
|
before_script:
|
|
|
|
# Create a 4GB RAM disk that we use to store test output on. This small hack
|
|
|
|
# significantly speeds up tests by more than a factor of 2 because the
|
|
|
|
# macOS runners use network-attached storage as disks, which is _really_
|
|
|
|
# slow with the many small writes that our tests do.
|
|
|
|
- sudo diskutil apfs create $(hdiutil attach -nomount ram://8192000) RAMDisk
|
|
|
|
- ./ci/install-dependencies.sh
|
|
|
|
script:
|
|
|
|
- ./ci/run-build-and-tests.sh
|
|
|
|
after_script:
|
|
|
|
- |
|
|
|
|
if test "$CI_JOB_STATUS" != 'success'
|
|
|
|
then
|
|
|
|
./ci/print-test-failures.sh
|
|
|
|
mv "$TEST_OUTPUT_DIRECTORY"/failed-test-artifacts t/
|
|
|
|
fi
|
|
|
|
parallel:
|
|
|
|
matrix:
|
|
|
|
- jobname: osx-clang
|
|
|
|
image: macos-13-xcode-14
|
|
|
|
CC: clang
|
2024-02-07 07:20:35 +00:00
|
|
|
- jobname: osx-reftable
|
|
|
|
image: macos-13-xcode-14
|
|
|
|
CC: clang
|
2024-01-18 10:23:02 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- t/failed-test-artifacts
|
|
|
|
when: on_failure
|
|
|
|
|
2024-04-29 06:13:23 +00:00
|
|
|
test:fuzz-smoke-tests:
|
|
|
|
image: ubuntu:latest
|
|
|
|
variables:
|
|
|
|
CC: clang
|
|
|
|
before_script:
|
2024-05-09 08:25:27 +00:00
|
|
|
- ./ci/install-dependencies.sh
|
2024-04-29 06:13:23 +00:00
|
|
|
script:
|
|
|
|
- ./ci/run-build-and-minimal-fuzzers.sh
|
|
|
|
|
2023-12-28 11:02:50 +00:00
|
|
|
static-analysis:
|
|
|
|
image: ubuntu:22.04
|
|
|
|
variables:
|
|
|
|
jobname: StaticAnalysis
|
|
|
|
before_script:
|
2024-04-12 04:44:32 +00:00
|
|
|
- ./ci/install-dependencies.sh
|
2023-12-28 11:02:50 +00:00
|
|
|
script:
|
|
|
|
- ./ci/run-static-analysis.sh
|
|
|
|
- ./ci/check-directional-formatting.bash
|
2024-05-03 17:21:07 +00:00
|
|
|
|
|
|
|
check-whitespace:
|
|
|
|
image: ubuntu:latest
|
|
|
|
before_script:
|
|
|
|
- ./ci/install-dependencies.sh
|
|
|
|
script:
|
|
|
|
- ./ci/check-whitespace.sh "$CI_MERGE_REQUEST_TARGET_BRANCH_SHA"
|
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
2024-06-06 08:01:10 +00:00
|
|
|
|
|
|
|
documentation:
|
|
|
|
image: ubuntu:latest
|
|
|
|
variables:
|
|
|
|
jobname: Documentation
|
|
|
|
before_script:
|
|
|
|
- ./ci/install-dependencies.sh
|
|
|
|
script:
|
|
|
|
- ./ci/test-documentation.sh
|