blob: f07aa1a6dde6bb86875a21618d3422d0f1ec9afe [file] [log] [blame]
Tim-Philipp Müller794392e2020-12-22 23:54:36 +00001include:
2 - template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'
3
Tim-Philipp Müller69b31092023-04-26 18:35:57 +01004# https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
5workflow:
6 rules:
7 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
8 - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
9 when: never
10 - if: $CI_COMMIT_BRANCH
11 - if: $CI_COMMIT_TAG
12
Ralph Gilesd1b5efe2020-04-21 09:19:56 -070013default:
14 tags:
15 - docker
Marcus Asteborg9fc8fc42023-06-13 22:22:58 -070016 image: 'debian:bookworm-slim'
Ralph Gilesd1b5efe2020-04-21 09:19:56 -070017
Tim-Philipp Müller558a3c22023-04-24 17:58:59 +010018# https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html#reference-tags
19.snippets:
20 git_prep:
21 # Make sure we have a recent annotated tag, otherwise meson/get-version.py
22 # might fail later (e.g. shallow clone without enough history) or return
23 # a bogus version based on a much older tag. This can happen in merge request
24 # pipelines from a personal fork, as the fork might not have the latest
25 # upstream tags if it has been forked a long time ago. Also affects the
26 # git version picked up by autotools and cmake, not just meson.
27 - git fetch https://gitlab.xiph.org/xiph/opus.git refs/tags/v1.4:refs/tags/v1.4
28 - git describe
29
Marcus Asteborg0c0c4842020-06-15 13:00:25 -070030whitespace:
31 stage: test
Marcus Asteborg9fc8fc42023-06-13 22:22:58 -070032 before_script:
33 - apt-get update &&
34 apt-get install -y git
Marcus Asteborg0c0c4842020-06-15 13:00:25 -070035 script:
36 - git diff-tree --check origin/master HEAD
37
Tim-Philipp Müller69b31092023-04-26 18:35:57 +010038# Make sure commits are GPG signed
39ci-fairy:
Tim-Philipp Müller69b31092023-04-26 18:35:57 +010040 stage: test
41 script:
42 - apt update
43 - apt install -y python3-pip git
44 - pip3 install --break-system-packages git+https://gitlab.freedesktop.org/freedesktop/ci-templates@7811ba9814a3bad379377241c6c6b62d78b20eac
45 - echo Checking commits $CI_FAIRY_BASE_COMMIT..HEAD
46 - ci-fairy check-commits --gpg-signed-commit $CI_FAIRY_BASE_COMMIT..HEAD
47 tags:
48 - 'docker'
49 rules:
50 - if: $CI_PIPELINE_SOURCE == "merge_request_event"
51 variables:
52 CI_FAIRY_BASE_COMMIT: $CI_MERGE_REQUEST_DIFF_BASE_SHA
53 - if: $CI_PIPELINE_SOURCE != "merge_request_event"
54 variables:
55 CI_FAIRY_BASE_COMMIT: 'HEAD^1'
56
Ralph Gilesd1b5efe2020-04-21 09:19:56 -070057autoconf:
58 stage: build
Marcus Asteborg115edd92023-06-25 16:11:27 -070059 tags:
60 - avx2
Ralph Gilesd1b5efe2020-04-21 09:19:56 -070061 before_script:
62 - apt-get update &&
Marcus Asteborg44ed6bc2023-06-18 08:56:36 -070063 apt-get install -y zip doxygen git automake libtool make wget
Tim-Philipp Müller558a3c22023-04-24 17:58:59 +010064 - !reference [.snippets, git_prep]
Ralph Gilesd1b5efe2020-04-21 09:19:56 -070065 script:
66 - ./autogen.sh
Marcus Asteborg115edd92023-06-25 16:11:27 -070067 - CFLAGS="-mavx -mfma -mavx2 -O2 -ffast-math" ./configure --enable-float-approx
68 - make -j16
69 - DISTCHECK_CONFIGURE_FLAGS="--enable-float-approx CFLAGS='-mavx -mfma -mavx2 -O2'" make distcheck -j16
Ralph Gilesd1b5efe2020-04-21 09:19:56 -070070 cache:
71 paths:
72 - "src/*.o"
73 - "src/.libs/*.o"
74 - "silk/*.o"
75 - "silk/.libs/*.o"
76 - "celt/*.o"
77 - "celt/.libs/*.o"
78
79cmake:
80 stage: build
Marcus Asteborg115edd92023-06-25 16:11:27 -070081 tags:
82 - avx2
Ralph Gilesd1b5efe2020-04-21 09:19:56 -070083 before_script:
84 - apt-get update &&
Marcus Asteborg44ed6bc2023-06-18 08:56:36 -070085 apt-get install -y cmake ninja-build git automake libtool wget
Tim-Philipp Müller558a3c22023-04-24 17:58:59 +010086 - !reference [.snippets, git_prep]
Ralph Gilesd1b5efe2020-04-21 09:19:56 -070087 script:
Michael Klingbeil4b9c6202023-05-17 12:46:09 -040088 - ./autogen.sh
Ralph Gilesd1b5efe2020-04-21 09:19:56 -070089 - mkdir build
Marcus Asteborg115edd92023-06-25 16:11:27 -070090 - cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_PROGRAMS=ON -DBUILD_TESTING=ON -DOPUS_FAST_MATH=ON -DOPUS_FLOAT_APPROX=ON -DOPUS_NEURAL_FEC=ON -DOPUS_X86_PRESUME_AVX2=ON
91 - cmake --build build
92 - cd build && ctest --output-on-failure -j 16
Tim-Philipp Müllerc2b542b2016-03-19 15:40:22 +000093
Tim-Philipp Müller558a3c22023-04-24 17:58:59 +010094.meson:
95 image: 'debian:bookworm-slim'
Tim-Philipp Müllerc2b542b2016-03-19 15:40:22 +000096 stage: build
97 before_script:
98 - apt-get update &&
Marcus Asteborg07f201a2023-06-16 18:25:47 -070099 apt-get install -y ninja-build doxygen meson git automake libtool wget
Tim-Philipp Müller558a3c22023-04-24 17:58:59 +0100100 - !reference [.snippets, git_prep]
Tim-Philipp Müllerc2b542b2016-03-19 15:40:22 +0000101 script:
Tim-Philipp Müller39f68ce2023-05-19 11:47:40 +0100102 - ./autogen.sh
Tim-Philipp Müllerc2b542b2016-03-19 15:40:22 +0000103 - mkdir builddir
Tim-Philipp Müller39f68ce2023-05-19 11:47:40 +0100104 - meson setup -Dtests=enabled -Ddocs=enabled -Dbuildtype=release builddir
Tim-Philipp Müllerc2b542b2016-03-19 15:40:22 +0000105 - meson compile -C builddir
106 - meson test -C builddir
107 #- meson dist --no-tests -C builddir
Tim-Philipp Müller558a3c22023-04-24 17:58:59 +0100108
109meson x86_64:
110 extends: '.meson'
Marcus Asteborg115edd92023-06-25 16:11:27 -0700111 tags:
112 - avx2
Tim-Philipp Müller558a3c22023-04-24 17:58:59 +0100113 variables:
114 MESON_EXTRA_ARGS: '--werror'
115
116meson arm64:
117 extends: '.meson'
118 tags:
119 - 'gstreamer-arm64-linux-docker'
120 variables:
121 # arm64 build has a compiler warning still, so let's not use --werror for now
122 MESON_EXTRA_ARGS: '-Dwerror=false'