• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1include:
2  - template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'
3
4# 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
13default:
14  tags:
15    - docker
16  image: 'debian:bookworm-slim'
17
18# 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
30whitespace:
31  stage: test
32  before_script:
33    - apt-get update &&
34      apt-get install -y git
35  script:
36    - git diff-tree --check origin/main HEAD
37
38# Make sure commits are GPG signed
39ci-fairy:
40  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
57autoconf:
58  stage: build
59  tags:
60    - avx2
61  before_script:
62    - apt-get update &&
63      apt-get install -y zip doxygen git automake libtool make wget
64    - !reference [.snippets, git_prep]
65  script:
66    - ./autogen.sh
67    - CFLAGS="-mavx -mfma -mavx2 -O2 -ffast-math" ./configure --enable-float-approx --enable-dred --enable-osce
68    - make -j16
69    - DISTCHECK_CONFIGURE_FLAGS="--enable-float-approx --enable-dred --enable-osce CFLAGS='-mavx -mfma -mavx2 -O2'" make distcheck -j16
70  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
81  tags:
82    - avx2
83  before_script:
84    - apt-get update &&
85      apt-get install -y cmake ninja-build git automake libtool wget
86    - !reference [.snippets, git_prep]
87  script:
88    - ./autogen.sh
89    - mkdir build
90    - 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_DRED=ON -DOPUS_OSCE=ON -DOPUS_X86_PRESUME_AVX2=ON
91    - cmake --build build
92    - cd build && ctest --output-on-failure -j 16
93
94.meson:
95  image: 'debian:bookworm-slim'
96  stage: build
97  before_script:
98    - apt-get update &&
99      apt-get install -y ninja-build doxygen meson git automake libtool wget
100    - !reference [.snippets, git_prep]
101  script:
102    - ./autogen.sh
103    - mkdir builddir
104    - meson setup -Denable-deep-plc=true -Denable-osce=true -Denable-dred=true -Dtests=enabled -Ddocs=enabled -Dbuildtype=release builddir
105    - meson compile -C builddir
106    - meson test -C builddir
107    #- meson dist --no-tests -C builddir
108
109meson x86_64:
110  extends: '.meson'
111  tags:
112    - avx2
113  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'
123