build-appimage:
name: build AppImage
runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian:0.36
steps:
- - uses: actions/checkout@v3
- - name: install dependencies
- run: sudo apt-get install libjson-c-dev libssl-dev libdbus-1-dev libhugetlbfs-dev
- - uses: actions/setup-python@v4
- with:
- python-version: '3.x'
- - uses: BSFishy/meson-build@v1.0.3
- with:
- setup-options: >
- --werror
- --buildtype=release
- --prefix=/usr
- --force-fallback-for=libnvme
- -Dlibnvme:werror=false
- action: install
- meson-version: 0.61.2
- - name: build AppImage
+ - uses: actions/checkout@v3
+ - name: build
+ run: |
+ scripts/build.sh appimage
+ - name: build AppImage
uses: AppImageCrafters/build-appimage@v1.3
with:
recipe: .github/AppImageBuilder.yml
compiler: [gcc, clang]
buildtype: [debug, release]
container:
- image: ghcr.io/igaw/linux-nvme/debian:0.30
+ image: ghcr.io/igaw/linux-nvme/debian.python:0.36
steps:
- uses: actions/checkout@v3
- - uses: actions/setup-python@v4
- with:
- python-version: '3.x'
- name: build
run: |
scripts/build.sh -b ${{ matrix.buildtype }} -c ${{ matrix.compiler }}
matrix:
include:
- arch: armhf
- port: armhf
- compiler: gcc-arm-linux-gnueabihf
- packages:
- arch: s390x
- port: s390x
- compiler: gcc-s390x-linux-gnu
- packages: libgcc-s1:s390x
- arch: ppc64le
- port: ppc64el
- compiler: gcc-powerpc64le-linux-gnu
- packges:
steps:
- uses: actions/checkout@v3
- - name: set up arm architecture
- run: |
- export release=$(lsb_release -c -s)
- sudo dpkg --add-architecture ${{ matrix.port }}
- sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
- sudo dd of=/etc/apt/sources.list.d/${{ matrix.arch }}.list <<EOF
- deb [arch=${{ matrix.port }}] http://ports.ubuntu.com/ $release main universe restricted"
- deb [arch=${{ matrix.port }}] http://ports.ubuntu.com/ $release-updates main universe restricted"
- EOF
- sudo apt update
- sudo apt install -y meson pkg-config qemu-user-static ${{ matrix.compiler}} libjson-c-dev:${{ matrix.port }} ${{ matrix.packages }}
- - name: build
- run: |
- scripts/build.sh -b release -c gcc -t ${{ matrix.arch }} cross
+ - name: enable foreign arch
+ uses: dbhi/qus/action@main
+ - name: compile and run unit tests
+ uses: mosteo-actions/docker-run@v1
+ with:
+ image: ghcr.io/igaw/linux-nvme/ubuntu-cross-${{ matrix.arch }}:0.36
+ guest-dir: /build
+ host-dir: ${{ github.workspace }}
+ command: |
+ scripts/build.sh -b release -c gcc -t ${{ matrix.arch }} cross
+ params: "--platform linux/amd64"
+ pull-params: "--platform linux/amd64"
- uses: actions/upload-artifact@v3
name: upload logs
if: failure()
name: fallback shared libraries
runs-on: ubuntu-latest
container:
- image: ghcr.io/igaw/linux-nvme/debian:0.30
+ image: ghcr.io/igaw/linux-nvme/debian:0.36
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- - uses: actions/setup-python@v4
- with:
- python-version: '3.x'
- name: build
run: |
scripts/build.sh -b release -c gcc fallback
name: muon minimal static
runs-on: ubuntu-latest
container:
- image: ghcr.io/igaw/linux-nvme/debian:0.30
+ image: ghcr.io/igaw/linux-nvme/debian:0.36
steps:
- uses: actions/checkout@v3
- name: build
--- /dev/null
+---
+name: coverage
+
+on:
+ push:
+ branches: [master]
+
+jobs:
+ code-coverage:
+ name: code coverage
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian.python:0.36
+ steps:
+ - uses: actions/checkout@v3
+ - name: build
+ run: |
+ scripts/build.sh coverage
+ - uses: codecov/codecov-action@v3
+ with:
+ fail_ci_if_error: false
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 " appimage build AppImage target"
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}" \
+ --force-fallback-for=libnvme \
+ -Dlibnvme:werror=false \
+ -Db_coverage=true \
+ "${BUILDDIR}"
+}
+
+config_meson_appimage() {
+ CC="${CC}" "${MESON}" setup \
+ --werror \
+ --buildtype="${BUILDTYPE}" \
+ --force-fallback-for=libnvme \
+ --prefix=/usr \
+ -Dlibnvme:werror=false \
+ "${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;
+}
+
+install_meson_appimage() {
+ "${MESON}" install \
+ -C "${BUILDDIR}"
+}
+
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}"
+fn_exists "install_${BUILDTOOL}_${CONFIG}" && "install_${BUILDTOOL}_${CONFIG}" || true;