Tim-Philipp Müller | 794392e | 2020-12-22 23:54:36 +0000 | [diff] [blame] | 1 | include: |
| 2 | - template: 'Workflows/Branch-Pipelines.gitlab-ci.yml' |
| 3 | |
Tim-Philipp Müller | 69b3109 | 2023-04-26 18:35:57 +0100 | [diff] [blame] | 4 | # https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines |
| 5 | workflow: |
| 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 Giles | d1b5efe | 2020-04-21 09:19:56 -0700 | [diff] [blame] | 13 | default: |
| 14 | tags: |
| 15 | - docker |
Marcus Asteborg | 9fc8fc4 | 2023-06-13 22:22:58 -0700 | [diff] [blame] | 16 | image: 'debian:bookworm-slim' |
Ralph Giles | d1b5efe | 2020-04-21 09:19:56 -0700 | [diff] [blame] | 17 | |
Tim-Philipp Müller | 558a3c2 | 2023-04-24 17:58:59 +0100 | [diff] [blame] | 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 | |
Marcus Asteborg | 0c0c484 | 2020-06-15 13:00:25 -0700 | [diff] [blame] | 30 | whitespace: |
| 31 | stage: test |
Marcus Asteborg | 9fc8fc4 | 2023-06-13 22:22:58 -0700 | [diff] [blame] | 32 | before_script: |
| 33 | - apt-get update && |
| 34 | apt-get install -y git |
Marcus Asteborg | 0c0c484 | 2020-06-15 13:00:25 -0700 | [diff] [blame] | 35 | script: |
| 36 | - git diff-tree --check origin/master HEAD |
| 37 | |
Tim-Philipp Müller | 69b3109 | 2023-04-26 18:35:57 +0100 | [diff] [blame] | 38 | # Make sure commits are GPG signed |
| 39 | ci-fairy: |
Tim-Philipp Müller | 69b3109 | 2023-04-26 18:35:57 +0100 | [diff] [blame] | 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 | |
Ralph Giles | d1b5efe | 2020-04-21 09:19:56 -0700 | [diff] [blame] | 57 | autoconf: |
| 58 | stage: build |
Marcus Asteborg | 115edd9 | 2023-06-25 16:11:27 -0700 | [diff] [blame] | 59 | tags: |
| 60 | - avx2 |
Ralph Giles | d1b5efe | 2020-04-21 09:19:56 -0700 | [diff] [blame] | 61 | before_script: |
| 62 | - apt-get update && |
Marcus Asteborg | 44ed6bc | 2023-06-18 08:56:36 -0700 | [diff] [blame] | 63 | apt-get install -y zip doxygen git automake libtool make wget |
Tim-Philipp Müller | 558a3c2 | 2023-04-24 17:58:59 +0100 | [diff] [blame] | 64 | - !reference [.snippets, git_prep] |
Ralph Giles | d1b5efe | 2020-04-21 09:19:56 -0700 | [diff] [blame] | 65 | script: |
| 66 | - ./autogen.sh |
Marcus Asteborg | 115edd9 | 2023-06-25 16:11:27 -0700 | [diff] [blame] | 67 | - 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 Giles | d1b5efe | 2020-04-21 09:19:56 -0700 | [diff] [blame] | 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 | |
| 79 | cmake: |
| 80 | stage: build |
Marcus Asteborg | 115edd9 | 2023-06-25 16:11:27 -0700 | [diff] [blame] | 81 | tags: |
| 82 | - avx2 |
Ralph Giles | d1b5efe | 2020-04-21 09:19:56 -0700 | [diff] [blame] | 83 | before_script: |
| 84 | - apt-get update && |
Marcus Asteborg | 44ed6bc | 2023-06-18 08:56:36 -0700 | [diff] [blame] | 85 | apt-get install -y cmake ninja-build git automake libtool wget |
Tim-Philipp Müller | 558a3c2 | 2023-04-24 17:58:59 +0100 | [diff] [blame] | 86 | - !reference [.snippets, git_prep] |
Ralph Giles | d1b5efe | 2020-04-21 09:19:56 -0700 | [diff] [blame] | 87 | script: |
Michael Klingbeil | 4b9c620 | 2023-05-17 12:46:09 -0400 | [diff] [blame] | 88 | - ./autogen.sh |
Ralph Giles | d1b5efe | 2020-04-21 09:19:56 -0700 | [diff] [blame] | 89 | - mkdir build |
Marcus Asteborg | 115edd9 | 2023-06-25 16:11:27 -0700 | [diff] [blame] | 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_NEURAL_FEC=ON -DOPUS_X86_PRESUME_AVX2=ON |
| 91 | - cmake --build build |
| 92 | - cd build && ctest --output-on-failure -j 16 |
Tim-Philipp Müller | c2b542b | 2016-03-19 15:40:22 +0000 | [diff] [blame] | 93 | |
Tim-Philipp Müller | 558a3c2 | 2023-04-24 17:58:59 +0100 | [diff] [blame] | 94 | .meson: |
| 95 | image: 'debian:bookworm-slim' |
Tim-Philipp Müller | c2b542b | 2016-03-19 15:40:22 +0000 | [diff] [blame] | 96 | stage: build |
| 97 | before_script: |
| 98 | - apt-get update && |
Marcus Asteborg | 07f201a | 2023-06-16 18:25:47 -0700 | [diff] [blame] | 99 | apt-get install -y ninja-build doxygen meson git automake libtool wget |
Tim-Philipp Müller | 558a3c2 | 2023-04-24 17:58:59 +0100 | [diff] [blame] | 100 | - !reference [.snippets, git_prep] |
Tim-Philipp Müller | c2b542b | 2016-03-19 15:40:22 +0000 | [diff] [blame] | 101 | script: |
Tim-Philipp Müller | 39f68ce | 2023-05-19 11:47:40 +0100 | [diff] [blame] | 102 | - ./autogen.sh |
Tim-Philipp Müller | c2b542b | 2016-03-19 15:40:22 +0000 | [diff] [blame] | 103 | - mkdir builddir |
Tim-Philipp Müller | 39f68ce | 2023-05-19 11:47:40 +0100 | [diff] [blame] | 104 | - meson setup -Dtests=enabled -Ddocs=enabled -Dbuildtype=release builddir |
Tim-Philipp Müller | c2b542b | 2016-03-19 15:40:22 +0000 | [diff] [blame] | 105 | - meson compile -C builddir |
| 106 | - meson test -C builddir |
| 107 | #- meson dist --no-tests -C builddir |
Tim-Philipp Müller | 558a3c2 | 2023-04-24 17:58:59 +0100 | [diff] [blame] | 108 | |
| 109 | meson x86_64: |
| 110 | extends: '.meson' |
Marcus Asteborg | 115edd9 | 2023-06-25 16:11:27 -0700 | [diff] [blame] | 111 | tags: |
| 112 | - avx2 |
Tim-Philipp Müller | 558a3c2 | 2023-04-24 17:58:59 +0100 | [diff] [blame] | 113 | variables: |
| 114 | MESON_EXTRA_ARGS: '--werror' |
| 115 | |
| 116 | meson 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' |