-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
36 lines (31 loc) · 1.12 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
image: alpine:latest
# From pmaports gitlab ci
# defaults for "only"
# We need to run the CI jobs in a "merge request specific context", if CI is
# running in a merge request. Otherwise the environment variable that holds the
# merge request ID is not available. This means, we must set the "only"
# variable accordingly - and if we only do it for one job, all other jobs will
# not get executed. So have the defaults here, and use them in all jobs that
# should run on both the master branch, and in merge requests.
# https://docs.gitlab.com/ee/ci/merge_request_pipelines/index.html#excluding-certain-jobs
.only-default: &only-default
only:
- main
- merge_requests
- tags
clang-format:
<<: *only-default
before_script:
- apk add git clang-extra-tools python3
# Fix git-clang-format not specifying python version
- sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python3|g' /usr/bin/git-clang-format
script:
- ./.gitlab-ci/format.sh
compile-test:
<<: *only-default
before_script:
- apk add libusb-dev meson cmake g++ eudev-dev scdoc
script:
- meson build
- meson compile -C build