compiler: [gcc, clang]
buildtype: [debug, release]
container:
- image: ghcr.io/igaw/linux-nvme/debian:0.34
+ image: ghcr.io/igaw/linux-nvme/debian:0.35
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: compile and run unit tests
uses: mosteo-actions/docker-run@v1
with:
- image: ghcr.io/igaw/linux-nvme/ubuntu-cross-${{ matrix.arch }}:0.34
+ image: ghcr.io/igaw/linux-nvme/ubuntu-cross-${{ matrix.arch }}:0.35
guest-dir: /build
host-dir: ${{ github.workspace }}
command: |
name: libdbus
runs-on: ubuntu-latest
container:
- image: ghcr.io/igaw/linux-nvme/debian:0.34
+ image: ghcr.io/igaw/linux-nvme/debian:0.35
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: fallback shared libraries
runs-on: ubuntu-latest
container:
- image: ghcr.io/igaw/linux-nvme/debian:0.34
+ image: ghcr.io/igaw/linux-nvme/debian:0.35
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
name: muon minimal static
runs-on: ubuntu-latest
container:
- image: ghcr.io/igaw/linux-nvme/debian:0.34
+ image: ghcr.io/igaw/linux-nvme/debian:0.35
steps:
- uses: actions/checkout@v3
- name: build
code-coverage:
name: code coverage
runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian.python:0.35
steps:
- - name: install libraries
- run: sudo apt-get install libjson-c-dev libdbus-1-dev lcov
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v4
- with:
- python-version: '3.x'
- - uses: BSFishy/meson-build@v1.0.3
- with:
- # Can't use 'coverage' here, see
- # https://github.com/BSFishy/meson-build/issues/4
- action: test
- options: --verbose
- setup-options: >
- --werror
- --buildtype=release
- --wrap-mode=nofallback
- -Dlibdbus=enabled
- -Db_coverage=true
- meson-version: 0.61.2
- - name: Generate Coverage Report
- # Can't use meson here, see
- # https://github.com/mesonbuild/meson/issues/7895
- run: ninja -C build coverage --verbose
+ - name: build
+ run: |
+ scripts/build.sh coverage
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
name: Build source distribution
runs-on: ubuntu-latest
container:
- image: ghcr.io/igaw/linux-nvme/debian.python:0.34
+ image: ghcr.io/igaw/linux-nvme/debian.python:0.35
steps:
- uses: actions/checkout@v3
echo " fallback download all dependencies"
echo " and build them as shared libaries"
echo " cross use cross toolchain to build"
+ echo " coverage build coverage report"
echo ""
echo "configs with muon:"
echo " [default] minimal static build"
BUILDDIR="$(pwd)/.build-ci"
+fn_exists() { declare -F "$1" > /dev/null; }
+
config_meson_default() {
CC="${CC}" "${MESON}" setup \
--werror \
"${BUILDDIR}"
}
+config_meson_coverage() {
+ CC="${CC}" "${MESON}" setup \
+ --werror \
+ --buildtype="${BUILDTYPE}" \
+ --wrap-mode=nofallback \
+ -Dlibdbus=enabled \
+ -Db_coverage=true \
+ "${BUILDDIR}"
+}
+
build_meson() {
"${MESON}" compile \
-C "${BUILDDIR}"
}
+build_meson_coverage() {
+ ninja -C "${BUILDDIR}" coverage --verbose
+}
+
test_meson() {
"${MESON}" test \
-C "${BUILDDIR}"
}
+test_meson_covarage() {
+ true;
+}
+
tools_build_samurai() {
mkdir -p "${BUILDDIR}"/build-tools
git clone --depth 1 https://github.com/michaelforney/samurai.git \
fi
config_"${BUILDTOOL}"_"${CONFIG}"
-build_"${BUILDTOOL}"
-test_"${BUILDTOOL}"
+fn_exists "build_${BUILDTOOL}_${CONFIG}" && "build_${BUILDTOOL}_${CONFIG}" || build_"${BUILDTOOL}"
+fn_exists "test_${BUILDTOOL}_${CONFIG}" && "test_${BUILDTOOL}_${CONFIG}" || test_"${BUILDTOOL}"