All checks were successful
Build ptprnt / build (push) Successful in 1m28s
61 lines
2.4 KiB
YAML
61 lines
2.4 KiB
YAML
name: Build ptprnt
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Starting action...
|
|
run: echo "Branch ${{ gitea.ref }} will be built for project ${{ gitea.repository }}."
|
|
- name: Checkout branch
|
|
uses: actions/checkout@v3
|
|
- name: Update package cache
|
|
run: apt-get update
|
|
- name: install meson
|
|
run: apt-get -yq install meson
|
|
- name: Install build dependencies
|
|
run: apt-get -yq install libusb-1.0-0-dev libspdlog-dev libfmt-dev libpango1.0-dev libcairo2-dev gcovr
|
|
- name: get build environment versions
|
|
run: |
|
|
echo "=== Start meson version ==="
|
|
gcc --version
|
|
echo "=== End meson version ==="
|
|
echo "=== Start supported c/cpp standards: ==="
|
|
gcc -v --help 2> /dev/null | sed -n '/^ *-std=\([^<][^ ]\+\).*/ {s//\1/p}'
|
|
echo "=== End supported c/cpp standards ==="
|
|
echo "=== Start meson version ==="
|
|
meson --version
|
|
echo "=== End meson version ==="
|
|
echo "=== Start ninja version ==="
|
|
ninja --version
|
|
echo "=== End ninja version ==="
|
|
echo "=== Start dependency package version ==="
|
|
apt-cache policy libpango1.0-dev
|
|
apt-cache policy libcairo2-dev
|
|
apt-cache policy libfmt-dev
|
|
apt-cache policy libspdlog-dev
|
|
apt-cache policy libusb-1.0-0-dev
|
|
echo "=== End dependency package version ==="
|
|
- name: setup builddir
|
|
run: meson setup builddir -Db_coverage=true
|
|
- name: build and test dist package
|
|
run: ninja -C builddir dist
|
|
- name: calculate coverage
|
|
run: ninja -C builddir coverage-text
|
|
- name: Coverage report
|
|
run: cat ./builddir/meson-logs/coverage.txt
|
|
# we need to upload each artifact on its own as gitea currently only supports one artifact per action
|
|
- name: upload dist package
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ptprnt
|
|
path: ./builddir/meson-dist/*.xz
|
|
if-no-files-found: error
|
|
# we need to upload each artifact on its own as gitea currently only supports one artifact per action
|
|
- name: upload dist package checksum
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ptprnt
|
|
path: ./builddir/meson-dist/*.sha256sum
|
|
if-no-files-found: error
|