Skip to content

Commit 558a3c2

Browse files
tp-mtmatth
authored andcommitted
ci: add arm64 CI
1 parent 20c032d commit 558a3c2

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

.gitlab-ci.yml

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ default:
77
# Image from https://hub.docker.com/_/gcc/ based on Debian
88
image: gcc:9
99

10+
# https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html#reference-tags
11+
.snippets:
12+
git_prep:
13+
# Make sure we have a recent annotated tag, otherwise meson/get-version.py
14+
# might fail later (e.g. shallow clone without enough history) or return
15+
# a bogus version based on a much older tag. This can happen in merge request
16+
# pipelines from a personal fork, as the fork might not have the latest
17+
# upstream tags if it has been forked a long time ago. Also affects the
18+
# git version picked up by autotools and cmake, not just meson.
19+
- git fetch https://gitlab.xiph.org/xiph/opus.git refs/tags/v1.4:refs/tags/v1.4
20+
- git describe
21+
1022
whitespace:
1123
stage: test
1224
script:
@@ -16,7 +28,8 @@ autoconf:
1628
stage: build
1729
before_script:
1830
- apt-get update &&
19-
apt-get install -y zip doxygen
31+
apt-get install -y zip doxygen git
32+
- !reference [.snippets, git_prep]
2033
script:
2134
- ./autogen.sh
2235
- ./configure
@@ -36,26 +49,36 @@ cmake:
3649
before_script:
3750
- apt-get update &&
3851
apt-get install -y cmake ninja-build
52+
- !reference [.snippets, git_prep]
3953
script:
4054
- mkdir build
4155
- cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DOPUS_BUILD_TESTING=ON -DOPUS_BUILD_PROGRAMS=ON
4256
- cmake --build build
4357
- cd build && ctest --output-on-failure
4458

45-
meson:
59+
.meson:
60+
image: 'debian:bookworm-slim'
4661
stage: build
4762
before_script:
4863
- apt-get update &&
49-
apt-get install -y python3-pip ninja-build doxygen
50-
- export XDG_CACHE_HOME=$PWD/pip-cache
51-
- pip3 install --user meson
64+
apt-get install -y ninja-build doxygen meson git
65+
- !reference [.snippets, git_prep]
5266
script:
53-
- export PATH=$PATH:$HOME/.local/bin
5467
- mkdir builddir
55-
- meson setup --werror -Dtests=enabled -Ddocs=enabled -Dbuildtype=release builddir
68+
- meson setup -Dtests=enabled -Ddocs=enabled -Dbuildtype=release builddir ${MESON_EXTRA_ARGS}
5669
- meson compile -C builddir
5770
- meson test -C builddir
5871
#- meson dist --no-tests -C builddir
59-
cache:
60-
paths:
61-
- 'pip-cache/*'
72+
73+
meson x86_64:
74+
extends: '.meson'
75+
variables:
76+
MESON_EXTRA_ARGS: '--werror'
77+
78+
meson arm64:
79+
extends: '.meson'
80+
tags:
81+
- 'gstreamer-arm64-linux-docker'
82+
variables:
83+
# arm64 build has a compiler warning still, so let's not use --werror for now
84+
MESON_EXTRA_ARGS: '-Dwerror=false'

0 commit comments

Comments
 (0)