https://codeberg.org/interpeer/liberate.git
Revision 6fc84a5f150e3ec6ce7da030b5955928b002737c authored by Jens Finkhaeuser on 05 October 2022, 07:49:39 UTC, committed by Jens Finkhaeuser on 05 October 2022, 07:49:39 UTC
1 parent 173e9e5
Tip revision: 6fc84a5f150e3ec6ce7da030b5955928b002737c authored by Jens Finkhaeuser on 05 October 2022, 07:49:39 UTC
Build info should be separated by a plus sign according to semver.org
Build info should be separated by a plus sign according to semver.org
Tip revision: 6fc84a5
.woodpecker.yml
###############################################################################
# DEFINITIONS
##############################################################################
host_image: &host_image "nativeci/cpp-meson:latest"
ndk_image: &ndk_image "nativeci/android-ndk:latest"
##############################################################################
# MATRIX
##############################################################################
matrix:
include:
# Linux/compilers
- CC: gcc
CXX: g++
IMAGE: *host_image
ANALYSIS: true
- CC: clang
CXX: clang++
IMAGE: *host_image
# Android
- TARGET_TYPE: cross
IMAGE: *ndk_image
MESON_EXTRA_ARGS: --cross-file android-arm64-v8a.txt
- TARGET_TYPE: cross
IMAGE: *ndk_image
MESON_EXTRA_ARGS: --cross-file android-armeabi-v7a.txt
- TARGET_TYPE: cross
IMAGE: *ndk_image
MESON_EXTRA_ARGS: --cross-file android-x86.txt
- TARGET_TYPE: cross
IMAGE: *ndk_image
MESON_EXTRA_ARGS: --cross-file android-x86_64.txt
##############################################################################
# PIPELINE
##############################################################################
pipeline:
############################################################################
# Dependencies
deps:
image: ${IMAGE}
environment:
- PIPENV_VENV_IN_PROJECT=1
commands:
- CI=true pipenv install --ignore-pipfile
############################################################################
# Build
build:
image: ${IMAGE}
commands:
- mkdir build && cd build
- meson .. -Db_coverage=${ANALYSIS:=false} ${MESON_EXTRA_ARGS}
- ninja -v
appveyor:
image: ${IMAGE}
commands:
- CI=true pipenv run python ./scripts/appveyor.py
secrets:
- APPVEYOR_TOKEN
when:
matrix:
CC: gcc
IMAGE: *host_image
ANALYSIS: true
############################################################################
# Tests
test:
image: ${IMAGE}
commands:
- cd build
- if /usr/bin/test ${TARGET_TYPE:=host} == host ; then
./test/unittests ;
else
echo "Test skipped for cross-compiled targets." ;
fi
############################################################################
# Analysis & Checks
towncrier:
image: ${IMAGE}
commands:
- git fetch origin main
- CI=true pipenv run towncrier check --compare-with origin/main
when:
event:
- pull_request
matrix:
CC: gcc
IMAGE: *host_image
ANALYSIS: true
semgrep:
image: ${IMAGE}
group: analysis
commands:
- CI=true pipenv run semgrep ci --config auto
when:
event:
- pull_request
matrix:
CC: gcc
IMAGE: *host_image
ANALYSIS: true
flawfinder:
image: ${IMAGE}
group: analysis
commands:
- CI=true pipenv run flawfinder include/ lib/ examples/
when:
event:
- pull_request
matrix:
CC: gcc
IMAGE: *host_image
ANALYSIS: true
coverage:
image: ${IMAGE}
group: analysis
commands:
- cd build
- if /usr/bin/test ${TARGET_TYPE:=host} == host ; then
ninja coverage
&& cat meson-logs/coverage.txt ;
fi
when:
event:
- pull_request
matrix:
CC: gcc
IMAGE: *host_image
ANALYSIS: true
Computing file changes ...