fix build: Refactor autogen call into before_script

Signed-off-by: changhan <changhan@xfusion.com>
This commit is contained in:
changhan 2025-04-18 02:05:31 +00:00 committed by Gitee
parent c1004e448e
commit 0396ab84cc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,47 @@
From 7a35890722b07243ce000acc60dc899fdc6c510c Mon Sep 17 00:00:00 2001
From: changhan <changhan@xfusion.com>
Date: Thu, 17 Apr 2025 20:08:39 +0800
Subject: [PATCH] Refactor-autogen-call-into-before_script
---
.gitlab-ci.yml | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 .gitlab-ci.yml
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..f19a306
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,29 @@
+image: debian:latest
+
+before_script:
+ - apt-get update -qq
+ - apt-get install -qq -y --no-install-recommends
+ git gcc make autoconf automake libtool gcovr
+ - ./autogen
+
+vpath-tests:
+ stage: test
+ script:
+ - mkdir -p build-tree
+ - cd build-tree
+ - ../configure
+ - make check
+
+unit-tests:
+ stage: test
+ script:
+ - ./configure --enable-sanitize
+ - make check
+
+coverage:
+ stage: test
+ script:
+ - ./configure --disable-static
+ - make check CFLAGS="--coverage -O0 -ggdb" LDFLAGS="--coverage -O0 -ggdb"
+ - gcovr -s -e test/
+ coverage: /^TOTAL.*\s+(\d+\%)$/
--
2.33.0

View File

@ -1,7 +1,7 @@
Summary: Library that provides message digest functions from BSD systems Summary: Library that provides message digest functions from BSD systems
Name: libmd Name: libmd
Version: 1.1.0 Version: 1.1.0
Release: 3 Release: 4
# Breakdown in COPYING file of libmd release tarball # Breakdown in COPYING file of libmd release tarball
License: BSD-2-Clause AND BSD-3-Clause AND ISC AND Beerware License: BSD-2-Clause AND BSD-3-Clause AND ISC AND Beerware
URL: https://www.hadrons.org/software/libmd/ URL: https://www.hadrons.org/software/libmd/
@ -13,6 +13,7 @@ BuildRequires: gcc
BuildRequires: make BuildRequires: make
Patch1: backport-fix-out-of-tree-build.patch Patch1: backport-fix-out-of-tree-build.patch
Patch2: backport-Refactor-autogen-call-into-before_script.patch
%description %description
The libmd library provides a few message digest ("hash") functions, as The libmd library provides a few message digest ("hash") functions, as
@ -88,6 +89,9 @@ make check
%{_mandir}/man3/sha2.3* %{_mandir}/man3/sha2.3*
%changelog %changelog
* Fri Apr 18 2025 changhan <changhan@xfusion.com> - 1.1.0-4
- fix build: Refactor autogen call into before_script
* Thu Apr 17 2025 changhan <changhan@xfusion.com> - 1.1.0-3 * Thu Apr 17 2025 changhan <changhan@xfusion.com> - 1.1.0-3
- Fix out-of-tree build - Fix out-of-tree build