From 3c672bd936334b1377ca81351b4928daf0fcf8ef Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Wed, 1 May 2024 10:26:36 +0200 Subject: [PATCH 1/9] Add version information to the act runner --- .gitea/workflows/build.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 106c7cb..4a87e28 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -15,6 +15,19 @@ jobs: 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: | + gcc --version + echo "Supported c/cpp standards:\n===" + gcc -v --help 2> /dev/null | sed -n '/^ *-std=\([^<][^ ]\+\).*/ {s//\1/p}' + echo "===\nEnd supported c/cpp standards" + meson --version + ninja --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 - name: setup builddir run: meson setup builddir -Db_coverage=true - name: build all targets -- 2.49.1 From 6ce813f2b00bb34df23043191289916cda3ed233 Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Wed, 1 May 2024 10:30:45 +0200 Subject: [PATCH 2/9] Touch up the output --- .gitea/workflows/build.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 4a87e28..81ef605 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -17,17 +17,25 @@ jobs: 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 "Supported c/cpp standards:\n===" + echo "=== End meson version ===" + echo "=== Start supported c/cpp standards: ===" gcc -v --help 2> /dev/null | sed -n '/^ *-std=\([^<][^ ]\+\).*/ {s//\1/p}' - echo "===\nEnd supported c/cpp standards" + 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 all targets -- 2.49.1 From 3acefc8b07d6da4e0e982b41ad63468ed28d447c Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Wed, 1 May 2024 10:56:28 +0200 Subject: [PATCH 3/9] Add dist package --- .gitea/workflows/build.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 81ef605..60cda6a 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -38,11 +38,14 @@ jobs: echo "=== End dependency package version ===" - name: setup builddir run: meson setup builddir -Db_coverage=true - - name: build all targets - run: ninja -C builddir - - name: run unit tests - run: ninja -C builddir test + - 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 + - name: upload dist package + uses: actions/upload-artifact@v4 + with: + name: ptprnt + path: ./builddir/meson-dist/ptprnt-*.{.xz,sha256sum} -- 2.49.1 From 1065e38f5bff642df929a2af7aeca51e8d434720 Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Wed, 1 May 2024 11:00:03 +0200 Subject: [PATCH 4/9] Potentially fix dist path --- .gitea/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 60cda6a..a9d1b0d 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -48,4 +48,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: ptprnt - path: ./builddir/meson-dist/ptprnt-*.{.xz,sha256sum} + path: ./builddir/meson-dist/* + if-no-files-found: error -- 2.49.1 From 6ec53d750f05fd13339e15c6fc26de2b2ee704cf Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Wed, 1 May 2024 11:09:29 +0200 Subject: [PATCH 5/9] Seperate artifact upload --- .gitea/workflows/build.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index a9d1b0d..a4815c8 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -44,9 +44,17 @@ jobs: 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@v4 with: name: ptprnt - path: ./builddir/meson-dist/* + 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@v4 + with: + name: ptprnt + path: ./builddir/meson-dist/*.sha256sum if-no-files-found: error -- 2.49.1 From 92df902fb98a172c3dbc2ff2500eef65c583398f Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Wed, 1 May 2024 11:13:49 +0200 Subject: [PATCH 6/9] Try older action version --- .gitea/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index a4815c8..aac9b95 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -46,14 +46,14 @@ jobs: 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@v4 + 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@v4 + uses: actions/upload-artifact@v3 with: name: ptprnt path: ./builddir/meson-dist/*.sha256sum -- 2.49.1 From d3ec844c18ce3990f8fac698e2fe4ef986b59855 Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Wed, 1 May 2024 11:17:06 +0200 Subject: [PATCH 7/9] Let's try the wildcard again --- .gitea/workflows/build.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index aac9b95..4de2ed5 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -49,12 +49,5 @@ jobs: 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 + path: ./builddir/meson-dist/* if-no-files-found: error -- 2.49.1 From cc3ed5cf58ca3f51404f3295ce41b482208d814d Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Wed, 1 May 2024 11:19:06 +0200 Subject: [PATCH 8/9] Cleanup --- .gitea/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 4de2ed5..083a5cc 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -44,10 +44,9 @@ jobs: 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 + name: ptprnt-dist path: ./builddir/meson-dist/* if-no-files-found: error -- 2.49.1 From 341e0b80327fa7075d948b301622d40be29dbff3 Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Wed, 1 May 2024 11:20:22 +0200 Subject: [PATCH 9/9] Fix test coverage --- .gitea/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 083a5cc..ef77628 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -40,6 +40,8 @@ jobs: run: meson setup builddir -Db_coverage=true - name: build and test dist package run: ninja -C builddir dist + - name: run unit tests + run: ninja -C builddir test - name: calculate coverage run: ninja -C builddir coverage-text - name: Coverage report -- 2.49.1